[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/0148-mtk-mt76-mt7996-set-unused-band-to-UNSPECIFIED-in-ba.patch b/recipes-wifi/linux-mt76/files/patches-3.x/0148-mtk-mt76-mt7996-set-unused-band-to-UNSPECIFIED-in-ba.patch
new file mode 100644
index 0000000..1e80e00
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/patches-3.x/0148-mtk-mt76-mt7996-set-unused-band-to-UNSPECIFIED-in-ba.patch
@@ -0,0 +1,66 @@
+From 946c2a0cd923e411009c541184978747947ebb5a Mon Sep 17 00:00:00 2001
+From: Peter Chiu <chui-hao.chiu@mediatek.com>
+Date: Wed, 5 Jun 2024 10:11:13 +0800
+Subject: [PATCH 148/199] mtk: mt76: mt7996: set unused band to UNSPECIFIED in
+ band_to_link
+
+Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
+---
+ mt7996/main.c | 4 ++++
+ mt7996/mcu.c | 3 +++
+ mt7996/mt7996.h | 3 +++
+ 3 files changed, 10 insertions(+)
+
+diff --git a/mt7996/main.c b/mt7996/main.c
+index a85fa935..b6231dff 100644
+--- a/mt7996/main.c
++++ b/mt7996/main.c
+@@ -482,6 +482,8 @@ static int mt7996_add_interface(struct ieee80211_hw *hw,
+ mvif->sta.vif = mvif;
+ /* TODO: temporaily set this to prevent some crashes */
+ mvif->deflink.phy = phy;
++ memset(mvif->band_to_link, IEEE80211_LINK_UNSPECIFIED,
++ sizeof(mvif->band_to_link));
+
+ if (vif->type == NL80211_IFTYPE_STATION)
+ ret = mt7996_add_bss_conf(phy, vif, &vif->bss_conf);
+@@ -1054,6 +1056,8 @@ mt7996_channel_switch_beacon(struct ieee80211_hw *hw,
+
+ mutex_lock(&dev->mt76.mutex);
+ link_id = mvif->band_to_link[phy->mt76->band_idx];
++ if (link_id == IEEE80211_LINK_UNSPECIFIED)
++ goto out;
+
+ if (!mvif->cs_ready_links)
+ mvif->cs_link_id = link_id;
+diff --git a/mt7996/mcu.c b/mt7996/mcu.c
+index 3a950a90..40ba5b43 100644
+--- a/mt7996/mcu.c
++++ b/mt7996/mcu.c
+@@ -374,6 +374,9 @@ mt7996_mcu_csa_finish(void *priv, u8 *mac, struct ieee80211_vif *vif)
+ int link_id, band_idx = mphy->band_idx;
+
+ link_id = mvif->band_to_link[band_idx];
++ if (link_id == IEEE80211_LINK_UNSPECIFIED)
++ return;
++
+ link_conf = rcu_dereference(vif->link_conf[link_id]);
+
+ if (!link_conf || !link_conf->csa_active || vif->type == NL80211_IFTYPE_STATION)
+diff --git a/mt7996/mt7996.h b/mt7996/mt7996.h
+index cb6a5753..dc0209de 100644
+--- a/mt7996/mt7996.h
++++ b/mt7996/mt7996.h
+@@ -962,6 +962,9 @@ mt7996_get_link_wcid(struct mt7996_dev *dev, u16 idx, u8 band_idx)
+
+ mlink = wcid_to_mlink(wcid);
+ link_id = mlink->sta->vif->band_to_link[band_idx];
++ if (link_id == IEEE80211_LINK_UNSPECIFIED)
++ return wcid;
++
+ mlink = rcu_dereference(mlink->sta->link[link_id]);
+ if (!mlink)
+ return wcid;
+--
+2.18.0
+