iwlwifi: mvm: stop static queues correctly
authorAvraham Stern <avraham.stern@intel.com>
Sun, 20 Jan 2019 09:33:57 +0000 (11:33 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 14 Feb 2019 09:29:52 +0000 (11:29 +0200)
AP interfaces still use some static TX queues (for probes,
broadcast and multicast frames). These queues were not stopped
correctly when the transport layer indicated the queue should be
stopped. As a result, when flushing the queues, new frames from
the overflow queue were tx'd, so the queues still had frames after
flushing. This ended up in an assert since trying to remove a station
with non-empty queues.

Fix it by stopping the static queues correctly when required.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/ops.c

index 0bdf92c..33053d1 100644 (file)
@@ -1125,6 +1125,12 @@ static void iwl_mvm_async_cb(struct iwl_op_mode *op_mode,
        iwl_trans_block_txq_ptrs(mvm->trans, false);
 }
 
+static int iwl_mvm_is_static_queue(struct iwl_mvm *mvm, int queue)
+{
+       return queue == mvm->aux_queue || queue == mvm->probe_queue ||
+               queue == mvm->p2p_dev_queue || queue == mvm->snif_queue;
+}
+
 static void iwl_mvm_queue_state_change(struct iwl_op_mode *op_mode,
                                       int hw_queue, bool start)
 {
@@ -1151,6 +1157,15 @@ static void iwl_mvm_queue_state_change(struct iwl_op_mode *op_mode,
                goto out;
        mvmsta = iwl_mvm_sta_from_mac80211(sta);
 
+       if (iwl_mvm_is_static_queue(mvm, hw_queue)) {
+               if (!start)
+                       ieee80211_stop_queues(mvm->hw);
+               else if (mvmsta->sta_state != IEEE80211_STA_NOTEXIST)
+                       ieee80211_wake_queues(mvm->hw);
+
+               goto out;
+       }
+
        if (iwl_mvm_has_new_tx_api(mvm)) {
                int tid = mvm->tvqm_info[hw_queue].txq_tid;