1 --- a/drivers/net/wireless/ath/ath9k/init.c
2 +++ b/drivers/net/wireless/ath/ath9k/init.c
3 @@ -535,8 +535,15 @@ static int ath9k_init_softc(u16 devid, s
4 ah->hw_version.subsysid = subsysid;
7 - if (!sc->dev->platform_data)
8 + if (!sc->dev->platform_data) {
9 ah->ah_flags |= AH_USE_EEPROM;
10 + sc->sc_ah->led_pin = -1;
12 + pdata = (struct ath9k_platform_data *) sc->dev->platform_data;
13 + sc->sc_ah->gpio_mask = pdata->gpio_mask;
14 + sc->sc_ah->gpio_val = pdata->gpio_val;
15 + sc->sc_ah->led_pin = pdata->led_pin;
18 common = ath9k_hw_common(ah);
19 common->ops = &ath9k_common_ops;
20 --- a/drivers/net/wireless/ath/ath9k/hw.h
21 +++ b/drivers/net/wireless/ath/ath9k/hw.h
22 @@ -788,7 +788,7 @@ struct ath_hw {
31 --- a/drivers/net/wireless/ath/ath9k/gpio.c
32 +++ b/drivers/net/wireless/ath/ath9k/gpio.c
33 @@ -147,10 +147,12 @@ void ath_init_leds(struct ath_softc *sc)
34 if (AR_SREV_9100(sc->sc_ah))
37 - if (AR_SREV_9287(sc->sc_ah))
38 - sc->sc_ah->led_pin = ATH_LED_PIN_9287;
40 - sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
41 + if (sc->sc_ah->led_pin < 0) {
42 + if (AR_SREV_9287(sc->sc_ah))
43 + sc->sc_ah->led_pin = ATH_LED_PIN_9287;
45 + sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
48 /* Configure gpio 1 for output */
49 ath9k_hw_cfg_output(sc->sc_ah, sc->sc_ah->led_pin,
50 --- a/include/linux/ath9k_platform.h
51 +++ b/include/linux/ath9k_platform.h
53 struct ath9k_platform_data {
54 u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS];
62 #endif /* _LINUX_ATH9K_PLATFORM_H */