developer | 6ce3b61 | 2023-03-02 20:22:29 +0800 | [diff] [blame] | 1 | From 83ab1a9cc51225095842d3c62bf75cf4efe63075 Mon Sep 17 00:00:00 2001 |
| 2 | From: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 3 | Date: Mon, 20 Feb 2023 16:58:20 +0800 |
| 4 | Subject: [PATCH] hostapd: mtk: Fix auto ht issue when switching to DFS channel |
| 5 | |
| 6 | Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 7 | --- |
| 8 | hostapd/ctrl_iface.c | 12 ++++++------ |
| 9 | 1 file changed, 6 insertions(+), 6 deletions(-) |
| 10 | |
| 11 | diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c |
| 12 | index 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 | -- |
| 42 | 2.18.0 |
| 43 | |