aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800usb.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2012-03-19 04:39:45 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-03-26 15:07:27 -0400
commitb9fc106108f3faf2e4430c3bd5721677c3d6a4a1 (patch)
tree8836fc8bfb3bc7973f86e0c4c03f198ad0f20e78 /drivers/net/wireless/rt2x00/rt2800usb.c
parentb603c03e9534b9bec19ebf8c42bf217fd875ee65 (diff)
rt2x00: rt2800usb: schedule txdone work on timeout
This is fix for my current commit ed61e2b02027935520d1be884fac0b2ffce8379a "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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index cd490abced91..f97f84606f56 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -163,7 +163,13 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev,
163 163
164 /* Reschedule urb to read TX status again instantly */ 164 /* Reschedule urb to read TX status again instantly */
165 return true; 165 return true;
166 } else if (rt2800usb_txstatus_pending(rt2x00dev)) { 166 }
167
168 /* Check if there is any entry that timedout waiting on TX status */
169 if (rt2800usb_txstatus_timeout(rt2x00dev))
170 queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work);
171
172 if (rt2800usb_txstatus_pending(rt2x00dev)) {
167 /* Read register after 250 us */ 173 /* Read register after 250 us */
168 hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 250000), 174 hrtimer_start(&rt2x00dev->txstatus_timer, ktime_set(0, 250000),
169 HRTIMER_MODE_REL); 175 HRTIMER_MODE_REL);