[rdkb][common][bsp][Refactor and sync wifi from openwrt]

[Description]
a05cc330 [MAC80211][WiFi6][mt76][rebase patches]
4bd6fb05 [MAC80211][WiFi6][mt76][Support spatial reuse debug commands]
f59fb1fe [MAC80211][WiFi7][misc][Add wifi-scripts packages]
52ac14cd [MAC80211][WiFi6][hostapd][Fix DFS radar trigger issue during first setup CAC]
7e33638a [MAC80211][WiFi6][Rebase Patches][Fix patch fail on mt76-2024-02-04]
b81d400b [MAC80211][Rebase Patches][Add support for WMM PBC configuration]
6e1f46b8 [MAC80211][WiFi6][mt76][Add support for WMM PBC configuration]
4a12d531 [mac80211][wifi6][mt76][Remove revert patch and add sanity check]
46c5e65d [mac80211][wifi6][mt76][Fix tx statistics]
d9b7c50d [MAC80211][WiFi6][mt76][Fix patch fail]
c8c49a13 [MAC80211][WiFi6][mt76][Add no_beacon vendor command for cert]
620200d9 [MAC80211][WiFi6][mt76][Remove redundant argument in add_beacon function]
f5fe56a6 [MAC80211][WiFi6][hostapd][New support for single BSS operations]
ff6e20a8 [MAC80211][WiFi6][hostapd][ACS: remove chan/freq list check when scan request and factor calculation]
3f25a0e5 [MAC80211][WiFi6][mt76][Fix bug in VoW DebugFS command]
33cb7faf [MAC80211][WiFi6][core][Sync wifi7 cert SQC fix to wifi6]
3a1c492a [MAC80211][WiFi6][core][Add support for scan dwell time customization]
7e7a47e4 [mac80211][wifi6][mt76][Fix patch fail]
5fc4c9d6 [MAC80211][misc][Fix external build fail of MAC80211]
b5d42444 [mac80211][wifi6][mt76][add support for realtime Rx rate updates]
638298f6 [mac80211][WiFi7][misc][Fix patch fail]
5c710bc2 [MAC80211][WiFi6][mt76][Add efuse content dump for cal free data verification]

[Release-log]

Change-Id: Ia86a987807efb6f1ef119e2e46232ce08afca96e
diff --git a/recipes-wifi/linux-mt76/files/patches/0013-wifi-mt76-add-sanity-check-to-prevent-kernel-crash.patch b/recipes-wifi/linux-mt76/files/patches/0013-wifi-mt76-add-sanity-check-to-prevent-kernel-crash.patch
new file mode 100644
index 0000000..01f3496
--- /dev/null
+++ b/recipes-wifi/linux-mt76/files/patches/0013-wifi-mt76-add-sanity-check-to-prevent-kernel-crash.patch
@@ -0,0 +1,35 @@
+From 0cf61c8ee2d3cd4bd7c96b3ee09c968c01fcff35 Mon Sep 17 00:00:00 2001
+From: Peter Chiu <chui-hao.chiu@mediatek.com>
+Date: Mon, 29 Jan 2024 15:33:24 +0800
+Subject: [PATCH 13/13] wifi: mt76: add sanity check to prevent kernel crash
+
+wcid may not be initialized when mac80211 calls mt76.tx and it would lead to
+kernel crash.
+
+Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
+---
+ tx.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/tx.c b/tx.c
+index 1809b03..4596b36 100644
+--- a/tx.c
++++ b/tx.c
+@@ -345,6 +345,14 @@ mt76_tx(struct mt76_phy *phy, struct ieee80211_sta *sta,
+ 
+ 	info->hw_queue |= FIELD_PREP(MT_TX_HW_QUEUE_PHY, phy->band_idx);
+ 
++	if (!wcid->tx_pending.prev || !wcid->tx_pending.next) {
++		dev_warn(phy->dev->dev, "Un-initialized STA %pM wcid %d in mt76_tx\n",
++			 sta->addr, wcid->idx);
++
++		ieee80211_free_txskb(phy->hw, skb);
++		return;
++	}
++
+ 	spin_lock_bh(&wcid->tx_pending.lock);
+ 	__skb_queue_tail(&wcid->tx_pending, skb);
+ 	spin_unlock_bh(&wcid->tx_pending.lock);
+-- 
+2.18.0
+