]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
mesh: Update ssid->frequency as pri/sec channels switch
authorPeter Oh <peter.oh@bowerswilkins.com>
Tue, 30 Jun 2020 12:18:57 +0000 (14:18 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 30 Nov 2020 10:01:39 +0000 (12:01 +0200)
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>
wpa_supplicant/mesh.c

index 66f8311f1143e19683541b9e4fc4e05424e61070..b8fafa5dba8827ae2153f26a28b4423361d17ba9 100644 (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;