diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-10-03 21:07:51 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-05 16:26:17 -0400 |
commit | ceb26a6013b962b82f644189ea29d802490fc8fc (patch) | |
tree | 72b22bf99cd0848df867d821231e52be36a40cbe /drivers/net/wireless/ath/ath9k/hw.c | |
parent | 93170516a4d64319ffcc43bc9dd61f12775bd297 (diff) | |
download | kernel_replicant_linux-ceb26a6013b962b82f644189ea29d802490fc8fc.tar.gz kernel_replicant_linux-ceb26a6013b962b82f644189ea29d802490fc8fc.tar.bz2 kernel_replicant_linux-ceb26a6013b962b82f644189ea29d802490fc8fc.zip |
ath9k: improve suspend/resume reliability
Ensure that drv_start() always returns true, as a failing hw start usually
eventually leads to crashes when there's still a station entry present.
Call a power-on reset after a resume and after a hw reset failure to bring
the hardware back to life again.
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/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index f9a6ec5cf470..8e1559aba495 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -1450,9 +1450,14 @@ static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type) REG_WRITE(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN | AR_RTC_FORCE_WAKE_ON_INT); + if (!ah->reset_power_on) + type = ATH9K_RESET_POWER_ON; + switch (type) { case ATH9K_RESET_POWER_ON: ret = ath9k_hw_set_reset_power_on(ah); + if (!ret) + ah->reset_power_on = true; break; case ATH9K_RESET_WARM: case ATH9K_RESET_COLD: |