[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
e6d9f8b2 [MAC80211][misc][Add Filogic 880 Non-MLO SDK Release. Add missing firmwares]
9def0c8f [MAC80211][WiFi7][ucode][Not to remove or create interface for non-primary MLD link]
c77412af [MAC80211][WiFi7][Misc][Add MLD configuration options]
d0bc5c22 [MAC80211][misc][Add Filogic 880 Non-MLO SDK Release]
01817e1f [mac80211][WiFi7][misc][Fix patch fail]
d6a80bd6 [MAC80211][WiFi6][Misc][Add lpi, duplicate mode and sku index]
0977e5a6 [MAC80211][WiFi6][hostapd][Add txpower vendor command]
2e2eb49f [MAC80211][WiFi6][mt76][Add support for lpi and duplicate mode]
c4856a8a [MAC80211][WiFi6][core][Add sta info flush and send deauth during DFS channel switch]
c586f5f5 [MAC80211][WiFi6][mt76][rebase patches]
fabcdbbd [MAC80211][WiFi6][mt76][Support thermal recal debug command]
1cba3dbf [MAC80211][WiFi6][mt76][Fix the fw version of wm and wa are on contrary]
99500b19 [MAC80211][WiFi6][core][Revert sending deauth frame for DFS channel switch]
[Release-log]
Change-Id: I357f4a5fec68ce0210927e1b4f172fcd3196139d
diff --git a/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0025-mac80211-mtk-send-deauth-frame-if-CAC-is-required-du.patch b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0025-mac80211-mtk-send-deauth-frame-if-CAC-is-required-du.patch
new file mode 100644
index 0000000..a74101d
--- /dev/null
+++ b/recipes-wifi/linux-mac80211/files/patches/subsys/mtk-0025-mac80211-mtk-send-deauth-frame-if-CAC-is-required-du.patch
@@ -0,0 +1,59 @@
+From 08661908d4c2fb5f8d7ca00e0e7e6b33a6ae6e31 Mon Sep 17 00:00:00 2001
+From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+Date: Wed, 27 Dec 2023 14:26:22 +0800
+Subject: [PATCH] mac80211: mtk: send deauth frame if CAC is required during
+ CSA
+
+Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+---
+ net/mac80211/cfg.c | 27 +++++++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+
+diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
+index 3e6e903..eb73834 100644
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -3361,6 +3361,31 @@ static int ieee80211_start_radar_detection_post_csa(struct wiphy *wiphy,
+ return 1;
+ }
+
++static void ieee80211_csa_send_deauth(struct ieee80211_sub_if_data *sdata)
++{
++ struct ieee80211_local *local = sdata->local;
++ u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN];
++ u8 broadcast[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
++ bool send_deauth;
++
++ send_deauth = !cfg80211_chandef_identical(&sdata->vif.bss_conf.chandef,
++ &sdata->csa_chandef) &&
++ !cfg80211_reg_can_beacon_relax(local->hw.wiphy,
++ &sdata->csa_chandef,
++ sdata->wdev.iftype);
++ /* broadcast deauth frame if CAC is required */
++ if (!send_deauth)
++ return;
++
++ ieee80211_wake_vif_queues(local, sdata, IEEE80211_QUEUE_STOP_REASON_CSA);
++ ieee80211_send_deauth_disassoc(sdata, broadcast,
++ sdata->vif.bss_conf.bssid,
++ IEEE80211_STYPE_DEAUTH,
++ WLAN_REASON_DEAUTH_LEAVING,
++ send_deauth, frame_buf);
++ ieee80211_stop_vif_queues(local, sdata, IEEE80211_QUEUE_STOP_REASON_CSA);
++}
++
+ static int __ieee80211_csa_finalize(struct ieee80211_sub_if_data *sdata)
+ {
+ struct ieee80211_local *local = sdata->local;
+@@ -3371,6 +3396,8 @@ static int __ieee80211_csa_finalize(struct ieee80211_sub_if_data *sdata)
+ lockdep_assert_held(&local->mtx);
+ lockdep_assert_held(&local->chanctx_mtx);
+
++ ieee80211_csa_send_deauth(sdata);
++
+ /*
+ * using reservation isn't immediate as it may be deferred until later
+ * with multi-vif. once reservation is complete it will re-schedule the
+--
+2.18.0
+