aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00usb.c
diff options
context:
space:
mode:
authorJohannes Stezenbach <js@sig21.net>2011-04-18 09:30:36 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-19 15:39:35 -0400
commitf0187a1987ed6524518ff2a533eaf8394ac1a500 (patch)
tree0a7afe2f25e10c3be912103afb6bec7586868d94 /drivers/net/wireless/rt2x00/rt2x00usb.c
parent6e6d6932a3f525d734f6c2f5845e9cadfaeddce9 (diff)
rt2800usb: add timer to handle TX_STA_FIFO
TX status is reported by the hardware when a packet has been sent (or after TX failed after possible retries), which is some time after the DMA completion. Since the rt2800usb hardware can not signal interrupts we have to use a timer, otherwise the TX status would only be read by the next packet's TX DMA completion, or by the watchdog thread. 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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index 14736e217947..34b8a887831b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -280,7 +280,9 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
280 * Schedule the delayed work for reading the TX status 280 * Schedule the delayed work for reading the TX status
281 * from the device. 281 * from the device.
282 */ 282 */
283 queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work); 283 if (!test_bit(REQUIRE_TXSTATUS_FIFO, &rt2x00dev->cap_flags) ||
284 !kfifo_is_empty(&rt2x00dev->txstatus_fifo))
285 queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work);
284} 286}
285 287
286static bool rt2x00usb_kick_tx_entry(struct queue_entry *entry, void* data) 288static bool rt2x00usb_kick_tx_entry(struct queue_entry *entry, void* data)
@@ -816,6 +818,7 @@ int rt2x00usb_probe(struct usb_interface *usb_intf,
816 818
817 INIT_WORK(&rt2x00dev->rxdone_work, rt2x00usb_work_rxdone); 819 INIT_WORK(&rt2x00dev->rxdone_work, rt2x00usb_work_rxdone);
818 INIT_WORK(&rt2x00dev->txdone_work, rt2x00usb_work_txdone); 820 INIT_WORK(&rt2x00dev->txdone_work, rt2x00usb_work_txdone);
821 init_timer(&rt2x00dev->txstatus_timer);
819 822
820 retval = rt2x00usb_alloc_reg(rt2x00dev); 823 retval = rt2x00usb_alloc_reg(rt2x00dev);
821 if (retval) 824 if (retval)