]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Update channel information after channel switch notification
authorPeng Xu <pxu@qca.qualcomm.com>
Mon, 24 Oct 2016 23:54:36 +0000 (16:54 -0700)
committerJouni Malinen <j@w1.fi>
Fri, 28 Oct 2016 20:58:23 +0000 (23:58 +0300)
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 <jouni@qca.qualcomm.com>
src/drivers/driver_nl80211_event.c

index dc7d5f142bc4d2c566beaa00ff92f4e1ee4c0b9f..c77e21ed49a0ed82df7ed9cea4126c75089bc1fe 100644 (file)
@@ -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);
 }