提交 4e808a38 编写于 作者: S Stanislaw Gruszka 提交者: 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: NJakub Kicinski <moorray@wp.pl>
Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: NGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 b9fc1061
...@@ -184,7 +184,7 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev, ...@@ -184,7 +184,7 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev,
* here again if status reading is needed. * here again if status reading is needed.
*/ */
if (rt2800usb_txstatus_pending(rt2x00dev) && 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; return true;
else else
return false; return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册