1 --- a/drivers/net/wireless/ath/ath9k/init.c
2 +++ b/drivers/net/wireless/ath/ath9k/init.c
3 @@ -553,8 +553,14 @@ static int ath9k_init_softc(u16 devid, s
4 ah->hw_version.subsysid = subsysid;
9 ah->ah_flags |= AH_USE_EEPROM;
10 + sc->sc_ah->led_pin = -1;
12 + sc->sc_ah->gpio_mask = pdata->gpio_mask;
13 + sc->sc_ah->gpio_val = pdata->gpio_val;
14 + sc->sc_ah->led_pin = pdata->led_pin;
17 common = ath9k_hw_common(ah);
18 common->ops = &ath9k_common_ops;
19 --- a/drivers/net/wireless/ath/ath9k/hw.h
20 +++ b/drivers/net/wireless/ath/ath9k/hw.h
21 @@ -794,7 +794,7 @@ struct ath_hw {
30 --- a/drivers/net/wireless/ath/ath9k/gpio.c
31 +++ b/drivers/net/wireless/ath/ath9k/gpio.c
32 @@ -44,12 +44,14 @@ void ath_init_leds(struct ath_softc *sc)
33 if (AR_SREV_9100(sc->sc_ah))
36 - if (AR_SREV_9287(sc->sc_ah))
37 - sc->sc_ah->led_pin = ATH_LED_PIN_9287;
38 - else if (AR_SREV_9485(sc->sc_ah))
39 - sc->sc_ah->led_pin = ATH_LED_PIN_9485;
41 - sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
42 + if (sc->sc_ah->led_pin < 0) {
43 + if (AR_SREV_9287(sc->sc_ah))
44 + sc->sc_ah->led_pin = ATH_LED_PIN_9287;
45 + else if (AR_SREV_9485(sc->sc_ah))
46 + sc->sc_ah->led_pin = ATH_LED_PIN_9485;
48 + sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
51 /* Configure gpio 1 for output */
52 ath9k_hw_cfg_output(sc->sc_ah, sc->sc_ah->led_pin,
53 --- a/include/linux/ath9k_platform.h
54 +++ b/include/linux/ath9k_platform.h
56 struct ath9k_platform_data {
57 u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS];
65 #endif /* _LINUX_ATH9K_PLATFORM_H */