]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/rt2x00/rt2x00usb.c
rt2x00: Fix TX status reporting
[linux-2.6] / drivers / net / wireless / rt2x00 / rt2x00usb.c
index 5a331674dcb2384c036f77b08aa79f93b819946a..caee65e821986ce4caebec5a71d4fb067f9f73b3 100644 (file)
@@ -147,8 +147,17 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
 
        /*
         * Obtain the status about this packet.
+        * Note that when the status is 0 it does not mean the
+        * frame was send out correctly. It only means the frame
+        * was succesfully pushed to the hardware, we have no
+        * way to determine the transmission status right now.
+        * (Only indirectly by looking at the failed TX counters
+        * in the register).
         */
-       txdesc.status = !urb->status ? TX_SUCCESS : TX_FAIL_RETRY;
+       if (!urb->status)
+               __set_bit(TXDONE_UNKNOWN, &txdesc.flags);
+       else
+               __set_bit(TXDONE_FAILURE, &txdesc.flags);
        txdesc.retry = 0;
        txdesc.control = &priv_tx->control;
 
@@ -186,7 +195,7 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev,
                ERROR(rt2x00dev,
                      "Arrived at non-free entry in the non-full queue %d.\n"
                      "Please file bug report to %s.\n",
-                     control->queue, DRV_PROJECT);
+                     entry->queue->qid, DRV_PROJECT);
                return -EINVAL;
        }
 
@@ -344,7 +353,7 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
        struct data_queue *queue;
        unsigned int i;
 
-       rt2x00usb_vendor_request_sw(rt2x00dev, USB_RX_CONTROL, 0x0000, 0x0000,
+       rt2x00usb_vendor_request_sw(rt2x00dev, USB_RX_CONTROL, 00,
                                    REGISTER_TIMEOUT);
 
        /*