aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2x00usb.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-02-10 22:52:36 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:21 -0500
commit330e3f95b30d9616edd6df7646473179c159c00d (patch)
tree1c32b7cbfc75543f7e3916e8c2a3536b23e91044 /drivers/net/wireless/rt2x00/rt2x00usb.c
parentc1aa3dc7acc6b97a6251f9d000494569d57fddca (diff)
rt2x00: Kill guardian urb during disable_radio
When the radio is being disabled we should also kill the guardian urb which could still be pending in the device. 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.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index 450043b6177..6cb4432e1ee 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -378,6 +378,7 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
{
struct queue_entry_priv_usb_rx *priv_rx;
struct queue_entry_priv_usb_tx *priv_tx;
+ struct queue_entry_priv_usb_bcn *priv_bcn;
struct data_queue *queue;
unsigned int i;
@@ -392,12 +393,28 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
usb_kill_urb(priv_rx->urb);
}
- txall_queue_for_each(rt2x00dev, queue) {
+ tx_queue_for_each(rt2x00dev, queue) {
for (i = 0; i < queue->limit; i++) {
priv_tx = queue->entries[i].priv_data;
usb_kill_urb(priv_tx->urb);
}
}
+
+ for (i = 0; i < rt2x00dev->bcn->limit; i++) {
+ priv_bcn = rt2x00dev->bcn->entries[i].priv_data;
+ usb_kill_urb(priv_bcn->urb);
+
+ if (priv_bcn->guardian_urb)
+ usb_kill_urb(priv_bcn->guardian_urb);
+ }
+
+ if (!test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags))
+ return;
+
+ for (i = 0; i < rt2x00dev->bcn[1].limit; i++) {
+ priv_tx = rt2x00dev->bcn[1].entries[i].priv_data;
+ usb_kill_urb(priv_tx->urb);
+ }
}
EXPORT_SYMBOL_GPL(rt2x00usb_disable_radio);