[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
ced8594f [MAC80211][WiFi6][Misc][Fix the MT76 WiFi6 Makefile]
7221999e [MAC80211][WiFi7][Misc][Correct the MAC80211 WiFi7 Makefile.]
9d87794a [MAC80211][WiFi7][Misc][Correct the MT76 WiFi7 Makefile.]
ff24e1b2 [openwrt-24][Mac80211][Fix patch conflict with upstream openwrt]
3a6c13e2 [mac80211][misc][fix patch fail due to openwrt update]
05763faa [MAC80211][WiFi7][misc][fix patch failed of wifi-scripts]
f34fd014 [mac80211][misc][fix patch fail due to openwrt update]
f6796660 [openwrt-24][Release][Fix build fail of Wi-Fi7 MT76]
7076d96c [MAC80211][WiFi7][Misc][Fix release build fail because of mt76 version upgradation]
1f748b17 [mac80211][misc][fix patch fail due to openwrt update]
95ba6722 [mac80211][misc][fix patch fail due to openwrt update]
17680d7f [MAC80211][WiFi7][misc][Rename eeprom of eFEM variants]
b97cefa1 [MAC80211][WiFi7][app][Add Griffin support for atenl/iwpriv]
6de718a4 [MAC80211][WiFi7][misc][fix wifi-scripts patch failed]
9f1ace86 [MAC80211][WiFi7][misc][fix hostapd Makefile patch]
e4d0d28e [MAC80211][Misc][Add MT7990 Firmware OpenWrt config]
f3a8a8f7 [MAC80211][Release][Fix build fail of Wi-Fi6 MT76]
dabe8eae [openwrt-24][common][bsp][Fix line ending]
6d438a9d [openwrt-24][common][bsp][Use zstd to compress rootfs debug symbols for unified autobuild]
c268e47e [openwrt][common][bsp][Change SMC ID of wdt nonrst reg of reset-boot-count to 0x570]
c6819fbc [openwrt-24][Release][Update release note for Filogic 880 alpha release]
6897b4de [openwrt-24][common][bsp][Adjust unified autobuild for internal build detection]
fb9b9762 [MAC80211][WiFi6/7][app][Add ext eeprom write back cmd support]
d42b42a3 [openwrt-24][common][bsp][Add kernel6.6 Filogic880 BE19000/BE14000]
3806f047 [MAC80211][misc][Add Bpi-R4 support]
ddbda753 [MAC80211][WiFi7][Misc][Fix build fail because of mt76 version upgradation]
90959b08 [MAC80211][WiFi6][mt76][Rebase mt76 pathes]
728a3362 [MAC80211][WiFi6][mt76][Refactor Qos Map]
b46277b5 [MAC80211][WiFi6][mt76][Fix add ba issue on tid not equal to zero]
c084ee8b [MAC80211][WiFi7][mt76][split mt76 Makefile patch]
bbaec094 [MAC80211][Release][Update Filogic 830/820/630 firmware]
5ce2eece [MAC80211][wifi6][MT76][Fix build fail]
5ac1121f [MAC80211][wifi6][MT76][Fix mt76 version to 2024-07-13]
485f92b1 [MAC80211][WiFi7][misc][synchronize PP bitmap when association]
84db8818 [MAC80211][WiFi6/7][app][Add ATETXNSS in iwpriv wrapper]
cc5a4605 [MAC80211][WiFi7][mt76][fix patch failed of Makefile]
[Release-log]
Change-Id: I06704c04c4b5571af4ffd189d636c1fc9f0567fd
diff --git a/recipes-wifi/linux-mt76/files/patches-3.x/0174-mtk-mt76-mt7996-add-mcu-command-to-set-bssid-mapping.patch b/recipes-wifi/linux-mt76/files/patches-3.x/0174-mtk-mt76-mt7996-add-mcu-command-to-set-bssid-mapping.patch
new file mode 100644
index 0000000..9d09a4f
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/patches-3.x/0174-mtk-mt76-mt7996-add-mcu-command-to-set-bssid-mapping.patch
@@ -0,0 +1,108 @@
+From 848a43638c737f72cf30a53b855f0f09ee7be729 Mon Sep 17 00:00:00 2001
+From: Peter Chiu <chui-hao.chiu@mediatek.com>
+Date: Mon, 22 Jul 2024 10:47:45 +0800
+Subject: [PATCH 174/223] mtk: mt76: mt7996: add mcu command to set bssid
+ mapping address
+
+When receiving 4 address non-amsdu packet, there is no bssid in the address
+field. Set mcu command to use A1 as bssid when receiving 4 address non-amsdu
+packet.
+
+Change-Id: I599c9ea5a1a7cecc206b099ea13c583d71fd274b
+Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
+---
+ mt7996/init.c | 7 +++++++
+ mt7996/mcu.c | 26 ++++++++++++++++++++++++++
+ mt7996/mcu.h | 1 +
+ mt7996/mt7996.h | 1 +
+ 4 files changed, 35 insertions(+)
+
+diff --git a/mt7996/init.c b/mt7996/init.c
+index 18847ff5..d7a1d7cd 100644
+--- a/mt7996/init.c
++++ b/mt7996/init.c
+@@ -539,6 +539,9 @@ mt7996_mac_init_band(struct mt7996_dev *dev, u8 band)
+ {
+ u32 mask, set;
+
++ if (!mt7996_band_valid(dev, band))
++ return;
++
+ /* clear estimated value of EIFS for Rx duration & OBSS time */
+ mt76_wr(dev, MT_WF_RMAC_RSVD0(band), MT_WF_RMAC_RSVD0_EIFS_CLR);
+
+@@ -566,6 +569,10 @@ mt7996_mac_init_band(struct mt7996_dev *dev, u8 band)
+ * MT_AGG_ACR_PPDU_TXS2H (PPDU format) even though ACR bit is set.
+ */
+ mt76_set(dev, MT_AGG_ACR4(band), MT_AGG_ACR_PPDU_TXS2H);
++
++
++ if (!is_mt7996(&dev->mt76))
++ mt7996_mcu_set_bssid_mapping_addr(&dev->mt76, band);
+ }
+
+ static void mt7996_mac_init_basic_rates(struct mt7996_dev *dev)
+diff --git a/mt7996/mcu.c b/mt7996/mcu.c
+index b47aa7d6..dc1af0be 100644
+--- a/mt7996/mcu.c
++++ b/mt7996/mcu.c
+@@ -6127,6 +6127,32 @@ int mt7996_mcu_twt_agrt_update(struct mt7996_dev *dev,
+ &req, sizeof(req), true);
+ }
+
++int mt7996_mcu_set_bssid_mapping_addr(struct mt76_dev *dev, u8 band_idx)
++{
++ enum {
++ BSSID_MAPPING_ADDR1,
++ BSSID_MAPPING_ADDR2,
++ BSSID_MAPPING_ADDR3,
++ };
++ struct {
++ u8 band_idx;
++ u8 _rsv1[3];
++
++ __le16 tag;
++ __le16 len;
++ u8 addr;
++ u8 _rsv2[3];
++ } __packed req = {
++ .band_idx = band_idx,
++ .tag = cpu_to_le16(UNI_BAND_CONFIG_BSSID_MAPPING_ADDR),
++ .len = cpu_to_le16(sizeof(req) - 4),
++ .addr = BSSID_MAPPING_ADDR1,
++ };
++
++ return mt76_mcu_send_msg(dev, MCU_WM_UNI_CMD(BAND_CONFIG),
++ &req, sizeof(req), true);
++}
++
+ int mt7996_mcu_set_rts_thresh(struct mt7996_phy *phy, u32 val)
+ {
+ struct {
+diff --git a/mt7996/mcu.h b/mt7996/mcu.h
+index ffa574b8..5d4625c8 100644
+--- a/mt7996/mcu.h
++++ b/mt7996/mcu.h
+@@ -1067,6 +1067,7 @@ enum {
+ UNI_BAND_CONFIG_RTS_THRESHOLD = 0x08,
+ UNI_BAND_CONFIG_RTS_SIGTA_EN = 0x09,
+ UNI_BAND_CONFIG_DIS_SECCH_CCA_DET = 0x0a,
++ UNI_BAND_CONFIG_BSSID_MAPPING_ADDR = 0x12,
+ };
+
+ enum {
+diff --git a/mt7996/mt7996.h b/mt7996/mt7996.h
+index 21019bc2..b9b52d17 100644
+--- a/mt7996/mt7996.h
++++ b/mt7996/mt7996.h
+@@ -1112,6 +1112,7 @@ int mt7996_mcu_set_radar_th(struct mt7996_dev *dev, int index,
+ const struct mt7996_dfs_pattern *pattern);
+ int mt7996_mcu_set_radio_en(struct mt7996_phy *phy, bool enable);
+ int mt7996_mcu_set_rts_thresh(struct mt7996_phy *phy, u32 val);
++int mt7996_mcu_set_bssid_mapping_addr(struct mt76_dev *dev, u8 band);
+ int mt7996_mcu_set_timing(struct mt7996_phy *phy, struct mt7996_bss_conf *mconf);
+ int mt7996_mcu_get_chan_mib_info(struct mt7996_phy *phy, bool chan_switch);
+ int mt7996_mcu_get_temperature(struct mt7996_phy *phy);
+--
+2.45.2
+