From f137a9ece7c4e66b37bbbb49050d8adecd6fba20 Mon Sep 17 00:00:00 2001 From: developer Date: Fri, 5 Jan 2024 13:45:35 +0800 Subject: [PATCH] [Description] Fix BIND entry with DP=0 issue for Wifi Tx Without this patch, the PPE entry state could be set to BIND unexpectedly, adds a check to confirm if the copied entry state is UNBIND. [Release-log] N/A Change-Id: I49825572617eb804cda18e8f054b9106f26926bb Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8498669 --- .../drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c index 6b4f2139c9..c45dacb21d 100644 --- a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c +++ b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c @@ -1256,6 +1256,9 @@ static unsigned int skb_to_hnat_info(struct sk_buff *skb, entry.bfib1.pkt_type = foe->udib1.pkt_type; /* Get packte type state*/ entry.bfib1.state = foe->udib1.state; + if (unlikely(entry.bfib1.state != UNBIND)) + return 0; + #if defined(CONFIG_MEDIATEK_NETSYS_V2) entry.bfib1.sp = foe->udib1.sp; #endif