]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ath9k: optimize the hardware hang check
authorFelix Fietkau <nbd@openwrt.org>
Thu, 12 Apr 2012 20:35:58 +0000 (22:35 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 16 Apr 2012 18:19:28 +0000 (14:19 -0400)
Since it's only called when beacons are stuck, move it to the SWBA handler
tasklet, to avoid doing redundant checks on every single interrupt.

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

index 626418222c8588ffc5e0db4dfe0368eb79849af4..df5b6acd805f29d537112623c09c0a7923c96f47 100644 (file)
@@ -369,6 +369,9 @@ void ath_beacon_tasklet(unsigned long data)
        if (ath9k_hw_numtxpending(ah, sc->beacon.beaconq) != 0) {
                sc->beacon.bmisscnt++;
 
+               if (!ath9k_hw_check_alive(ah))
+                       ieee80211_queue_work(sc->hw, &sc->hw_check_work);
+
                if (sc->beacon.bmisscnt < BSTUCK_THRESH * sc->nbcnvifs) {
                        ath_dbg(common, BSTUCK,
                                "missed %u consecutive beacons\n",
index c8d1239571883097ae87707ff8988603b9196e7c..384e5c498440376fd51a55d9875e4ec5671ae1f3 100644 (file)
@@ -692,17 +692,6 @@ void ath9k_tasklet(unsigned long data)
                goto out;
        }
 
-       /*
-        * Only run the baseband hang check if beacons stop working in AP or
-        * IBSS mode, because it has a high false positive rate. For station
-        * mode it should not be necessary, since the upper layers will detect
-        * this through a beacon miss automatically and the following channel
-        * change will trigger a hardware reset anyway
-        */
-       if (ath9k_hw_numtxpending(ah, sc->beacon.beaconq) != 0 &&
-           !ath9k_hw_check_alive(ah))
-               ieee80211_queue_work(sc->hw, &sc->hw_check_work);
-
        if ((status & ATH9K_INT_TSFOOR) && sc->ps_enabled) {
                /*
                 * TSF sync does not look correct; remain awake to sync with