iwlwifi: mvm: disable aggregation queues in station DB in FW
authorJohannes Berg <johannes.berg@intel.com>
Tue, 5 Aug 2014 13:24:44 +0000 (15:24 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 14 Sep 2014 09:56:38 +0000 (12:56 +0300)
When disabling aggregation, disable the queues in the station
DB in the firmware, otherwise we leave the tfd_queue_mask in
a wrong state after an aggregation session has been torn down.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/sta.c

index dd9f3a4347f6ad40f1e0992eedbcf0307f976615..666f16b4bed9e5da9a2a943c44c9873faf5b0729 100644 (file)
@@ -948,8 +948,16 @@ int iwl_mvm_sta_tx_agg_stop(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                }
 
                tid_data->ssn = 0xffff;
+               tid_data->state = IWL_AGG_OFF;
+               mvm->queue_to_mac80211[txq_id] = IWL_INVALID_MAC80211_QUEUE;
+               spin_unlock_bh(&mvmsta->lock);
+
+               ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
+
+               iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false);
+
                iwl_trans_txq_disable(mvm->trans, txq_id, true);
-               /* fall through */
+               return 0;
        case IWL_AGG_STARTING:
        case IWL_EMPTYING_HW_QUEUE_ADDBA:
                /*
@@ -1003,6 +1011,8 @@ int iwl_mvm_sta_tx_agg_flush(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                if (iwl_mvm_flush_tx_path(mvm, BIT(txq_id), true))
                        IWL_ERR(mvm, "Couldn't flush the AGG queue\n");
 
+               iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false);
+
                iwl_trans_txq_disable(mvm->trans, tid_data->txq_id, true);
        }