[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/hostapd/files/patches-2.10.3/0036-mtk-hostapd-Fix-background-channel-overlapping-opera.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0036-mtk-hostapd-Fix-background-channel-overlapping-opera.patch
new file mode 100644
index 0000000..a25e243
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0036-mtk-hostapd-Fix-background-channel-overlapping-opera.patch
@@ -0,0 +1,64 @@
+From ce1043355ec94008f97f8ee1401a9a7a2050fb88 Mon Sep 17 00:00:00 2001
+From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+Date: Wed, 5 Jul 2023 10:44:15 +0800
+Subject: [PATCH 036/126] mtk: hostapd: Fix background channel overlapping
+ operating channel issue
+
+Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
+---
+ src/ap/dfs.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/src/ap/dfs.c b/src/ap/dfs.c
+index 9677b26ea..754c471f5 100644
+--- a/src/ap/dfs.c
++++ b/src/ap/dfs.c
+@@ -815,6 +815,20 @@ static int dfs_are_channels_overlapped(struct hostapd_iface *iface, int freq,
+ }
+
+
++static void dfs_check_background_overlapped(struct hostapd_iface *iface)
++{
++ int width = hostapd_get_oper_chwidth(iface->conf);
++
++ if (!dfs_use_radar_background(iface))
++ return;
++
++ if (dfs_are_channels_overlapped(iface, iface->radar_background.freq,
++ width, iface->radar_background.centr_freq_seg0_idx,
++ iface->radar_background.centr_freq_seg1_idx))
++ iface->radar_background.channel = -1;
++}
++
++
+ static unsigned int dfs_get_cac_time(struct hostapd_iface *iface,
+ int start_chan_idx, int n_chans)
+ {
+@@ -1142,6 +1156,8 @@ static void hostapd_dfs_update_background_chain(struct hostapd_iface *iface)
+ &oper_centr_freq_seg1_idx,
+ &channel_type);
+ if (!channel ||
++ channel->chan == iface->conf->channel ||
++ channel->chan == iface->radar_background.channel ||
+ hostapd_start_dfs_cac(iface, iface->conf->hw_mode,
+ channel->freq, channel->chan,
+ iface->conf->ieee80211n,
+@@ -1386,6 +1402,7 @@ static int hostapd_dfs_start_channel_switch_cac(struct hostapd_iface *iface)
+ hostapd_set_oper_centr_freq_seg1_idx(iface->conf,
+ oper_centr_freq_seg1_idx);
+ err = 0;
++ dfs_check_background_overlapped(iface);
+
+ hostapd_setup_interface_complete(iface, err);
+ return err;
+@@ -1513,6 +1530,7 @@ static int hostapd_dfs_start_channel_switch(struct hostapd_iface *iface)
+ hostapd_set_oper_centr_freq_seg1_idx(
+ iface->conf, oper_centr_freq_seg1_idx);
+
++ dfs_check_background_overlapped(iface);
+ hostapd_disable_iface(iface);
+ hostapd_enable_iface(iface);
+ return 0;
+--
+2.18.0
+