rt2x00: do not pause queue unconditionally on error path
authorStanislaw Gruszka <sgruszka@redhat.com>
Tue, 19 Dec 2017 11:33:56 +0000 (12:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Apr 2018 10:31:08 +0000 (12:31 +0200)
commiteb49779a13d9639e51f3dc0cd7307750eddecc23
tree09de2a2e0dca2b83fc3f3cdbae7dea1d42b2b80b
parent14d7f455a4da4117078e9324422832fb2d06c4b8
rt2x00: do not pause queue unconditionally on error path

[ Upstream commit 6dd80efd75ce7c2dbd9f117cf585ee2b33a42ee1 ]

Pausing queue without checking threshold is racy with txdone path.
Moreover we do not need pause queue on any error, but only if queue
is full - in case when we send RTS frame ( other cases of almost full
queue are already handled in rt2x00queue_write_tx_frame() ).

Patch fixes of theoretically possible problem of pausing empty
queue.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Tested-by: Enrico Mioso <mrkiko.rs@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ralink/rt2x00/rt2x00mac.c