Commit 074c0bf0 authored by Luciano Coelho's avatar Luciano Coelho Committed by Luis Henriques

mac80211: schedule the actual switch of the station before CSA count 0

commit ff1e417c upstream.

Due to the time it takes to process the beacon that started the CSA
process, we may be late for the switch if we try to reach exactly
beacon 0.  To avoid that, use count - 1 when calculating the switch time.
Reported-by: default avatarJouni Malinen <j@w1.fi>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent da82b513
......@@ -1136,7 +1136,8 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
ieee80211_queue_work(&local->hw, &ifmgd->chswitch_work);
else
mod_timer(&ifmgd->chswitch_timer,
TU_TO_EXP_TIME(csa_ie.count * cbss->beacon_interval));
TU_TO_EXP_TIME((csa_ie.count - 1) *
cbss->beacon_interval));
}
static u32 ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment