Skip to content

Commit

Permalink
rt2800usb: handle TX status timeouts
Browse files Browse the repository at this point in the history
The watchdog just triggers rt2800usb_work_txdone() when it
detects a TX status timeout, thus rt2800usb_work_txdone() needs to
handle this case.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Stezenbach authored and John W. Linville committed Apr 19, 2011
1 parent 75256f0 commit 6e6d693
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/net/wireless/rt2x00/rt2800usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,14 @@ static void rt2800usb_work_txdone(struct work_struct *work)
while (!rt2x00queue_empty(queue)) {
entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE);

if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) ||
!test_bit(ENTRY_DATA_IO_FAILED, &entry->flags))
if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
break;
if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags))
rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE);
else if (rt2x00queue_status_timeout(entry))
rt2x00lib_txdone_noinfo(entry, TXDONE_UNKNOWN);
else
break;

rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE);
}
}
}
Expand Down

0 comments on commit 6e6d693

Please sign in to comment.