diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-11-10 11:10:15 +0200 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-11-24 08:30:32 +0200 |
commit | 4500e13376a14d601a330cab034499ca3fff41bd (patch) | |
tree | 0d48fb7a06921ec64ed1e40e48df9d8349043db2 /drivers/net/wireless/iwlwifi/mvm/mac80211.c | |
parent | dc88b4baa9d16fdf15f76b6277461e6d9e4eb8e6 (diff) | |
download | talos-obmc-linux-4500e13376a14d601a330cab034499ca3fff41bd.tar.gz talos-obmc-linux-4500e13376a14d601a330cab034499ca3fff41bd.zip |
iwlwifi: mvm: schedule CSA time event a bit before beacon 1
Instead of using a hardcoded number of TUs before beacon 0 as the time
to start the absence and actual channel switch, calculate it in
relation to the beacon interval. We use 10 TUs + beacon interval
before beacon 0 to target a bit before beacon 1. This gives us enough
time to switch to the new channel before the AP/GO switches.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mac80211.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index ac1cef6a6b03..3ce5831ff206 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -3189,14 +3189,18 @@ static int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw, break; case NL80211_IFTYPE_STATION: - apply_time = chsw->timestamp + - (vif->bss_conf.beacon_int * chsw->count * 1024); + /* Schedule the time event to a bit before beacon 1, + * to make sure we're in the new channel when the + * GO/AP arrives. + */ + apply_time = chsw->device_timestamp + + ((vif->bss_conf.beacon_int * (chsw->count - 1) - + IWL_MVM_CHANNEL_SWITCH_TIME_CLIENT) * 1024); if (chsw->block_tx) iwl_mvm_csa_client_absent(mvm, vif); - iwl_mvm_schedule_csa_period(mvm, vif, - IWL_MVM_CHANNEL_SWITCH_TIME_CLIENT, + iwl_mvm_schedule_csa_period(mvm, vif, vif->bss_conf.beacon_int, apply_time); break; default: |