blob: 8340fd96b68d2168b5232a4f0630d1695516780c [file] [log] [blame]
developer9a3c8b32023-02-20 17:37:56 +08001From 83ab1a9cc51225095842d3c62bf75cf4efe63075 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] hostapd: mtk: Fix auto ht issue when switching to DFS channel
5
6Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
7---
8 hostapd/ctrl_iface.c | 12 ++++++------
9 1 file changed, 6 insertions(+), 6 deletions(-)
10
11diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
12index 0ad8451..407790f 100644
13--- a/hostapd/ctrl_iface.c
14+++ b/hostapd/ctrl_iface.c
15@@ -2698,6 +2698,12 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
16 break;
17 }
18
19+ if (os_strstr(pos, " auto-ht")) {
20+ settings.freq_params.ht_enabled = iface->conf->ieee80211n;
21+ settings.freq_params.vht_enabled = iface->conf->ieee80211ac;
22+ settings.freq_params.he_enabled = iface->conf->ieee80211ax;
23+ }
24+
25 if (settings.freq_params.center_freq1)
26 dfs_range += hostapd_is_dfs_overlap(
27 iface, bandwidth, settings.freq_params.center_freq1);
28@@ -2735,12 +2741,6 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
29 return 0;
30 }
31
32- if (os_strstr(pos, " auto-ht")) {
33- settings.freq_params.ht_enabled = iface->conf->ieee80211n;
34- settings.freq_params.vht_enabled = iface->conf->ieee80211ac;
35- settings.freq_params.he_enabled = iface->conf->ieee80211ax;
36- }
37-
38 for (i = 0; i < iface->num_bss; i++) {
39
40 /* Save CHAN_SWITCH VHT, HE, and EHT config */
41--
422.18.0
43