[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
c7470cd7 [MAC80211][misc][Refactor WiFi7 MLO Script change into patch files]
e4aa1c1d [MAC80211][WiFi6][mt76][fix rx filter cr]
75b0445f [MAC80211][WiFi6][mt76][Fix inconsistent QoS mapping between SW and HW for STA IFs]
1ef858e8 [MAC80211][WiFi6][core][Fix inconsistent QoS mapping between AP and AP_VLAN VIFs]
[Release-log]
Change-Id: Ic8bcc0d6031b69788092f644860b98c6c035bfe5
diff --git a/recipes-wifi/linux-mt76/files/patches/0017-wifi-mt76-mt7915-fix-inconsistent-QoS-mapping-betwee.patch b/recipes-wifi/linux-mt76/files/patches/0017-wifi-mt76-mt7915-fix-inconsistent-QoS-mapping-betwee.patch
index d4d3d2e..88b589a 100644
--- a/recipes-wifi/linux-mt76/files/patches/0017-wifi-mt76-mt7915-fix-inconsistent-QoS-mapping-betwee.patch
+++ b/recipes-wifi/linux-mt76/files/patches/0017-wifi-mt76-mt7915-fix-inconsistent-QoS-mapping-betwee.patch
@@ -1,4 +1,4 @@
-From 9c6e5082d5552ac2cefe5b4857da4b29b0c76685 Mon Sep 17 00:00:00 2001
+From 0a59757ea8e0ea066053cb6b58da3570a4092c09 Mon Sep 17 00:00:00 2001
From: Benjamin Lin <benjamin-jw.lin@mediatek.com>
Date: Thu, 25 Apr 2024 17:17:13 +0800
Subject: [PATCH] wifi: mt76: mt7915: fix inconsistent QoS mapping between SW
@@ -10,10 +10,10 @@
Signed-off-by: Benjamin Lin <benjamin-jw.lin@mediatek.com>
---
mt76_connac_mcu.h | 1 +
- mt7915/main.c | 3 +++
+ mt7915/main.c | 5 +++++
mt7915/mcu.c | 37 +++++++++++++++++++++++++++++++++++++
- mt7915/mt7915.h | 1 +
- 4 files changed, 42 insertions(+)
+ mt7915/mt7915.h | 3 +++
+ 4 files changed, 46 insertions(+)
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
index 1dd8244..0936c1c 100644
@@ -28,21 +28,23 @@
enum {
diff --git a/mt7915/main.c b/mt7915/main.c
-index 5ed84bc..26f9a5a 100644
+index 5ed84bc..c6880ca 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
-@@ -646,6 +646,9 @@ static void mt7915_bss_info_changed(struct ieee80211_hw *hw,
- }
- }
+@@ -1697,6 +1697,11 @@ mt7915_net_fill_forward_path(struct ieee80211_hw *hw,
-+ if (changed & BSS_CHANGED_QOS)
+ ctx->dev = NULL;
+
++ if (!mvif->qos_map_enabled) {
+ mt7915_mcu_set_qos_map(dev, vif);
++ mvif->qos_map_enabled = true;
++ }
+
- /* ensure that enable txcmd_mode after bss_info */
- if (changed & (BSS_CHANGED_QOS | BSS_CHANGED_BEACON_ENABLED))
- mt7915_mcu_set_tx(dev, vif);
+ return 0;
+ }
+ #endif
diff --git a/mt7915/mcu.c b/mt7915/mcu.c
-index 446c512..3d7fc6d 100644
+index 446c512..64d2710 100644
--- a/mt7915/mcu.c
+++ b/mt7915/mcu.c
@@ -4212,3 +4212,40 @@ int mt7915_mcu_rf_regval(struct mt7915_dev *dev, u32 regidx, u32 *val, bool set)
@@ -84,13 +86,22 @@
+ rcu_read_unlock();
+
+ return mt76_mcu_send_msg(&dev->mt76, MCU_WA_EXT_CMD(SET_QOS_MAP), &req,
-+ sizeof(req), true);
++ sizeof(req), false);
+}
diff --git a/mt7915/mt7915.h b/mt7915/mt7915.h
-index 74cd8ca..66d87d7 100644
+index 74cd8ca..c813433 100644
--- a/mt7915/mt7915.h
+++ b/mt7915/mt7915.h
-@@ -521,6 +521,7 @@ int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
+@@ -175,6 +175,8 @@ struct mt7915_vif {
+
+ struct ieee80211_tx_queue_params queue_params[IEEE80211_NUM_ACS];
+ struct cfg80211_bitrate_mask bitrate_mask;
++
++ bool qos_map_enabled;
+ };
+
+ /* crash-dump */
+@@ -521,6 +523,7 @@ int mt7915_mcu_fw_dbg_ctrl(struct mt7915_dev *dev, u32 module, u8 level);
void mt7915_mcu_rx_event(struct mt7915_dev *dev, struct sk_buff *skb);
void mt7915_mcu_exit(struct mt7915_dev *dev);
void mt7915_mcu_wmm_pbc_work(struct work_struct *work);
diff --git a/recipes-wifi/linux-mt76/files/patches/0018-wifi-mt76-mt7915-adjust-rx-filter.patch b/recipes-wifi/linux-mt76/files/patches/0018-wifi-mt76-mt7915-adjust-rx-filter.patch
new file mode 100644
index 0000000..7f6406f
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/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
+
diff --git a/recipes-wifi/linux-mt76/files/patches/patches.inc b/recipes-wifi/linux-mt76/files/patches/patches.inc
index a8fea12..4ad84a7 100644
--- a/recipes-wifi/linux-mt76/files/patches/patches.inc
+++ b/recipes-wifi/linux-mt76/files/patches/patches.inc
@@ -18,6 +18,7 @@
file://0016-wifi-mt76-mt7915-add-dummy-HW-offload-of-IEEE-802.11.patch \
file://0016-wifi-mt76-mt7915-fix-rx-filter-setting-for-bfee-func.patch \
file://0017-wifi-mt76-mt7915-fix-inconsistent-QoS-mapping-betwee.patch \
+ file://0018-wifi-mt76-mt7915-adjust-rx-filter.patch \
file://0999-wifi-mt76-mt7915-build-pass-for-Linux-Kernel-5.4-fix.patch \
file://1000-wifi-mt76-mt7915-add-mtk-internal-debug-tools-for-mt.patch \
file://1001-wifi-mt76-mt7915-csi-implement-csi-support.patch \