[][kernel][common][hnat][Fix BIND entry with DP=0 issue for Wifi Tx]

[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
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 c31fd0c..9fe85fb 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
@@ -1242,6 +1242,9 @@
 	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) || defined(CONFIG_MEDIATEK_NETSYS_V3)
 	entry.bfib1.sp = foe->udib1.sp;
 #endif