ath9k/ath9k_htc: Fix PS wrappers for RF kill
[deliverable/linux.git] / drivers / net / wireless / ath / ath9k / gpio.c
index 5113dd80c99fb707946f69e073f59fbcc0f6613e..fd0f84ebdb51994895966c988ae414acd2f797d5 100644 (file)
@@ -48,6 +48,8 @@ void ath_init_leds(struct ath_softc *sc)
                        sc->sc_ah->led_pin = ATH_LED_PIN_9485;
                else if (AR_SREV_9300(sc->sc_ah))
                        sc->sc_ah->led_pin = ATH_LED_PIN_9300;
+               else if (AR_SREV_9480(sc->sc_ah))
+                       sc->sc_ah->led_pin = ATH_LED_PIN_9480;
                else
                        sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
        }
@@ -82,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)
This page took 0.027531 seconds and 5 git commands to generate.