[][MAC80211][WiFi6][mt76][fix rx filter cr]

[Description]
Fix mt76 rx filter CR to align Jedi driver.
Set bit 3 and bit 10 of Rx Filter CR.

[Release-log]
N/A

Change-Id: I8cafb3f01442919c17a106655c36e402d316168c
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/9015016
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0018-wifi-mt76-mt7915-adjust-rx-filter.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0018-wifi-mt76-mt7915-adjust-rx-filter.patch
new file mode 100644
index 0000000..7f6406f
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0018-wifi-mt76-mt7915-adjust-rx-filter.patch
@@ -0,0 +1,58 @@
+From b241c6831557c3141801dc2f87e839269ef7bad1 Mon Sep 17 00:00:00 2001
+From: Howard Hsu <howard-yh.hsu@mediatek.com>
+Date: Fri, 19 Apr 2024 15:43:23 +0800
+Subject: [PATCH] wifi: mt76: mt7915: adjust rx filter
+
+Adjust rx filter setting to drop the packet that we do not need to
+receive.
+
+Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
+Signed-off-by: Howard Hsu <howard-yh.hsu@mediatek.com>
+---
+ mt7915/main.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/mt7915/main.c b/mt7915/main.c
+index 26f9a5a..137e09a 100644
+--- a/mt7915/main.c
++++ b/mt7915/main.c
+@@ -489,7 +489,8 @@ static int mt7915_config(struct ieee80211_hw *hw, u32 changed)
+ 			rxfilter |= MT_WF_RFCR_DROP_OTHER_UC;
+ 			dev->monitor_mask &= ~BIT(band);
+ 		} else {
+-			rxfilter &= ~MT_WF_RFCR_DROP_OTHER_UC;
++			rxfilter &= ~(MT_WF_RFCR_DROP_A2_BSSID |
++				      MT_WF_RFCR_DROP_OTHER_UC);
+ 			dev->monitor_mask |= BIT(band);
+ 		}
+ 
+@@ -552,13 +553,14 @@ static void mt7915_configure_filter(struct ieee80211_hw *hw,
+ 			   MT_WF_RFCR_DROP_MCAST |
+ 			   MT_WF_RFCR_DROP_BCAST |
+ 			   MT_WF_RFCR_DROP_DUPLICATE |
+-			   MT_WF_RFCR_DROP_A2_BSSID |
+ 			   MT_WF_RFCR_DROP_UNWANTED_CTL |
+ 			   MT_WF_RFCR_DROP_STBC_MULTI);
++	phy->rxfilter |= MT_WF_RFCR_DROP_VERSION;
+ 
+ 	MT76_FILTER(OTHER_BSS, MT_WF_RFCR_DROP_OTHER_TIM |
+ 			       MT_WF_RFCR_DROP_A3_MAC |
+-			       MT_WF_RFCR_DROP_A3_BSSID);
++			       MT_WF_RFCR_DROP_A3_BSSID |
++			       MT_WF_RFCR_DROP_A2_BSSID);
+ 
+ 	MT76_FILTER(FCSFAIL, MT_WF_RFCR_DROP_FCSFAIL);
+ 
+@@ -569,7 +571,8 @@ static void mt7915_configure_filter(struct ieee80211_hw *hw,
+ 	*total_flags = flags;
+ 	rxfilter = phy->rxfilter;
+ 	if (hw->conf.flags & IEEE80211_CONF_MONITOR)
+-		rxfilter &= ~MT_WF_RFCR_DROP_OTHER_UC;
++		rxfilter &= ~(MT_WF_RFCR_DROP_A2_BSSID |
++			      MT_WF_RFCR_DROP_OTHER_UC);
+ 	else
+ 		rxfilter |= MT_WF_RFCR_DROP_OTHER_UC;
+ 	mt76_wr(dev, MT_WF_RFCR(band), rxfilter);
+-- 
+2.18.0
+