Commit 4e808a38 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville

rt2x00: rt2800usb: fix status register reread logic

Another good catch from Jakub Kicinski. This patch fixes my
recent commit: ed61e2b0
"rt2x00: rt2800usb: rework txdone code"

We should reread status register only when nobody else start already
reading status i.e. test_and_set_bit(TX_STATUS_READING, flags) return 0.
Reported-by: default avatarJakub Kicinski <moorray@wp.pl>
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b9fc1061
......@@ -184,7 +184,7 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev,
* here again if status reading is needed.
*/
if (rt2800usb_txstatus_pending(rt2x00dev) &&
test_and_set_bit(TX_STATUS_READING, &rt2x00dev->flags))
!test_and_set_bit(TX_STATUS_READING, &rt2x00dev->flags))
return true;
else
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment