|
|
@@ -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:
|