Skip to content

Commit

Permalink
mac80211: schedule the actual switch of the station before CSA count 0
Browse files Browse the repository at this point in the history
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.

Cc: stable@vger.kernel.org
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>
  • Loading branch information
Luciano Coelho authored and Johannes Berg committed Oct 29, 2014
1 parent 84469a4 commit ff1e417
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,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 bool
Expand Down

0 comments on commit ff1e417

Please sign in to comment.