summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2015-01-21 11:50:31 +0200
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-03-01 16:55:04 +0200
commit51ec09af2d67f7d75402a2c8f5f1016de1d1945b (patch)
tree6075218f27e19f0756b71cf7d1ba15c30ede82be
parent7ac4a50a7ce31fc6350c05abc0c01a2c51725cb4 (diff)
downloadlwn-51ec09af2d67f7d75402a2c8f5f1016de1d1945b.tar.gz
lwn-51ec09af2d67f7d75402a2c8f5f1016de1d1945b.zip
iwlwifi: mvm: consider TDLS queues as used during drain
When a TDLS station is being drained its Tx queues are still in use. Don't allocate them to a different station in the meantime. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index 7bdc6220743f..f2bfc157f80f 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -244,6 +244,7 @@ static void iwl_mvm_mac_sta_hw_queues_iter(void *_data,
unsigned long iwl_mvm_get_used_hw_queues(struct iwl_mvm *mvm,
struct ieee80211_vif *exclude_vif)
{
+ u8 sta_id;
struct iwl_mvm_hw_queues_iface_iterator_data data = {
.exclude_vif = exclude_vif,
.used_hw_queues =
@@ -264,6 +265,13 @@ unsigned long iwl_mvm_get_used_hw_queues(struct iwl_mvm *mvm,
iwl_mvm_mac_sta_hw_queues_iter,
&data);
+ /*
+ * Some TDLS stations may be removed but are in the process of being
+ * drained. Don't touch their queues.
+ */
+ for_each_set_bit(sta_id, mvm->sta_drained, IWL_MVM_STATION_COUNT)
+ data.used_hw_queues |= mvm->tfd_drained[sta_id];
+
return data.used_hw_queues;
}