rt2x00: Move direct access to queue->entries to rt2x00queue.c
authorIvo van Doorn <ivdoorn@gmail.com>
Mon, 23 Aug 2010 17:54:21 +0000 (19:54 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 25 Aug 2010 18:34:54 +0000 (14:34 -0400)
commit5eb7efe8a4807d98a277280e1317e5094eedfb6b
tree124a1a599ff718cfd84bb441202fe251f65bda19
parentee1e755f84dfd5d482076c642fac830aafdc482b
rt2x00: Move direct access to queue->entries to rt2x00queue.c

All access to queue->entries through the Q_INDEX/Q_INDEX_DONE
variables must be done using spinlock protection. It is best
to manage this completely from rt2x00queue.c.

For safely looping through all entries in the queue, the function
rt2x00queue_for_each_entry is added which will walk from from a index
range in a safe manner.

This also fixes rt2x00usb which walked the entries list from
0 to length to kill each entry (killing entries must be done
from Q_INDEX_DONE to Q_INDEX to enforce TX status reporting to
occur in the correct order.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800pci.c
drivers/net/wireless/rt2x00/rt2x00queue.c
drivers/net/wireless/rt2x00/rt2x00queue.h
drivers/net/wireless/rt2x00/rt2x00usb.c