diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-10-28 13:33:05 +0200 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-11-19 18:38:18 +0100 |
commit | e7ba6308e5c4725632baf8a55332b050e510af5d (patch) | |
tree | d83f387b425057f4b021f10fb766aa80e6af1d8d | |
parent | 3a5a7cd8d92bf9d5a42694a5bebc37934561602d (diff) | |
download | lwn-e7ba6308e5c4725632baf8a55332b050e510af5d.tar.gz lwn-e7ba6308e5c4725632baf8a55332b050e510af5d.zip |
mac80211: schedule the actual switch of the station before CSA count 0
commit ff1e417c7c239b7abfe70aa90460a77eaafc7f83 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: Jouni Malinen <j@w1.fi>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
-rw-r--r-- | net/mac80211/mlme.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 5fa4ee07dd7a..023bc33bab9a 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1265,7 +1265,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(count * cbss->beacon_interval)); + TU_TO_EXP_TIME((count - 1) * + cbss->beacon_interval)); } static u32 ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata, |