Skip to content

Commit

Permalink
rt2x00: rt2800usb: fix status register reread logic
Browse files Browse the repository at this point in the history
Another good catch from Jakub Kicinski. This patch fixes my
recent commit: ed61e2b
"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: Jakub Kicinski <moorray@wp.pl>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Stanislaw Gruszka authored and John W. Linville committed Mar 26, 2012
1 parent b9fc106 commit 4e808a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/rt2x00/rt2800usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4e808a3

Please sign in to comment.