developer | 8b64f1a | 2023-05-02 10:31:58 +0800 | [diff] [blame] | 1 | From 0aa1200534c41279f5f05e1919040a86f003ca0a Mon Sep 17 00:00:00 2001 |
developer | 6ce3b61 | 2023-03-02 20:22:29 +0800 | [diff] [blame] | 2 | From: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 3 | Date: Mon, 20 Feb 2023 16:58:20 +0800 |
developer | 8b64f1a | 2023-05-02 10:31:58 +0800 | [diff] [blame] | 4 | Subject: [PATCH 19/29] hostapd: mtk: Fix auto ht issue when switching to DFS |
developer | f552fec | 2023-03-27 11:22:06 +0800 | [diff] [blame] | 5 | channel |
developer | 6ce3b61 | 2023-03-02 20:22:29 +0800 | [diff] [blame] | 6 | |
| 7 | Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 8 | --- |
developer | 8b64f1a | 2023-05-02 10:31:58 +0800 | [diff] [blame] | 9 | hostapd/ctrl_iface.c | 13 +++++++------ |
| 10 | 1 file changed, 7 insertions(+), 6 deletions(-) |
developer | 6ce3b61 | 2023-03-02 20:22:29 +0800 | [diff] [blame] | 11 | |
| 12 | diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c |
developer | 8b64f1a | 2023-05-02 10:31:58 +0800 | [diff] [blame] | 13 | index 61c9e80..06cbea1 100644 |
developer | 6ce3b61 | 2023-03-02 20:22:29 +0800 | [diff] [blame] | 14 | --- a/hostapd/ctrl_iface.c |
| 15 | +++ b/hostapd/ctrl_iface.c |
developer | 8b64f1a | 2023-05-02 10:31:58 +0800 | [diff] [blame] | 16 | @@ -2698,6 +2698,13 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface, |
developer | 6ce3b61 | 2023-03-02 20:22:29 +0800 | [diff] [blame] | 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; |
developer | 8b64f1a | 2023-05-02 10:31:58 +0800 | [diff] [blame] | 24 | + settings.freq_params.eht_enabled = iface->conf->ieee80211be; |
developer | 6ce3b61 | 2023-03-02 20:22:29 +0800 | [diff] [blame] | 25 | + } |
| 26 | + |
| 27 | if (settings.freq_params.center_freq1) |
| 28 | dfs_range += hostapd_is_dfs_overlap( |
| 29 | iface, bandwidth, settings.freq_params.center_freq1); |
developer | 8b64f1a | 2023-05-02 10:31:58 +0800 | [diff] [blame] | 30 | @@ -2735,12 +2742,6 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface, |
developer | 6ce3b61 | 2023-03-02 20:22:29 +0800 | [diff] [blame] | 31 | 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 | -- |
| 44 | 2.18.0 |
| 45 | |