Message ID | 20191227122224.2766-1-sergey.matyukevich.os@quantenna.com |
---|---|
State | Accepted |
Headers | show |
Series | STA OBSS: update secondary channel info after CSA | expand |
On Fri, Dec 27, 2019 at 03:22:24PM +0300, Sergey Matyukevich wrote: > Field wpa_s->sme.ht_sec_chan keeps secondary channel for 40MHz band. This > field is used to prepare list of channels for STA OBSS scan. Initially > secondary channel is set to HT_SEC_CHAN_UNKNOWN. Later on, in function > wpa_obss_scan_freq_list it is obtained from current BSS HT operation IE. > However secondary channel information is not updated after channel switch, > which may lead to incorrect list of channels prepared for STA OBSS scan. > > This patch updates ht_sec_chan according to channel switch event data. Thanks, applied with a fix to avoid breaking builds without CONFIG_SME.
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index f034e5040..61c05fc57 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -4564,6 +4564,18 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event, wpa_s->assoc_freq = data->ch_switch.freq; wpa_s->current_ssid->frequency = data->ch_switch.freq; + switch (data->ch_switch.ch_offset) { + case 1: + wpa_s->sme.ht_sec_chan = HT_SEC_CHAN_ABOVE; + break; + case -1: + wpa_s->sme.ht_sec_chan = HT_SEC_CHAN_BELOW; + break; + default: + wpa_s->sme.ht_sec_chan = HT_SEC_CHAN_UNKNOWN; + break; + } + #ifdef CONFIG_AP if (wpa_s->current_ssid->mode == WPAS_MODE_AP || wpa_s->current_ssid->mode == WPAS_MODE_P2P_GO ||
Field wpa_s->sme.ht_sec_chan keeps secondary channel for 40MHz band. This field is used to prepare list of channels for STA OBSS scan. Initially secondary channel is set to HT_SEC_CHAN_UNKNOWN. Later on, in function wpa_obss_scan_freq_list it is obtained from current BSS HT operation IE. However secondary channel information is not updated after channel switch, which may lead to incorrect list of channels prepared for STA OBSS scan. This patch updates ht_sec_chan according to channel switch event data. Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> --- wpa_supplicant/events.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)