developer | 4091290 | 2023-06-09 10:29:18 +0800 | [diff] [blame^] | 1 | From a71a78bc51b74d331aeb3f900c03480d058d5233 Mon Sep 17 00:00:00 2001 |
developer | 9a3c8b3 | 2023-02-20 17:37:56 +0800 | [diff] [blame] | 2 | From: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 3 | Date: Mon, 20 Feb 2023 16:58:20 +0800 |
developer | 4091290 | 2023-06-09 10:29:18 +0800 | [diff] [blame^] | 4 | Subject: [PATCH] hostapd: mtk: Fix auto ht issue when switching to DFS channel |
developer | 9a3c8b3 | 2023-02-20 17:37:56 +0800 | [diff] [blame] | 5 | |
| 6 | Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 7 | --- |
developer | 4091290 | 2023-06-09 10:29:18 +0800 | [diff] [blame^] | 8 | hostapd/ctrl_iface.c | 12 ++++++------ |
| 9 | 1 file changed, 6 insertions(+), 6 deletions(-) |
developer | 9a3c8b3 | 2023-02-20 17:37:56 +0800 | [diff] [blame] | 10 | |
| 11 | diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c |
developer | 4091290 | 2023-06-09 10:29:18 +0800 | [diff] [blame^] | 12 | index 61c9e80..c33b7a4 100644 |
developer | 9a3c8b3 | 2023-02-20 17:37:56 +0800 | [diff] [blame] | 13 | --- a/hostapd/ctrl_iface.c |
| 14 | +++ b/hostapd/ctrl_iface.c |
developer | 4091290 | 2023-06-09 10:29:18 +0800 | [diff] [blame^] | 15 | @@ -2698,6 +2698,12 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface, |
developer | 9a3c8b3 | 2023-02-20 17:37:56 +0800 | [diff] [blame] | 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); |
developer | 4091290 | 2023-06-09 10:29:18 +0800 | [diff] [blame^] | 28 | @@ -2735,12 +2741,6 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface, |
developer | 9a3c8b3 | 2023-02-20 17:37:56 +0800 | [diff] [blame] | 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 | -- |
| 42 | 2.18.0 |
| 43 | |