ath9k: restart hardware after noise floor calibration failure

When NF calibration fails, the radio often becomes deaf. The usual
hardware hang checks do not detect this, so it's better to issue a reset
when that happens.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Felix Fietkau
2014-10-25 17:19:30 +02:00
committed by John W. Linville
parent 70e535ed00
commit 7b8aaead95
9 changed files with 33 additions and 24 deletions

View File

@@ -371,9 +371,15 @@ void ath_ani_calibrate(unsigned long data)
/* Perform calibration if necessary */
if (longcal || shortcal) {
common->ani.caldone =
ath9k_hw_calibrate(ah, ah->curchan,
ah->rxchainmask, longcal);
int ret = ath9k_hw_calibrate(ah, ah->curchan, ah->rxchainmask,
longcal);
if (ret < 0) {
common->ani.caldone = 0;
ath9k_queue_reset(sc, RESET_TYPE_CALIBRATION);
return;
}
common->ani.caldone = ret;
}
ath_dbg(common, ANI,