blob: d5f0daccc7805b41f8ee79548bc1899ad67288db [file] [log] [blame]
developer40912902023-06-09 10:29:18 +08001From a71a78bc51b74d331aeb3f900c03480d058d5233 Mon Sep 17 00:00:00 2001
developer9a3c8b32023-02-20 17:37:56 +08002From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
3Date: Mon, 20 Feb 2023 16:58:20 +0800
developer40912902023-06-09 10:29:18 +08004Subject: [PATCH] hostapd: mtk: Fix auto ht issue when switching to DFS channel
developer9a3c8b32023-02-20 17:37:56 +08005
6Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
7---
developer40912902023-06-09 10:29:18 +08008 hostapd/ctrl_iface.c | 12 ++++++------
9 1 file changed, 6 insertions(+), 6 deletions(-)
developer9a3c8b32023-02-20 17:37:56 +080010
11diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
developer40912902023-06-09 10:29:18 +080012index 61c9e80..c33b7a4 100644
developer9a3c8b32023-02-20 17:37:56 +080013--- a/hostapd/ctrl_iface.c
14+++ b/hostapd/ctrl_iface.c
developer40912902023-06-09 10:29:18 +080015@@ -2698,6 +2698,12 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
developer9a3c8b32023-02-20 17:37:56 +080016 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);
developer40912902023-06-09 10:29:18 +080028@@ -2735,12 +2741,6 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
developer9a3c8b32023-02-20 17:37:56 +080029 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