From: Rajkumar Manoharan <rmanoharan@atheros.com>
To: <linux-wireless@vger.kernel.org>
Cc: Rajkumar Manoharan <rmanoharan@atheros.com>, <stable@kernel.org>
Subject: [PATCH 2/2] ath9k: Fix power save usage count imbalance on deinit
Date: Wed, 19 Jan 2011 21:17:43 +0530 [thread overview]
Message-ID: <1295452063-13828-2-git-send-email-rmanoharan@atheros.com> (raw)
In-Reply-To: <1295452063-13828-1-git-send-email-rmanoharan@atheros.com>
Upon 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 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
counte is zero which helps in debugging. 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
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
---
drivers/net/wireless/ath/ath9k/init.c | 2 ++
drivers/net/wireless/ath/ath9k/main.c | 2 --
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 767d8b8..b38c874 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -824,6 +824,8 @@ void ath9k_deinit_device(struct ath_softc *sc)
wiphy_rfkill_stop_polling(sc->hw->wiphy);
ath_deinit_leds(sc);
+ ath9k_ps_restore(sc);
+
for (i = 0; i < sc->num_sec_wiphy; i++) {
struct ath_wiphy *aphy = sc->sec_wiphy[i];
if (aphy == NULL)
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index c03184e..aff1c72 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -966,8 +966,6 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw)
spin_unlock_bh(&sc->sc_pcu_lock);
ath9k_ps_restore(sc);
-
- ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP);
}
int ath_reset(struct ath_softc *sc, bool retry_tx)
--
1.7.3.5
next prev parent reply other threads:[~2011-01-19 15:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 15:47 [PATCH 1/2] ath9k_hw: Fix system hang when resuming from S3/S4 Rajkumar Manoharan
2011-01-19 15:47 ` Rajkumar Manoharan [this message]
2011-01-19 19:24 ` [PATCH 2/2] ath9k: Fix power save usage count imbalance on deinit Luis R. Rodriguez
2011-01-20 7:51 ` Rajkumar Manoharan
2011-01-20 23:02 ` Luis R. Rodriguez
2011-01-23 7:21 ` Rajkumar Manoharan
2011-01-25 0:03 ` Paul Stewart
2011-01-25 5:10 ` Rajkumar Manoharan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1295452063-13828-2-git-send-email-rmanoharan@atheros.com \
--to=rmanoharan@atheros.com \
--cc=linux-wireless@vger.kernel.org \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox