ath9k/ath9k_htc: Fix PS wrappers for RF kill
[deliverable/linux.git] / drivers / net / wireless / ath / ath9k / gpio.c
index bc713fc28191b2baf4e1992365902cfbce25fd07..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)
@@ -149,6 +156,7 @@ static void ath9k_gen_timer_start(struct ath_hw *ah,
                ath9k_hw_disable_interrupts(ah);
                ah->imask |= ATH9K_INT_GENTIMER;
                ath9k_hw_set_interrupts(ah, ah->imask);
+               ath9k_hw_enable_interrupts(ah);
        }
 }
 
@@ -163,6 +171,7 @@ static void ath9k_gen_timer_stop(struct ath_hw *ah, struct ath_gen_timer *timer)
                ath9k_hw_disable_interrupts(ah);
                ah->imask &= ~ATH9K_INT_GENTIMER;
                ath9k_hw_set_interrupts(ah, ah->imask);
+               ath9k_hw_enable_interrupts(ah);
        }
 }
 
This page took 0.041408 seconds and 5 git commands to generate.