From: Peng Xu Date: Mon, 24 Oct 2016 23:54:36 +0000 (-0700) Subject: nl80211: Update channel information after channel switch notification X-Git-Tag: hostap_2_7~2168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2ad5b9218f33d6f4b97d779c4928d71d82ad02c;p=thirdparty%2Fhostap.git 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 --- 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); }