rt2800usb: mark tx failure on timeout
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 6 Jan 2017 13:05:16 +0000 (14:05 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 17 Jan 2017 11:58:37 +0000 (13:58 +0200)
If we do not get TX status in reasonable time, we most likely fail to
send frame hence mark it as so.

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

index 400f074fd94f89465f0f13ff65941d6526b0c494..205a7b8ac8a7a252845f8e8c5866f2ed4cd1e14d 100644 (file)
@@ -602,10 +602,9 @@ static void rt2800usb_txdone_nostatus(struct rt2x00_dev *rt2x00dev)
                            !test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))
                                break;
 
-                       if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags))
+                       if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags) ||
+                           rt2800usb_entry_txstatus_timeout(entry))
                                rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE);
-                       else if (rt2800usb_entry_txstatus_timeout(entry))
-                               rt2x00lib_txdone_noinfo(entry, TXDONE_UNKNOWN);
                        else
                                break;
                }