aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-04-12 16:35:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-16 14:19:28 -0400
commitb381fa3229a30f6d7b0e6053314c4a5378c9389d (patch)
treedc699d531cc66394aa658ae458fc0545e5e56a7b /drivers/net/wireless/ath/ath9k
parent7b27ba4e9c8053ca73e2b21ece804f7e80c07ba3 (diff)
ath9k: optimize the hardware hang check
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>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c11
2 files changed, 3 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index 626418222c85..df5b6acd805f 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -369,6 +369,9 @@ void ath_beacon_tasklet(unsigned long data)
369 if (ath9k_hw_numtxpending(ah, sc->beacon.beaconq) != 0) { 369 if (ath9k_hw_numtxpending(ah, sc->beacon.beaconq) != 0) {
370 sc->beacon.bmisscnt++; 370 sc->beacon.bmisscnt++;
371 371
372 if (!ath9k_hw_check_alive(ah))
373 ieee80211_queue_work(sc->hw, &sc->hw_check_work);
374
372 if (sc->beacon.bmisscnt < BSTUCK_THRESH * sc->nbcnvifs) { 375 if (sc->beacon.bmisscnt < BSTUCK_THRESH * sc->nbcnvifs) {
373 ath_dbg(common, BSTUCK, 376 ath_dbg(common, BSTUCK,
374 "missed %u consecutive beacons\n", 377 "missed %u consecutive beacons\n",
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index c8d123957188..384e5c498440 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -692,17 +692,6 @@ void ath9k_tasklet(unsigned long data)
692 goto out; 692 goto out;
693 } 693 }
694 694
695 /*
696 * Only run the baseband hang check if beacons stop working in AP or
697 * IBSS mode, because it has a high false positive rate. For station
698 * mode it should not be necessary, since the upper layers will detect
699 * this through a beacon miss automatically and the following channel
700 * change will trigger a hardware reset anyway
701 */
702 if (ath9k_hw_numtxpending(ah, sc->beacon.beaconq) != 0 &&
703 !ath9k_hw_check_alive(ah))
704 ieee80211_queue_work(sc->hw, &sc->hw_check_work);
705
706 if ((status & ATH9K_INT_TSFOOR) && sc->ps_enabled) { 695 if ((status & ATH9K_INT_TSFOOR) && sc->ps_enabled) {
707 /* 696 /*
708 * TSF sync does not look correct; remain awake to sync with 697 * TSF sync does not look correct; remain awake to sync with