aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/rfkill.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/rfkill.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/rfkill.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath5k/rfkill.c b/drivers/net/wireless/ath/ath5k/rfkill.c
index 492ada92db56..41a877b73fce 100644
--- a/drivers/net/wireless/ath/ath5k/rfkill.c
+++ b/drivers/net/wireless/ath/ath5k/rfkill.c
@@ -56,10 +56,12 @@ static inline void ath5k_rfkill_enable(struct ath5k_softc *sc)
56static inline void ath5k_rfkill_set_intr(struct ath5k_softc *sc, bool enable) 56static inline void ath5k_rfkill_set_intr(struct ath5k_softc *sc, bool enable)
57{ 57{
58 struct ath5k_hw *ah = sc->ah; 58 struct ath5k_hw *ah = sc->ah;
59 u32 curval;
60
59 ath5k_hw_set_gpio_input(ah, sc->rf_kill.gpio); 61 ath5k_hw_set_gpio_input(ah, sc->rf_kill.gpio);
60 ah->ah_gpio[0] = ath5k_hw_get_gpio(ah, sc->rf_kill.gpio); 62 curval = ath5k_hw_get_gpio(ah, sc->rf_kill.gpio);
61 ath5k_hw_set_gpio_intr(ah, sc->rf_kill.gpio, enable ? 63 ath5k_hw_set_gpio_intr(ah, sc->rf_kill.gpio, enable ?
62 !!ah->ah_gpio[0] : !ah->ah_gpio[0]); 64 !!curval : !curval);
63} 65}
64 66
65static bool 67static bool
@@ -97,9 +99,8 @@ ath5k_rfkill_hw_start(struct ath5k_hw *ah)
97 ath5k_rfkill_disable(sc); 99 ath5k_rfkill_disable(sc);
98 100
99 /* enable interrupt for rfkill switch */ 101 /* enable interrupt for rfkill switch */
100 if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header)) { 102 if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header))
101 ath5k_rfkill_set_intr(sc, true); 103 ath5k_rfkill_set_intr(sc, true);
102 }
103} 104}
104 105
105 106
@@ -109,9 +110,8 @@ ath5k_rfkill_hw_stop(struct ath5k_hw *ah)
109 struct ath5k_softc *sc = ah->ah_sc; 110 struct ath5k_softc *sc = ah->ah_sc;
110 111
111 /* disable interrupt for rfkill switch */ 112 /* disable interrupt for rfkill switch */
112 if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header)) { 113 if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header))
113 ath5k_rfkill_set_intr(sc, false); 114 ath5k_rfkill_set_intr(sc, false);
114 }
115 115
116 tasklet_kill(&sc->rf_kill.toggleq); 116 tasklet_kill(&sc->rf_kill.toggleq);
117 117