mac80211: Fix tx queue handling during scans
[deliverable/linux.git] / net / mac80211 / tx.c
index 2ef0e19b06bb041c58d217e48e5e3d9ade30d7d2..f476aa6a771d7feb8ac54faba8404f30265f604d 100644 (file)
@@ -1230,6 +1230,21 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
                spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
                if (local->queue_stop_reasons[q] ||
                    (!txpending && !skb_queue_empty(&local->pending[q]))) {
+                       if (unlikely(info->flags &
+                                       IEEE80211_TX_INTFL_OFFCHAN_TX_OK &&
+                                    local->queue_stop_reasons[q] &
+                                       ~BIT(IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL))) {
+                               /*
+                                * Drop off-channel frames if queues are stopped
+                                * for any reason other than off-channel
+                                * operation. Never queue them.
+                                */
+                               spin_unlock_irqrestore(
+                                       &local->queue_stop_reason_lock, flags);
+                               ieee80211_purge_tx_queue(&local->hw, skbs);
+                               return true;
+                       }
+
                        /*
                         * Since queue is stopped, queue up frames for later
                         * transmission from the tx-pending tasklet when the
This page took 0.02557 seconds and 5 git commands to generate.