nl80211: Update freq only when CSA completes
In the case of the ap_csa_disable test, I frequently see failures due to the kernel *not* having switched, but the CSA-STARTED event having been processed, and thus the frequency having been updated already. This is wrong at least for AP mode, the frequency we store for this case internally in nl80211 should only be updated when the channel switch completes, otherwise we end up in a situation where the switch is aborted and the kernel is thus on the old channel, but the internal information has been updated and every subsequent mgmt-frame TX fails due to being tagged with the wrong channel. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
2a0db3eb5d
commit
b6f8b5a964
1 changed files with 2 additions and 1 deletions
|
@ -595,7 +595,8 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv,
|
||||||
if (cf2)
|
if (cf2)
|
||||||
data.ch_switch.cf2 = nla_get_u32(cf2);
|
data.ch_switch.cf2 = nla_get_u32(cf2);
|
||||||
|
|
||||||
bss->freq = data.ch_switch.freq;
|
if (finished)
|
||||||
|
bss->freq = data.ch_switch.freq;
|
||||||
drv->assoc_freq = data.ch_switch.freq;
|
drv->assoc_freq = data.ch_switch.freq;
|
||||||
|
|
||||||
wpa_supplicant_event(bss->ctx, finished ?
|
wpa_supplicant_event(bss->ctx, finished ?
|
||||||
|
|
Loading…
Reference in a new issue