[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
387b6ecf [MAC80211][WiFi6][core][Add exported function for SoftMAC driver to get QoS map]
4e3cb5c0 [MAC80211][Rebase Patch][Fix inconsistent QoS mapping between SW and HW]
03f284d9 [MAC80211][WiFi6][mt76][Fix inconsistent QoS mapping between SW and HW]
cdd2ea74 [MAC80211][WiFi6][mt76][Fix rcu stall issue in testmode]
8f684af1 [MAC80211][Release][Add commit revision for Filogic 880/860 release]
bf9808d3 [MAC80211][WiFi6][mt76][Refactor add dummy HW offload of IEEE 802.11 fragmentation]
00b8ee9c [MAC80211][misc][Update Release Information v2]
efcc36f2 [MAC80211][misc][Update Release Information]
8249196d [MAC80211][WiFi7][misc][Add UCI radio disabled for testmode]
[Release-log]
Change-Id: I0e39f84703dc98e6f25cf7d59e98729d33cc6f12
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0105-mtk-hostapd-free-station-when-hapd-deinit.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0105-mtk-hostapd-free-station-when-hapd-deinit.patch
new file mode 100644
index 0000000..81b2015
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0105-mtk-hostapd-free-station-when-hapd-deinit.patch
@@ -0,0 +1,43 @@
+From 95dcf88b68837221ad937fe7c675b169c8034384 Mon Sep 17 00:00:00 2001
+From: Peter Chiu <chui-hao.chiu@mediatek.com>
+Date: Mon, 22 Apr 2024 08:40:18 +0800
+Subject: [PATCH] mtk: hostapd: free station when hapd deinit
+
+Free all stations in the same MLD when a bss is deinit.
+Without this patch, the AP_VLAN interface may be free after
+stop ap and leads to kernel crash.
+
+Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
+---
+ src/ap/hostapd.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
+index c31e0badd..62943c561 100644
+--- a/src/ap/hostapd.c
++++ b/src/ap/hostapd.c
+@@ -842,7 +842,21 @@ static int hostapd_flush_old_stations(struct hostapd_data *hapd, u16 reason)
+
+ void hostapd_bss_deinit_no_free(struct hostapd_data *hapd)
+ {
++#ifdef CONFIG_IEEE80211BE
++ struct hostapd_data *link;
++
++ /* FIXME: free all stations to remvoe AP_VLAN interface. Allocate */
++ /* per-link structures for AP_VLAN in mac80211 and only remove single */
++ /* link here. */
++ if (hostapd_is_mld_ap(hapd)) {
++ for_each_mld_link(link, hapd)
++ hostapd_free_stas(link);
++ } else {
++ hostapd_free_stas(hapd);
++ }
++#else
+ hostapd_free_stas(hapd);
++#endif
+ hostapd_flush_old_stations(hapd, WLAN_REASON_DEAUTH_LEAVING);
+ #ifdef CONFIG_WEP
+ hostapd_clear_wep(hapd);
+--
+2.18.0
+