Skip to content

Commit

Permalink
rt2x00: rt2800usb: schedule txdone work on timeout
Browse files Browse the repository at this point in the history
This is fix for my current commit
ed61e2b
"rt2x00: rt2800usb: rework txdone code"

We should schedule txdone work on timeout, otherwise if newer get
tx status from hardware, we will never report tx status to mac80211
and eventually never wakeup tx queue.

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 b603c03 commit b9fc106
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/net/wireless/rt2x00/rt2800usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev,

/* Reschedule urb to read TX status again instantly */
return true;
} else if (rt2800usb_txstatus_pending(rt2x00dev)) {
}

/* Check if there is any entry that timedout waiting on TX status */
if (rt2800usb_txstatus_timeout(rt2x00dev))
queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work);

if (rt2800usb_txstatus_pending(rt2x00dev)) {
/* Read register after 250 us */
hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 250000),
HRTIMER_MODE_REL);
Expand Down

0 comments on commit b9fc106

Please sign in to comment.