ath9k: resume aggregation immediately after a hardware reset
authorFelix Fietkau <nbd@openwrt.org>
Sat, 23 Oct 2010 15:45:38 +0000 (17:45 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Dec 2010 21:32:01 +0000 (13:32 -0800)
commit fac6b6a065da42f826088c58bddad82e1b1ccb40 upstream.

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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/ath/ath9k/beacon.c
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/xmit.c

index 4d4b22d52dfd230a7a61b3f0dd8b5b612c38af1f..20cf2d4e58b99a7986153415473cb3a379f4d79a 100644 (file)
@@ -366,7 +366,7 @@ void ath_beacon_tasklet(unsigned long data)
                        ath_print(common, ATH_DBG_BEACON,
                                  "beacon is officially stuck\n");
                        sc->sc_flags |= SC_OP_TSF_RESET;
-                       ath_reset(sc, false);
+                       ath_reset(sc, true);
                }
 
                return;
index 3e9277606989e7eba71f3ee28eafe1146d9fa5b0..fb9300e43a686a248a7cab7d734d8c951fbb39a7 100644 (file)
@@ -554,7 +554,7 @@ void ath_hw_check(struct work_struct *work)
 
                msleep(1);
        }
-       ath_reset(sc, false);
+       ath_reset(sc, true);
 
 out:
        ath9k_ps_restore(sc);
@@ -572,7 +572,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 5e9963a7d6893f8677697188c02a5e02fadba497..e2ace49bd42972169fe00e123efe3c4bc7402749 100644 (file)
@@ -2206,7 +2206,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);
        }