[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
This commit is contained in:
developer 2024-01-05 13:45:35 +08:00 committed by hanwckf
parent c430f7b29d
commit f137a9ece7

View File

@ -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