iwlwifi: mvm: wait for the flushed queue only
authorSara Sharon <sara.sharon@intel.com>
Thu, 9 Mar 2017 11:09:03 +0000 (13:09 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 2 Jun 2017 11:07:50 +0000 (14:07 +0300)
The function flushed only agg queue and no more traffic
is queued on it.
However, it waits for all queues to empty, which is not
necessary and may take more time.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/sta.c

index bf105c6..9f74d4f 100644 (file)
@@ -2850,8 +2850,7 @@ int iwl_mvm_sta_tx_agg_flush(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                iwl_mvm_drain_sta(mvm, mvmsta, true);
                if (iwl_mvm_flush_tx_path(mvm, BIT(txq_id), 0))
                        IWL_ERR(mvm, "Couldn't flush the AGG queue\n");
-               iwl_trans_wait_tx_queues_empty(mvm->trans,
-                                              mvmsta->tfd_queue_msk);
+               iwl_trans_wait_tx_queues_empty(mvm->trans, BIT(txq_id));
                iwl_mvm_drain_sta(mvm, mvmsta, false);
 
                iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false);