From c2ad5b9218f33d6f4b97d779c4928d71d82ad02c Mon Sep 17 00:00:00 2001 From: Peng Xu Date: Mon, 24 Oct 2016 16:54:36 -0700 Subject: [PATCH] nl80211: Update channel information after channel switch notification When channel switch happens, driver wrapper's internal channel information needs to be updated so that the new frequency will be used in operations using drv->assoc_freq. Previously, only bss->freq was updated and the new frequency was also indicated in the EVENT_CH_SWITCH event. This could potentially leave out couple of cases that use drv->assoc_freq at least as a fallback mechanism for getting the current operating frequency. Signed-off-by: Jouni Malinen --- src/drivers/driver_nl80211_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index dc7d5f142..c77e21ed4 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -518,6 +518,7 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv, data.ch_switch.cf2 = nla_get_u32(cf2); bss->freq = data.ch_switch.freq; + drv->assoc_freq = data.ch_switch.freq; wpa_supplicant_event(bss->ctx, EVENT_CH_SWITCH, &data); }