ath9k: resume aggregation immediately after a hardware reset
authorFelix Fietkau <nbd@openwrt.org>
Sat, 23 Oct 2010 15:45:38 +0000 (17:45 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 25 Oct 2010 18:45:56 +0000 (14:45 -0400)
Since aggregation is usually triggered by tx completion, a hardware
reset (because of beacon stuck, tx hang or baseband hang) can
significantly delay the transmission of the next AMPDU (until the next
tx completion event).
Fix this by rescheduling aggregation after such a reset.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/beacon.c
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/xmit.c

index 4ed010d4ef96d9f3288cc9d1c81dbcd8d24e50fa..19891e7d49aea7e371cfaf43d0228013f03e313e 100644 (file)
@@ -370,7 +370,7 @@ void ath_beacon_tasklet(unsigned long data)
                        ath_print(common, ATH_DBG_BSTUCK,
                                  "beacon is officially stuck\n");
                        sc->sc_flags |= SC_OP_TSF_RESET;
-                       ath_reset(sc, false);
+                       ath_reset(sc, true);
                }
 
                return;
index 9679b31919751e316391f7d79541b89e74d05d06..c6ec800d7a6b6ef4fe91cc00ccffdb543d3504d0 100644 (file)
@@ -580,7 +580,7 @@ void ath_hw_check(struct work_struct *work)
 
                msleep(1);
        }
-       ath_reset(sc, false);
+       ath_reset(sc, true);
 
 out:
        ath9k_ps_restore(sc);
@@ -598,7 +598,7 @@ void ath9k_tasklet(unsigned long data)
        ath9k_ps_wakeup(sc);
 
        if (status & ATH9K_INT_FATAL) {
-               ath_reset(sc, false);
+               ath_reset(sc, true);
                ath9k_ps_restore(sc);
                return;
        }
index 089b05ed67729a9efe93b34d5e0f3c2d3324e7b6..30ef2dfc1ed2037ee63c54ec0a16223732194ac4 100644 (file)
@@ -2163,7 +2163,7 @@ static void ath_tx_complete_poll_work(struct work_struct *work)
                ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET,
                          "tx hung, resetting the chip\n");
                ath9k_ps_wakeup(sc);
-               ath_reset(sc, false);
+               ath_reset(sc, true);
                ath9k_ps_restore(sc);
        }