diff mbox series

[v2,02/12] mesh: update ssid->frequency as pri/sec channel switch

Message ID 20200630121907.132751-3-markus.theil@tu-ilmenau.de
State New
Headers show
Series mesh: support for DFS | expand

Commit Message

Markus Theil June 30, 2020, 12:18 p.m. UTC
From: Peter Oh <peter.oh@bowerswilkins.com>

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

Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
---
 wpa_supplicant/mesh.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index 1453bdc01..778541bc0 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -299,6 +299,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;