aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/sta.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/sta.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/sta.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/sta.c b/drivers/net/wireless/iwlwifi/mvm/sta.c
index 8b302774b70c..44add291531b 100644
--- a/drivers/net/wireless/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/iwlwifi/mvm/sta.c
@@ -914,6 +914,7 @@ int iwl_mvm_sta_tx_agg_flush(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
914 struct iwl_mvm_sta *mvmsta = (void *)sta->drv_priv; 914 struct iwl_mvm_sta *mvmsta = (void *)sta->drv_priv;
915 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; 915 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid];
916 u16 txq_id; 916 u16 txq_id;
917 enum iwl_mvm_agg_state old_state;
917 918
918 /* 919 /*
919 * First set the agg state to OFF to avoid calling 920 * First set the agg state to OFF to avoid calling
@@ -923,13 +924,17 @@ int iwl_mvm_sta_tx_agg_flush(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
923 txq_id = tid_data->txq_id; 924 txq_id = tid_data->txq_id;
924 IWL_DEBUG_TX_QUEUES(mvm, "Flush AGG: sta %d tid %d q %d state %d\n", 925 IWL_DEBUG_TX_QUEUES(mvm, "Flush AGG: sta %d tid %d q %d state %d\n",
925 mvmsta->sta_id, tid, txq_id, tid_data->state); 926 mvmsta->sta_id, tid, txq_id, tid_data->state);
927 old_state = tid_data->state;
926 tid_data->state = IWL_AGG_OFF; 928 tid_data->state = IWL_AGG_OFF;
927 spin_unlock_bh(&mvmsta->lock); 929 spin_unlock_bh(&mvmsta->lock);
928 930
929 if (iwl_mvm_flush_tx_path(mvm, BIT(txq_id), true)) 931 if (old_state >= IWL_AGG_ON) {
930 IWL_ERR(mvm, "Couldn't flush the AGG queue\n"); 932 if (iwl_mvm_flush_tx_path(mvm, BIT(txq_id), true))
933 IWL_ERR(mvm, "Couldn't flush the AGG queue\n");
934
935 iwl_trans_txq_disable(mvm->trans, tid_data->txq_id);
936 }
931 937
932 iwl_trans_txq_disable(mvm->trans, tid_data->txq_id);
933 mvm->queue_to_mac80211[tid_data->txq_id] = 938 mvm->queue_to_mac80211[tid_data->txq_id] =
934 IWL_INVALID_MAC80211_QUEUE; 939 IWL_INVALID_MAC80211_QUEUE;
935 940