From: Stanislaw Gruszka Date: Fri, 6 Jan 2017 13:05:17 +0000 (+0100) Subject: rt2x00: do not flush empty queue X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=51583248187cf224485327aed54b64c348f415dc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git rt2x00: do not flush empty queue Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo --- 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);