aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanoharan@atheros.com>2011-01-27 08:09:38 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-28 15:27:20 -0500
commitc7c1806098752c1f46943d8db2c69aff07f5d4bc (patch)
tree1890aca101508482f786bfdb2e5a0b4bfa37fa4e /drivers/net/wireless/ath
parent5b64aa72ead6f8be488d2be7af579f0d69fb7a6e (diff)
ath9k: Fix power save usage count imbalance on deinit
While unloading the driver, the ps_usecount is incremented before configuring gpio registers in deinit_device. But it is failed to restore the ps_usecount after that. The problem is that the chip is forcibly moved to FULL SLEEP by radio_disable when mac80211 is reporting as idle though ps_usecount is not zero. This patch retores ps_usecount properly and ensures that the chip is always moved to full sleep only if ps usage count is zero which also helps in debugging deadbeef on multivif case. And also fixes the following warning. ath: DMA failed to stop in 10 ms AR_CR=0xdeadbeef AR_DIAG_SW=0xdeadbeef ath: Could not stop RX, we could be confusing the DMA engine when we start RX up ------------[ cut here ]------------ WARNING: at drivers/net/wireless/ath/ath9k/recv.c:536 ath_stoprecv+0xf4/0x100 [ath9k]() Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index b3254a3484a5..087a6a95edd5 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -819,6 +819,8 @@ void ath9k_deinit_device(struct ath_softc *sc)
819 wiphy_rfkill_stop_polling(sc->hw->wiphy); 819 wiphy_rfkill_stop_polling(sc->hw->wiphy);
820 ath_deinit_leds(sc); 820 ath_deinit_leds(sc);
821 821
822 ath9k_ps_restore(sc);
823
822 for (i = 0; i < sc->num_sec_wiphy; i++) { 824 for (i = 0; i < sc->num_sec_wiphy; i++) {
823 struct ath_wiphy *aphy = sc->sec_wiphy[i]; 825 struct ath_wiphy *aphy = sc->sec_wiphy[i];
824 if (aphy == NULL) 826 if (aphy == NULL)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index ace9f066fa20..568f7be2ec75 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -953,8 +953,6 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw)
953 953
954 spin_unlock_bh(&sc->sc_pcu_lock); 954 spin_unlock_bh(&sc->sc_pcu_lock);
955 ath9k_ps_restore(sc); 955 ath9k_ps_restore(sc);
956
957 ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP);
958} 956}
959 957
960int ath_reset(struct ath_softc *sc, bool retry_tx) 958int ath_reset(struct ath_softc *sc, bool retry_tx)