diff options
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/gpio.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 4 |
4 files changed, 14 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 8d163ae4255e..3a14630e808e 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -628,6 +628,7 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz) | |||
628 | 628 | ||
629 | extern struct ieee80211_ops ath9k_ops; | 629 | extern struct ieee80211_ops ath9k_ops; |
630 | extern int modparam_nohwcrypt; | 630 | extern int modparam_nohwcrypt; |
631 | extern int led_blink; | ||
631 | 632 | ||
632 | irqreturn_t ath_isr(int irq, void *dev); | 633 | irqreturn_t ath_isr(int irq, void *dev); |
633 | int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, | 634 | int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, |
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index 0ee75e79fe35..3a8ee999da5d 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c | |||
@@ -76,7 +76,8 @@ static void ath_led_brightness(struct led_classdev *led_cdev, | |||
76 | case LED_FULL: | 76 | case LED_FULL: |
77 | if (led->led_type == ATH_LED_ASSOC) { | 77 | if (led->led_type == ATH_LED_ASSOC) { |
78 | sc->sc_flags |= SC_OP_LED_ASSOCIATED; | 78 | sc->sc_flags |= SC_OP_LED_ASSOCIATED; |
79 | ieee80211_queue_delayed_work(sc->hw, | 79 | if (led_blink) |
80 | ieee80211_queue_delayed_work(sc->hw, | ||
80 | &sc->ath_led_blink_work, 0); | 81 | &sc->ath_led_blink_work, 0); |
81 | } else if (led->led_type == ATH_LED_RADIO) { | 82 | } else if (led->led_type == ATH_LED_RADIO) { |
82 | ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 0); | 83 | ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 0); |
@@ -143,7 +144,8 @@ void ath_init_leds(struct ath_softc *sc) | |||
143 | /* LED off, active low */ | 144 | /* LED off, active low */ |
144 | ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1); | 145 | ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1); |
145 | 146 | ||
146 | INIT_DELAYED_WORK(&sc->ath_led_blink_work, ath_led_blink_work); | 147 | if (led_blink) |
148 | INIT_DELAYED_WORK(&sc->ath_led_blink_work, ath_led_blink_work); | ||
147 | 149 | ||
148 | trigger = ieee80211_get_radio_led_name(sc->hw); | 150 | trigger = ieee80211_get_radio_led_name(sc->hw); |
149 | snprintf(sc->radio_led.name, sizeof(sc->radio_led.name), | 151 | snprintf(sc->radio_led.name, sizeof(sc->radio_led.name), |
@@ -180,7 +182,8 @@ void ath_init_leds(struct ath_softc *sc) | |||
180 | return; | 182 | return; |
181 | 183 | ||
182 | fail: | 184 | fail: |
183 | cancel_delayed_work_sync(&sc->ath_led_blink_work); | 185 | if (led_blink) |
186 | cancel_delayed_work_sync(&sc->ath_led_blink_work); | ||
184 | ath_deinit_leds(sc); | 187 | ath_deinit_leds(sc); |
185 | } | 188 | } |
186 | 189 | ||
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 514a4014c198..8700e3dc53cf 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -33,6 +33,10 @@ int modparam_nohwcrypt; | |||
33 | module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444); | 33 | module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444); |
34 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption"); | 34 | MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption"); |
35 | 35 | ||
36 | int led_blink = 1; | ||
37 | module_param_named(blink, led_blink, int, 0444); | ||
38 | MODULE_PARM_DESC(blink, "Enable LED blink on activity"); | ||
39 | |||
36 | /* We use the hw_value as an index into our private channel structure */ | 40 | /* We use the hw_value as an index into our private channel structure */ |
37 | 41 | ||
38 | #define CHAN2G(_freq, _idx) { \ | 42 | #define CHAN2G(_freq, _idx) { \ |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index c8de50fa6378..5af259644bf6 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1241,7 +1241,9 @@ static void ath9k_stop(struct ieee80211_hw *hw) | |||
1241 | 1241 | ||
1242 | aphy->state = ATH_WIPHY_INACTIVE; | 1242 | aphy->state = ATH_WIPHY_INACTIVE; |
1243 | 1243 | ||
1244 | cancel_delayed_work_sync(&sc->ath_led_blink_work); | 1244 | if (led_blink) |
1245 | cancel_delayed_work_sync(&sc->ath_led_blink_work); | ||
1246 | |||
1245 | cancel_delayed_work_sync(&sc->tx_complete_work); | 1247 | cancel_delayed_work_sync(&sc->tx_complete_work); |
1246 | cancel_work_sync(&sc->paprd_work); | 1248 | cancel_work_sync(&sc->paprd_work); |
1247 | 1249 | ||