kernel: fix mtk dsa tag padding
[openwrt/staging/noltari.git] / target / linux / generic / pending-5.10 / 705-net-dsa-tag_mtk-add-padding-for-tx-packets.patch
index e27ac3595f52ad1bb7f988901a558b0e22c058a8..4f3af6c6b0ecc47f6a71da0426f4226478f4cda6 100644 (file)
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/net/dsa/tag_mtk.c
 +++ b/net/dsa/tag_mtk.c
-@@ -25,6 +25,14 @@ static struct sk_buff *mtk_tag_xmit(stru
+@@ -25,6 +25,13 @@ static struct sk_buff *mtk_tag_xmit(stru
        u8 xmit_tpid;
        u8 *mtk_tag;
  
@@ -21,8 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 +       * corrupted. With tags enabled, we need to make sure that packets are
 +       * at least 68 bytes (including FCS and tag).
 +       */
-+      if (__skb_put_padto(skb, ETH_ZLEN + MTK_HDR_LEN, false))
-+              return NULL;
++      eth_skb_pad(skb);
 +
        /* Build the special tag after the MAC Source Address. If VLAN header
         * is present, it's required that VLAN header and special tag is