[][MAC80211][hnat][Fix PPE entry clear issue]
[Description]
Fix PPE entry clear issue.
PPE has a cache memory, user has to clear the cache as well
when setting the PPE entry to INVALD state.
If without this patch, PPE might not unbind PPE entry immediately.
[Release-log]
N/A
Change-Id: If844b66f25c6563ea8cccdbc7e0633939dd78eaf
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7202138
diff --git a/autobuild_mac80211_release/target/linux/mediatek/patches-5.4/9993-add-wed.patch b/autobuild_mac80211_release/target/linux/mediatek/patches-5.4/9993-add-wed.patch
index baa88ef..b4f8e4e 100755
--- a/autobuild_mac80211_release/target/linux/mediatek/patches-5.4/9993-add-wed.patch
+++ b/autobuild_mac80211_release/target/linux/mediatek/patches-5.4/9993-add-wed.patch
@@ -654,7 +654,7 @@
entry->ipv6.ib2 = val;
l2 = &entry->ipv6.l2;
} else {
-@@ -329,32 +351,167 @@ int mtk_foe_entry_set_pppoe(struct mtk_foe_entry *entry, int sid)
+@@ -329,32 +351,168 @@ int mtk_foe_entry_set_pppoe(struct mtk_foe_entry *entry, int sid)
return 0;
}
@@ -723,6 +723,7 @@
+ ppe->foe_table[entry->hash].ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE,
+ MTK_FOE_STATE_INVALID);
+ dma_wmb();
++ mtk_ppe_cache_clear(ppe);
+ }
+ entry->hash = 0xffff;
+
diff --git a/autobuild_mac80211_release/target/linux/mediatek/patches-5.4/9999-2-flow-offload-add-mtkhnat-flow-accounting.patch b/autobuild_mac80211_release/target/linux/mediatek/patches-5.4/9999-2-flow-offload-add-mtkhnat-flow-accounting.patch
index f6243d0..5b6253f 100644
--- a/autobuild_mac80211_release/target/linux/mediatek/patches-5.4/9999-2-flow-offload-add-mtkhnat-flow-accounting.patch
+++ b/autobuild_mac80211_release/target/linux/mediatek/patches-5.4/9999-2-flow-offload-add-mtkhnat-flow-accounting.patch
@@ -139,9 +139,10 @@
static void mtk_ppe_cache_clear(struct mtk_ppe *ppe)
{
ppe_set(ppe, MTK_PPE_CACHE_CTL, MTK_PPE_CACHE_CTL_CLEAR);
-@@ -412,6 +452,18 @@ __mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry)
+@@ -412,7 +452,19 @@ __mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry)
MTK_FOE_STATE_INVALID);
dma_wmb();
+ mtk_ppe_cache_clear(ppe);
+
+ if (ppe->accounting) {
+ struct mtk_foe_accounting *acct, *acct_updated;