mesh: Update ssid->frequency as pri/sec channels switch

ssid->frequency is one of the variables used to get the channel number
from a given frequency. Leaving it as unchanged when pri/sec channel
switch will cause picking up a wrong channel number after applying the
secondary channel offset for HT40 and leads to failing interface
bring-up.

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
This commit is contained in:
Peter Oh 2020-06-30 14:18:57 +02:00 committed by Jouni Malinen
parent f1df4fbfc7
commit e3608040c4

View file

@ -301,6 +301,7 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
frequency == freq->freq + freq->sec_channel_offset * 20) {
wpa_printf(MSG_DEBUG, "mesh: pri/sec channels switched");
frequency = freq->freq;
ssid->frequency = frequency;
}
wpa_s->assoc_freq = frequency;
wpa_s->current_ssid = ssid;