blob: f89da87f3ee50c8657bb4b2f53ad039c6c69b61d [file] [log] [blame]
developer8b64f1a2023-05-02 10:31:58 +08001From 0aa1200534c41279f5f05e1919040a86f003ca0a Mon Sep 17 00:00:00 2001
developer6ce3b612023-03-02 20:22:29 +08002From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
3Date: Mon, 20 Feb 2023 16:58:20 +0800
developer8b64f1a2023-05-02 10:31:58 +08004Subject: [PATCH 19/29] hostapd: mtk: Fix auto ht issue when switching to DFS
developerf552fec2023-03-27 11:22:06 +08005 channel
developer6ce3b612023-03-02 20:22:29 +08006
7Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
8---
developer8b64f1a2023-05-02 10:31:58 +08009 hostapd/ctrl_iface.c | 13 +++++++------
10 1 file changed, 7 insertions(+), 6 deletions(-)
developer6ce3b612023-03-02 20:22:29 +080011
12diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
developer8b64f1a2023-05-02 10:31:58 +080013index 61c9e80..06cbea1 100644
developer6ce3b612023-03-02 20:22:29 +080014--- a/hostapd/ctrl_iface.c
15+++ b/hostapd/ctrl_iface.c
developer8b64f1a2023-05-02 10:31:58 +080016@@ -2698,6 +2698,13 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
developer6ce3b612023-03-02 20:22:29 +080017 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;
developer8b64f1a2023-05-02 10:31:58 +080024+ settings.freq_params.eht_enabled = iface->conf->ieee80211be;
developer6ce3b612023-03-02 20:22:29 +080025+ }
26+
27 if (settings.freq_params.center_freq1)
28 dfs_range += hostapd_is_dfs_overlap(
29 iface, bandwidth, settings.freq_params.center_freq1);
developer8b64f1a2023-05-02 10:31:58 +080030@@ -2735,12 +2742,6 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface,
developer6ce3b612023-03-02 20:22:29 +080031 return 0;
32 }
33
34- if (os_strstr(pos, " auto-ht")) {
35- settings.freq_params.ht_enabled = iface->conf->ieee80211n;
36- settings.freq_params.vht_enabled = iface->conf->ieee80211ac;
37- settings.freq_params.he_enabled = iface->conf->ieee80211ax;
38- }
39-
40 for (i = 0; i < iface->num_bss; i++) {
41
42 /* Save CHAN_SWITCH VHT, HE, and EHT config */
43--
442.18.0
45