mac80211: rt2x00: backport upstream patches
Import patches from upstream to sync 19.07 with master: 9f3e3323e996 rt2x00: allow to specify watchdog interval 2034afe4db4a rt2800: add helpers for reading dma done index 759c5b599cf4 rt2800: initial watchdog implementation 09db3b000619 rt2800: add pre_reset_hw callback 710e6cc1595e rt2800: do not nullify initialization vector data e403fa31ed71 rt2x00: add restart hw 0f47aeeada2a rt2800: do not enable watchdog by default 41a531ffa4c5 rt2x00usb: fix rx queue hang 3b902fa811cf rt2x00usb: remove unnecessary rx flag checks 1dc244064c47 rt2x00: no need to check return value of debugfs_create functions 706f0182b1ad rt2800usb: Add new rt2800usb device PLANEX GW-USMicroN 95844124385e rt2x00: clear IV's on start to fix AP mode regression 567a9b766b47 rt2x00: do not set IEEE80211_TX_STAT_AMPDU_NO_BACK on tx status 14d5e14c8a6c rt2x00: clear up IV's on key removal 13fa451568ab Revert "rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band" --pending-- rt2800: remove errornous duplicate condition Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
From 41a531ffa4c5aeb062f892227c00fabb3b4a9c91 Mon Sep 17 00:00:00 2001
|
||||
From: Soeren Moch <smoch@web.de>
|
||||
Date: Mon, 1 Jul 2019 12:53:13 +0200
|
||||
Subject: [PATCH 08/15] rt2x00usb: fix rx queue hang
|
||||
|
||||
Since commit ed194d136769 ("usb: core: remove local_irq_save() around
|
||||
->complete() handler") the handler rt2x00usb_interrupt_rxdone() is
|
||||
not running with interrupts disabled anymore. So this completion handler
|
||||
is not guaranteed to run completely before workqueue processing starts
|
||||
for the same queue entry.
|
||||
Be sure to set all other flags in the entry correctly before marking
|
||||
this entry ready for workqueue processing. This way we cannot miss error
|
||||
conditions that need to be signalled from the completion handler to the
|
||||
worker thread.
|
||||
Note that rt2x00usb_work_rxdone() processes all available entries, not
|
||||
only such for which queue_work() was called.
|
||||
|
||||
This patch is similar to what commit df71c9cfceea ("rt2x00: fix order
|
||||
of entry flags modification") did for TX processing.
|
||||
|
||||
This fixes a regression on a RT5370 based wifi stick in AP mode, which
|
||||
suddenly stopped data transmission after some period of heavy load. Also
|
||||
stopping the hanging hostapd resulted in the error message "ieee80211
|
||||
phy0: rt2x00queue_flush_queue: Warning - Queue 14 failed to flush".
|
||||
Other operation modes are probably affected as well, this just was
|
||||
the used testcase.
|
||||
|
||||
Fixes: ed194d136769 ("usb: core: remove local_irq_save() around ->complete() handler")
|
||||
Cc: stable@vger.kernel.org # 4.20+
|
||||
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 | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
|
||||
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
|
||||
@@ -383,15 +383,10 @@ static void rt2x00usb_interrupt_rxdone(s
|
||||
struct queue_entry *entry = (struct queue_entry *)urb->context;
|
||||
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
|
||||
|
||||
- if (!test_and_clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
|
||||
+ if (!test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
|
||||
return;
|
||||
|
||||
/*
|
||||
- * Report the frame as DMA done
|
||||
- */
|
||||
- rt2x00lib_dmadone(entry);
|
||||
-
|
||||
- /*
|
||||
* Check if the received data is simply too small
|
||||
* to be actually valid, or if the urb is signaling
|
||||
* a problem.
|
||||
@@ -400,6 +395,11 @@ static void rt2x00usb_interrupt_rxdone(s
|
||||
set_bit(ENTRY_DATA_IO_FAILED, &entry->flags);
|
||||
|
||||
/*
|
||||
+ * Report the frame as DMA done
|
||||
+ */
|
||||
+ rt2x00lib_dmadone(entry);
|
||||
+
|
||||
+ /*
|
||||
* Schedule the delayed work for reading the RX status
|
||||
* from the device.
|
||||
*/
|
||||
Reference in New Issue
Block a user