blob: c53b55a8dab88fdcf2247363716f4570ba0f64a1 [file] [log] [blame]
developer683be522023-05-11 14:24:50 +08001From 3237a993233da052219018eec10ca82d79225fdb Mon Sep 17 00:00:00 2001
2From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
3Date: Mon, 20 Feb 2023 16:58:20 +0800
4Subject: [PATCH 18/28] hostapd: mtk: Fix auto ht issue when switching to DFS
5 channel
6
7Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
8---
9 hostapd/ctrl_iface.c | 12 ++++++------
10 1 file changed, 6 insertions(+), 6 deletions(-)
11
12diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
13index 07de0ad..be86f6c 100644
14--- a/hostapd/ctrl_iface.c
15+++ b/hostapd/ctrl_iface.c
16@@ -2773,6 +2773,12 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
17 break;
18 }
19
20+ if (os_strstr(pos, " auto-ht")) {
21+ settings.freq_params.ht_enabled = iface->conf->ieee80211n;
22+ settings.freq_params.vht_enabled = iface->conf->ieee80211ac;
23+ settings.freq_params.he_enabled = iface->conf->ieee80211ax;
24+ }
25+
26 if (settings.freq_params.center_freq1)
27 dfs_range += hostapd_is_dfs_overlap(
28 iface, bandwidth, settings.freq_params.center_freq1);
29@@ -2810,12 +2816,6 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
30 return 0;
31 }
32
33- if (os_strstr(pos, " auto-ht")) {
34- settings.freq_params.ht_enabled = iface->conf->ieee80211n;
35- settings.freq_params.vht_enabled = iface->conf->ieee80211ac;
36- settings.freq_params.he_enabled = iface->conf->ieee80211ax;
37- }
38-
39 for (i = 0; i < iface->num_bss; i++) {
40
41 /* Save CHAN_SWITCH VHT, HE, and EHT config */
42--
432.18.0
44