]> bbs.cooldavid.org Git - net-next-2.6.git/commit
rt2x00: Move USB tx/rx done handling to workqueue
authorIvo van Doorn <ivdoorn@gmail.com>
Fri, 6 Aug 2010 18:45:38 +0000 (20:45 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 16 Aug 2010 19:26:41 +0000 (15:26 -0400)
commit7e613e1666d59b5364f7918b3427bf328ac5f9ca
tree147a7175901e86129dbe442095816da0f8eb7969
parentc17512d846a4b063c8d3e708d82c0664d9c7182e
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>
drivers/net/wireless/rt2x00/rt2x00.h
drivers/net/wireless/rt2x00/rt2x00dev.c
drivers/net/wireless/rt2x00/rt2x00queue.c
drivers/net/wireless/rt2x00/rt2x00queue.h
drivers/net/wireless/rt2x00/rt2x00usb.c