From: Felix Fietkau Date: Tue, 22 Mar 2011 20:54:18 +0000 (+0100) Subject: ath9k: trigger nfcal only after multiple missed beacons in AP mode X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=87c510fe2d4f193cd4eb518364a2dfa5059b1218;p=mv-sheeva.git ath9k: trigger nfcal only after multiple missed beacons in AP mode Single missed (i.e. not transmitted) beacons in AP mode are not very rare and not necessarily an indicator of strong interference, so only trigger noise floor recalibration when multiple consecutive beacons could not be transmitted. Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index b5eab2f5582..6ebeafe3a92 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c @@ -368,7 +368,8 @@ void ath_beacon_tasklet(unsigned long data) "missed %u consecutive beacons\n", sc->beacon.bmisscnt); ath9k_hw_stop_dma_queue(ah, sc->beacon.beaconq); - ath9k_hw_bstuck_nfcal(ah); + if (sc->beacon.bmisscnt > 3) + ath9k_hw_bstuck_nfcal(ah); } else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) { ath_dbg(common, ATH_DBG_BSTUCK, "beacon is officially stuck\n");