]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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:32:17 +0000 (12:32 +0200)
commitf722a6a611790bb14516e8bbe62953ec04e1a6b5
tree7b26dfac42ecf64e4226c99e1d260e2a297e7eca
parent1530dcc90331bfc96a46bb75275775531e8dba54
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