OSDN Git Service

rt2x00: do not flush empty queue
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 6 Jan 2017 13:05:17 +0000 (14:05 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 17 Jan 2017 11:58:38 +0000 (13:58 +0200)
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2x00mac.c

index 3cc1384..ecc9631 100644 (file)
@@ -743,7 +743,8 @@ void rt2x00mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                return;
 
        tx_queue_for_each(rt2x00dev, queue)
-               rt2x00queue_flush_queue(queue, drop);
+               if (!rt2x00queue_empty(queue))
+                       rt2x00queue_flush_queue(queue, drop);
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_flush);