aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00queue.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2010-08-06 14:45:38 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-16 15:26:41 -0400
commit7e613e1666d59b5364f7918b3427bf328ac5f9ca (patch)
tree147a7175901e86129dbe442095816da0f8eb7969 /drivers/net/wireless/rt2x00/rt2x00queue.h
parentc17512d846a4b063c8d3e708d82c0664d9c7182e (diff)
rt2x00: Move USB tx/rx done handling to workqueue
Move all TX and RX completion handling into a work structure, which is handeled on the mac80211 workqueue. This simplifies the code in rt2x00lib since it no longer needs to check if the device is USB or PCI to decide which mac80211 function should be used. In the watchdog some changes are needed since it can no longer rely on the TX completion function to be run while looping through the entries. (Both functions now work on the same workqueue, so this would deadlock). So the watchdog now waits for the URB to return, and handle the TX status report directly. As a side-effect, the debugfs entry for the RX queue now correctly displays the positions of the INDEX and INDEX_DONE counters. This also implies that it is not possible to perform checks like queue_empty() and queue_full() on the RX queue. 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/rt2x00queue.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
index 191e7775a9c0..38b47919c868 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
@@ -1,5 +1,5 @@
1/* 1/*
2 Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com> 2 Copyright (C) 2004 - 2010 Ivo van Doorn <IvDoorn@gmail.com>
3 <http://rt2x00.serialmonkey.com> 3 <http://rt2x00.serialmonkey.com>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
@@ -363,12 +363,16 @@ struct txentry_desc {
363 * the device has signaled it is done with it. 363 * the device has signaled it is done with it.
364 * @ENTRY_DATA_PENDING: This entry contains a valid frame and is waiting 364 * @ENTRY_DATA_PENDING: This entry contains a valid frame and is waiting
365 * for the signal to start sending. 365 * for the signal to start sending.
366 * @ENTRY_DATA_IO_FAILED: Hardware indicated that an IO error occured
367 * while transfering the data to the hardware. No TX status report will
368 * be expected from the hardware.
366 */ 369 */
367enum queue_entry_flags { 370enum queue_entry_flags {
368 ENTRY_BCN_ASSIGNED, 371 ENTRY_BCN_ASSIGNED,
369 ENTRY_OWNER_DEVICE_DATA, 372 ENTRY_OWNER_DEVICE_DATA,
370 ENTRY_OWNER_DEVICE_CRYPTO, 373 ENTRY_OWNER_DEVICE_CRYPTO,
371 ENTRY_DATA_PENDING, 374 ENTRY_DATA_PENDING,
375 ENTRY_DATA_IO_FAILED
372}; 376};
373 377
374/** 378/**