]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rt2800: increase TX timeout
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 6 Jan 2017 13:05:11 +0000 (14:05 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 17 Jan 2017 11:58:36 +0000 (13:58 +0200)
When medium is busy or frames have to be resend, it takes time to send
the frames and get TX status from hardware. For some really bad medium
conditions it can take seconds. Patch change TX status timeout to give
HW more time to provide it, however 500ms is not enough for bad
conditions. In the future this timeout should be removed and replaced
with proper watchdog mechanism.

Increase flush timeout accordingly as well.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2800usb.c
drivers/net/wireless/ralink/rt2x00/rt2x00mmio.c
drivers/net/wireless/ralink/rt2x00/rt2x00usb.c

index 8ec22c00510f5fe824193679c1d759ba4a259a97..400f074fd94f89465f0f13ff65941d6526b0c494 100644 (file)
@@ -123,7 +123,7 @@ static inline bool rt2800usb_entry_txstatus_timeout(struct queue_entry *entry)
        if (!test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))
                return false;
 
-       tout = time_after(jiffies, entry->last_action + msecs_to_jiffies(100));
+       tout = time_after(jiffies, entry->last_action + msecs_to_jiffies(500));
        if (unlikely(tout))
                rt2x00_dbg(entry->queue->rt2x00dev,
                           "TX status timeout for entry %d in queue %d\n",
index f0178fd4fe5ff8c078749e6df8b82d1ea7a26a0c..da38d254c26f042be2beadb1a0bed76660a65bc6 100644 (file)
@@ -101,7 +101,7 @@ void rt2x00mmio_flush_queue(struct data_queue *queue, bool drop)
        unsigned int i;
 
        for (i = 0; !rt2x00queue_empty(queue) && i < 10; i++)
-               msleep(10);
+               msleep(50);
 }
 EXPORT_SYMBOL_GPL(rt2x00mmio_flush_queue);
 
index 6005e14213ca982c12cef1b1297c564b974aded0..838ca58d2dd6e319b6c270bbe319f1041f2ae687 100644 (file)
@@ -517,7 +517,7 @@ void rt2x00usb_flush_queue(struct data_queue *queue, bool drop)
                 * Wait for a little while to give the driver
                 * the oppurtunity to recover itself.
                 */
-               msleep(10);
+               msleep(50);
        }
 }
 EXPORT_SYMBOL_GPL(rt2x00usb_flush_queue);