From 51583248187cf224485327aed54b64c348f415dc Mon Sep 17 00:00:00 2001 From: Stanislaw Gruszka Date: Fri, 6 Jan 2017 14:05:17 +0100 Subject: [PATCH] rt2x00: do not flush empty queue Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo --- drivers/net/wireless/ralink/rt2x00/rt2x00mac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c b/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c index 3cc1384ed2fc..ecc96312a370 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c @@ -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); -- 2.39.5