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@xxxxxxxxxxxxx> --- wpa_supplicant/events.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 || -- 2.11.0 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap