]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
rt2x00usb: remove unnecessary rx flag checks
authorSoeren Moch <smoch@web.de>
Mon, 1 Jul 2019 10:53:14 +0000 (12:53 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 24 Jul 2019 11:42:40 +0000 (14:42 +0300)
In contrast to the TX path, there is no need to separately read the transfer
status from the device after receiving RX data. Consequently, there is no
real STATUS_PENDING RX processing queue entry state.
Remove the unnecessary ENTRY_DATA_STATUS_PENDING flag checks from the RX path.
Also remove the misleading comment about reading RX status from device.

Suggested-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Soeren Moch <smoch@web.de>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2x00usb.c

index 7e3a621b9c0d72c12967779f8b27bf205f4b51cf..bc2dfef0de22b8675e4ea911ffff76c741647c94 100644 (file)
@@ -349,8 +349,7 @@ static void rt2x00usb_work_rxdone(struct work_struct *work)
        while (!rt2x00queue_empty(rt2x00dev->rx)) {
                entry = rt2x00queue_get_entry(rt2x00dev->rx, Q_INDEX_DONE);
 
-               if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) ||
-                   !test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))
+               if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
                        break;
 
                /*
@@ -389,8 +388,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb)
        rt2x00lib_dmadone(entry);
 
        /*
-        * Schedule the delayed work for reading the RX status
-        * from the device.
+        * Schedule the delayed work for processing RX data
         */
        queue_work(rt2x00dev->workqueue, &rt2x00dev->rxdone_work);
 }
@@ -402,8 +400,7 @@ static bool rt2x00usb_kick_rx_entry(struct queue_entry *entry, void *data)
        struct queue_entry_priv_usb *entry_priv = entry->priv_data;
        int status;
 
-       if (test_and_set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) ||
-           test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))
+       if (test_and_set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
                return false;
 
        rt2x00lib_dmastart(entry);