summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/gpio.c
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>2011-09-28 16:56:10 +0530
committerJohn W. Linville <linville@tuxdriver.com>2011-09-30 15:57:04 -0400
commit90826313fd69d198da7574779460f793765abfa5 (patch)
treebebb56fac50abb86b46d847980843a0cd7178abb /drivers/net/wireless/ath/ath9k/gpio.c
parent3b9ce80ce96aeaeacab5e26442987df45584a049 (diff)
downloadlinux-3.10-90826313fd69d198da7574779460f793765abfa5.tar.gz
linux-3.10-90826313fd69d198da7574779460f793765abfa5.tar.bz2
linux-3.10-90826313fd69d198da7574779460f793765abfa5.zip
ath9k/ath9k_htc: Fix PS wrappers for RF kill
ath9k_hw_gpio_get reads the GPIO in/out registers to get the status of GPIO pins, so use PS wrappers Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/gpio.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/gpio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index afbf5400a52..fd0f84ebdb5 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -84,9 +84,14 @@ void ath_init_leds(struct ath_softc *sc)
static bool ath_is_rfkill_set(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
+ bool is_blocked;
- return ath9k_hw_gpio_get(ah, ah->rfkill_gpio) ==
+ ath9k_ps_wakeup(sc);
+ is_blocked = ath9k_hw_gpio_get(ah, ah->rfkill_gpio) ==
ah->rfkill_polarity;
+ ath9k_ps_restore(sc);
+
+ return is_blocked;
}
void ath9k_rfkill_poll_state(struct ieee80211_hw *hw)