aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00usb.c
diff options
context:
space:
mode:
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 450043b61773..6cb4432e1ee0 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)
378{ 378{
379 struct queue_entry_priv_usb_rx *priv_rx; 379 struct queue_entry_priv_usb_rx *priv_rx;
380 struct queue_entry_priv_usb_tx *priv_tx; 380 struct queue_entry_priv_usb_tx *priv_tx;
381 struct queue_entry_priv_usb_bcn *priv_bcn;
381 struct data_queue *queue; 382 struct data_queue *queue;
382 unsigned int i; 383 unsigned int i;
383 384
@@ -392,12 +393,28 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
392 usb_kill_urb(priv_rx->urb); 393 usb_kill_urb(priv_rx->urb);
393 } 394 }
394 395
395 txall_queue_for_each(rt2x00dev, queue) { 396 tx_queue_for_each(rt2x00dev, queue) {
396 for (i = 0; i < queue->limit; i++) { 397 for (i = 0; i < queue->limit; i++) {
397 priv_tx = queue->entries[i].priv_data; 398 priv_tx = queue->entries[i].priv_data;
398 usb_kill_urb(priv_tx->urb); 399 usb_kill_urb(priv_tx->urb);
399 } 400 }
400 } 401 }
402
403 for (i = 0; i < rt2x00dev->bcn->limit; i++) {
404 priv_bcn = rt2x00dev->bcn->entries[i].priv_data;
405 usb_kill_urb(priv_bcn->urb);
406
407 if (priv_bcn->guardian_urb)
408 usb_kill_urb(priv_bcn->guardian_urb);
409 }
410
411 if (!test_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags))
412 return;
413
414 for (i = 0; i < rt2x00dev->bcn[1].limit; i++) {
415 priv_tx = rt2x00dev->bcn[1].entries[i].priv_data;
416 usb_kill_urb(priv_tx->urb);
417 }
401} 418}
402EXPORT_SYMBOL_GPL(rt2x00usb_disable_radio); 419EXPORT_SYMBOL_GPL(rt2x00usb_disable_radio);
403 420