[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
3a2eef0b [MAC80211][Release][Update release note for Filogic 880/860 MLO Beta release]
cfbd2411 [MAC80211][Release][Filogic 880/860 MLO Beta release]
6c180e3f [MAC80211][WiFi7][misc][Add Eagle BE14000 efem default bin]
a55f34db [MAC80211][Release][Prepare for Filogic 880/860 release]
5b45ebca [MAC80211][WiFi7][hostapd][Add puncture bitmap to ucode]
95bbea73 [MAC80211][WiFi6][mt76][Add PID to only report data-frame TX rate]
b15ced26 [MAC80211][WiFi6][hostapd][Fix DFS channel selection issue]
d59133cb [MAC80211][WiFi6][mt76][Fix pse info not correct information]
3921b4b2 [MAC80211][WiFi6][mt76][Fix incomplete QoS-map setting to FW]
4e7690c7 [MAC80211][WiFi6/7][app][Change ATECHANNEL mapping cmd]
eb37af90 [MAC80211][WiFi7][app][Add support for per-packet bw & primary selection]
0ea82adf [MAC80211][WiFi6][core][Fix DFS CAC issue after CSA]
[Release-log]
Change-Id: I9bec97ec1b2e1c49ed43a812a07a5b21fcbb70a6
diff --git a/recipes-wifi/linux-mt76/files/patches-3.x/0186-mtk-mt76-mt7996-add-mcu-command-to-set-bssid-mapping.patch b/recipes-wifi/linux-mt76/files/patches-3.x/0186-mtk-mt76-mt7996-add-mcu-command-to-set-bssid-mapping.patch
new file mode 100644
index 0000000..1530414
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/patches-3.x/0186-mtk-mt76-mt7996-add-mcu-command-to-set-bssid-mapping.patch
@@ -0,0 +1,107 @@
+From 073ba6d0288ea53059ec280b7789a2cbf25ba03f 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 186/199] 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.
+
+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 f923ce66..25f772af 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 0af0ca82..ead9ff4f 100644
+--- a/mt7996/mcu.c
++++ b/mt7996/mcu.c
+@@ -6117,6 +6117,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 c1823759..e1e1160a 100644
+--- a/mt7996/mt7996.h
++++ b/mt7996/mt7996.h
+@@ -1108,6 +1108,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.18.0
+