Skip to content

Commit

Permalink
iwlwifi: mvm: set the TX disable bit when doing a chanctx switch
Browse files Browse the repository at this point in the history
During a channel switch we should tell the firmware to disable TX
temporarily and re-enable it after the switch is done.

Signed-off-by: Luciano Coelho <[email protected]>
Reviewed-by: Johannes Berg <[email protected]>
Signed-off-by: Emmanuel Grumbach <[email protected]>
  • Loading branch information
lucacoelho authored and egrumbach committed Sep 3, 2014
1 parent 8b4139d commit 0ce04ce
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions drivers/net/wireless/iwlwifi/mvm/mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2748,6 +2748,19 @@ static int __iwl_mvm_assign_vif_chanctx(struct iwl_mvm *mvm,
iwl_mvm_mac_ctxt_changed(mvm, vif, false);
}

if (vif->csa_active && vif->type == NL80211_IFTYPE_STATION) {
struct iwl_mvm_sta *mvmsta;

mvmsta = iwl_mvm_sta_from_staid_protected(mvm,
mvmvif->ap_sta_id);

if (WARN_ON(!mvmsta))
goto out;

/* TODO: only re-enable after the first beacon */
iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, false);
}

goto out;

out_remove_binding:
Expand Down Expand Up @@ -2779,6 +2792,7 @@ static void __iwl_mvm_unassign_vif_chanctx(struct iwl_mvm *mvm,
{
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
struct ieee80211_vif *disabled_vif = NULL;
struct iwl_mvm_sta *mvmsta;

lockdep_assert_held(&mvm->mutex);

Expand Down Expand Up @@ -2810,6 +2824,12 @@ static void __iwl_mvm_unassign_vif_chanctx(struct iwl_mvm *mvm,

disabled_vif = vif;

mvmsta = iwl_mvm_sta_from_staid_protected(mvm,
mvmvif->ap_sta_id);

if (!WARN_ON(!mvmsta))
iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, true);

iwl_mvm_mac_ctxt_changed(mvm, vif, true);
break;
default:
Expand Down

0 comments on commit 0ce04ce

Please sign in to comment.