Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203277
b: refs/heads/master
c: 9a75c2f
h: refs/heads/master
i:
  203275: 81e63b7
v: v3
  • Loading branch information
Vivek Natarajan authored and John W. Linville committed Jun 23, 2010
1 parent ea20d84 commit 14e8284
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee031112d9eef5508f765ebc90ab488e01db002e
refs/heads/master: 9a75c2ff6d539da0a565b5d64605031950b0853e
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz)

extern struct ieee80211_ops ath9k_ops;
extern int modparam_nohwcrypt;
extern int led_blink;

irqreturn_t ath_isr(int irq, void *dev);
int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/net/wireless/ath/ath9k/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ static void ath_led_brightness(struct led_classdev *led_cdev,
case LED_FULL:
if (led->led_type == ATH_LED_ASSOC) {
sc->sc_flags |= SC_OP_LED_ASSOCIATED;
ieee80211_queue_delayed_work(sc->hw,
if (led_blink)
ieee80211_queue_delayed_work(sc->hw,
&sc->ath_led_blink_work, 0);
} else if (led->led_type == ATH_LED_RADIO) {
ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 0);
Expand Down Expand Up @@ -143,7 +144,8 @@ void ath_init_leds(struct ath_softc *sc)
/* LED off, active low */
ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1);

INIT_DELAYED_WORK(&sc->ath_led_blink_work, ath_led_blink_work);
if (led_blink)
INIT_DELAYED_WORK(&sc->ath_led_blink_work, ath_led_blink_work);

trigger = ieee80211_get_radio_led_name(sc->hw);
snprintf(sc->radio_led.name, sizeof(sc->radio_led.name),
Expand Down Expand Up @@ -180,7 +182,8 @@ void ath_init_leds(struct ath_softc *sc)
return;

fail:
cancel_delayed_work_sync(&sc->ath_led_blink_work);
if (led_blink)
cancel_delayed_work_sync(&sc->ath_led_blink_work);
ath_deinit_leds(sc);
}

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ int modparam_nohwcrypt;
module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444);
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption");

int led_blink = 1;
module_param_named(blink, led_blink, int, 0444);
MODULE_PARM_DESC(blink, "Enable LED blink on activity");

/* We use the hw_value as an index into our private channel structure */

#define CHAN2G(_freq, _idx) { \
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,9 @@ static void ath9k_stop(struct ieee80211_hw *hw)

aphy->state = ATH_WIPHY_INACTIVE;

cancel_delayed_work_sync(&sc->ath_led_blink_work);
if (led_blink)
cancel_delayed_work_sync(&sc->ath_led_blink_work);

cancel_delayed_work_sync(&sc->tx_complete_work);
cancel_work_sync(&sc->paprd_work);

Expand Down

0 comments on commit 14e8284

Please sign in to comment.