[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
28f61ae6 [MAC80211][wed][init all msdu_pg cnt to support kite]
78a4b72a [mac80211][wifi6][mt76][Disable HW amsdu when using fixed rate]
807a22eb [MAC80211][WiFi6][mt76][Add obss_interval config add with ht_coex]
593fe440 [[MAC80211][WiFi6][mt76][fix build fail of netifd and mt76]
b98e772b [MAC80211][wifi7][core][remove antenna_gain patch]
2972a3e1 [MAC80211][wifi7][hostapd][Bandwidth Synchronization in AP/STA Mode]
9b6e8826 [MAC80211][wifi7][hostapd][rebase internal hostapd patches based on AP/STA ucode reimplmentation]
d744b79d [MAC80211][WiFi6][mt76][Rebase patch to fix patch error]
c515ae02 [MAC80211][WiFi6][mt76][Add enable/disable Spatial Reuse through debugfs]
2f85da88 [MAC80211][wifi6][mt76][revert sta BMC entry changes]
b951ede7 [MAC80211][WiFi7][netifd][Add default on background radar and background cert mode for SQC]
19d775bb [mac80211][wifi6/7][netifd][fix disabling radio via config if reconf is being used]
1a93ff79 [mac80211][rebase patches][fix build fail]
5d344b22 [mac80211][wifi6][mt76][Update debugfs knob for token]
712d7c3c [MAC80211][hostapd][Avoid color switch when beacon is not set]
fdf67b0f [MAC80211][WiFi7][hostapd][Add the support for enable/disable AMSDU via mwctl]
e45abb8e [MAC80211][wifi6][mt76][Rebase][for upstream]
c7c60af7 [MAC80211][wifi6][mt76][sync some fixes]
34dd91c1 [MAC80211][WiFi7][core][Set MUEDCA AIFSn as 0 by default]
2d484b5b [MAC80211][hostapd][update op_class when AP channel switch]
92a260ee [MAC80211][wifi6][mt76][Check vif type before report cca and csa done]
dff81b67 [MAC80211][misc][Remove ipsec for mac80211 build]
0b2c5250 [MAC80211][wifi6][mt76][Add the mac80211 hw bmc ps buffer function.]
6f9e6b6a [MAC80211][misc][Rebase Patches][Fix patch fail issue]
b63830c1 [mac80211][wifi6][mt76][Remove per-bss counter in mt76]
b164bbc8 [mac80211][wifi6][mt76][fix debugfs for pleinfo and token_txd]
[Release-log]
Change-Id: I8e33ab1f14d32ae3395e40bbba263455fcbe9707
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0027-hostapd-mtk-Fix-background-channel-overlapping-opera.patch b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0027-hostapd-mtk-Fix-background-channel-overlapping-opera.patch
new file mode 100644
index 0000000..1134253
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/mtk-0027-hostapd-mtk-Fix-background-channel-overlapping-opera.patch
@@ -0,0 +1,64 @@
+From b79b625e3790f0d9152f736629fbc0dcd826bf62 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 27/40] hostapd: mtk: 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 2f5c86e..c9a9c6c 100644
+--- a/src/ap/dfs.c
++++ b/src/ap/dfs.c
+@@ -807,6 +807,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)
+ {
+@@ -1127,6 +1141,8 @@ static void hostpad_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,
+@@ -1361,6 +1377,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;
+@@ -1488,6 +1505,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
+