aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/600-23-rt2x00-rt2800mmio-add-a-workaround-for-spurious-TX_F.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel/mac80211/patches/600-23-rt2x00-rt2800mmio-add-a-workaround-for-spurious-TX_F.patch')
-rw-r--r--package/kernel/mac80211/patches/600-23-rt2x00-rt2800mmio-add-a-workaround-for-spurious-TX_F.patch14
1 files changed, 7 insertions, 7 deletions
diff --git a/package/kernel/mac80211/patches/600-23-rt2x00-rt2800mmio-add-a-workaround-for-spurious-TX_F.patch b/package/kernel/mac80211/patches/600-23-rt2x00-rt2800mmio-add-a-workaround-for-spurious-TX_F.patch
index 7d8d2f5e13..342174f8d5 100644
--- a/package/kernel/mac80211/patches/600-23-rt2x00-rt2800mmio-add-a-workaround-for-spurious-TX_F.patch
+++ b/package/kernel/mac80211/patches/600-23-rt2x00-rt2800mmio-add-a-workaround-for-spurious-TX_F.patch
@@ -12,7 +12,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
--- a/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c
-@@ -415,9 +415,9 @@ void rt2800mmio_autowake_tasklet(unsigne
+@@ -424,9 +424,9 @@ void rt2800mmio_autowake_tasklet(unsigne
}
EXPORT_SYMBOL_GPL(rt2800mmio_autowake_tasklet);
@@ -24,12 +24,12 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
int i;
/*
-@@ -438,29 +438,77 @@ static void rt2800mmio_txstatus_interrup
+@@ -447,29 +447,77 @@ static void rt2800mmio_txstatus_interrup
* Since we have only one producer and one consumer we don't
* need to lock the kfifo.
*/
- for (i = 0; i < rt2x00dev->tx->limit; i++) {
-- rt2x00mmio_register_read(rt2x00dev, TX_STA_FIFO, &status);
+- status = rt2x00mmio_register_read(rt2x00dev, TX_STA_FIFO);
-
- if (!rt2x00_get_field32(status, TX_STA_FIFO_VALID))
- break;
@@ -47,7 +47,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+ if (++i >= rt2x00dev->tx->limit)
+ break;
+
-+ rt2x00mmio_register_read(rt2x00dev, TX_STA_FIFO, &status);
++ status = rt2x00mmio_register_read(rt2x00dev, TX_STA_FIFO);
+ } while (rt2x00_get_field32(status, TX_STA_FIFO_VALID));
/* Schedule the tasklet for processing the tx status. */
@@ -87,7 +87,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
- /* Read status and ACK all interrupts */
+ /* Read status */
- rt2x00mmio_register_read(rt2x00dev, INT_SOURCE_CSR, &reg);
+ reg = rt2x00mmio_register_read(rt2x00dev, INT_SOURCE_CSR);
+
+ if (rt2x00_get_field32(reg, INT_SOURCE_CSR_TX_FIFO_STATUS)) {
+ /* Due to unknown reason the hardware generates a
@@ -96,7 +96,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
+ * here to see if we have to process the actual
+ * request.
+ */
-+ rt2x00mmio_register_read(rt2x00dev, TX_STA_FIFO, &txstatus);
++ txstatus = rt2x00mmio_register_read(rt2x00dev, TX_STA_FIFO);
+ if (rt2800mmio_txstatus_is_spurious(rt2x00dev, txstatus)) {
+ /* Remove the TX_FIFO_STATUS bit so it won't be
+ * processed in this turn. The hardware will
@@ -111,7 +111,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
rt2x00mmio_register_write(rt2x00dev, INT_SOURCE_CSR, reg);
if (!reg)
-@@ -477,7 +525,7 @@ irqreturn_t rt2800mmio_interrupt(int irq
+@@ -486,7 +534,7 @@ irqreturn_t rt2800mmio_interrupt(int irq
mask = ~reg;
if (rt2x00_get_field32(reg, INT_SOURCE_CSR_TX_FIFO_STATUS)) {