generic: 6.6: drop backport patches
[openwrt/staging/981213.git] / target / linux / generic / pending-6.6 / 734-net-ethernet-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Tue, 27 Dec 2022 15:02:51 +0100
3 Subject: [PATCH] net: ethernet: mtk_eth_soc: ppe: fix L2 offloading with DSA
4 untagging offload enabled
5
6 Check for skb metadata in order to detect the case where the DSA header is not
7 present.
8
9 Fixes: 2d7605a72906 ("net: ethernet: mtk_eth_soc: enable hardware DSA untagging")
10 Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 ---
12
13 --- a/drivers/net/ethernet/mediatek/mtk_ppe.c
14 +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
15 @@ -8,6 +8,7 @@
16 #include <linux/platform_device.h>
17 #include <linux/if_ether.h>
18 #include <linux/if_vlan.h>
19 +#include <net/dst_metadata.h>
20 #include <net/dsa.h>
21 #include "mtk_eth_soc.h"
22 #include "mtk_ppe.h"
23 @@ -829,7 +830,9 @@ void __mtk_ppe_check_skb(struct mtk_ppe
24 skb->dev->dsa_ptr->tag_ops->proto != DSA_TAG_PROTO_MTK)
25 goto out;
26
27 - tag += 4;
28 + if (!skb_metadata_dst(skb))
29 + tag += 4;
30 +
31 if (get_unaligned_be16(tag) != ETH_P_8021Q)
32 break;
33