diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-10-25 17:19:30 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-10-27 19:16:18 +0100 |
commit | 7b8aaead958e38b1eb8944c5f9c90ce066500268 (patch) | |
tree | 1854b2009b0af5f7e5fca49313861cc2fb626c02 /drivers/net/wireless/ath/ath9k/link.c | |
parent | ath9k: clean up debugfs print of reset causes (diff) | |
download | linux-7b8aaead958e38b1eb8944c5f9c90ce066500268.tar.xz linux-7b8aaead958e38b1eb8944c5f9c90ce066500268.zip |
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>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/link.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/link.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c index 2343f56e6498..b829263e3d0a 100644 --- a/drivers/net/wireless/ath/ath9k/link.c +++ b/drivers/net/wireless/ath/ath9k/link.c @@ -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, |