]> err.no Git - linux-2.6/commitdiff
rt2x00: kill URB for all TX queues during disable_radio()
authorIvo van Doorn <ivdoorn@gmail.com>
Mon, 23 Jun 2008 17:56:50 +0000 (19:56 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 27 Jun 2008 13:09:18 +0000 (09:09 -0400)
During rt2x00usb_disable_radio() all pending urb's should
be killed and not only those from 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/rt2x00usb.c

index 5593b9a83108476adf0635a9b81e82113585aa6c..83862e7f7aec1f03b4de6ea221f1d90491e30277 100644 (file)
@@ -284,6 +284,7 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
 {
        struct queue_entry_priv_usb *entry_priv;
        struct queue_entry_priv_usb_bcn *bcn_priv;
+       struct data_queue *queue;
        unsigned int i;
 
        rt2x00usb_vendor_request_sw(rt2x00dev, USB_RX_CONTROL, 0, 0,
@@ -292,9 +293,11 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
        /*
         * Cancel all queues.
         */
-       for (i = 0; i < rt2x00dev->rx->limit; i++) {
-               entry_priv = rt2x00dev->rx->entries[i].priv_data;
-               usb_kill_urb(entry_priv->urb);
+       queue_for_each(rt2x00dev, queue) {
+               for (i = 0; i < queue->limit; i++) {
+                       entry_priv = queue->entries[i].priv_data;
+                       usb_kill_urb(entry_priv->urb);
+               }
        }
 
        /*