1 --- a/drivers/net/wireless/ath/ath9k/init.c
2 +++ b/drivers/net/wireless/ath/ath9k/init.c
4 #include <linux/slab.h>
5 #include <linux/pm_qos_params.h>
7 +#include "linux/ath9k_platform.h"
10 static char *dev_info = "ath9k";
11 @@ -535,8 +536,14 @@ static int ath9k_init_softc(u16 devid, s
14 pdata = (struct ath9k_platform_data *) sc->dev->platform_data;
17 ah->ah_flags |= AH_USE_EEPROM;
18 + sc->sc_ah->led_pin = -1;
20 + sc->sc_ah->gpio_mask = pdata->gpio_mask;
21 + sc->sc_ah->gpio_val = pdata->gpio_val;
22 + sc->sc_ah->led_pin = pdata->led_pin;
25 common = ath9k_hw_common(ah);
26 common->ops = &ath9k_common_ops;
27 --- a/drivers/net/wireless/ath/ath9k/hw.h
28 +++ b/drivers/net/wireless/ath/ath9k/hw.h
29 @@ -750,7 +750,7 @@ struct ath_hw {
38 --- a/drivers/net/wireless/ath/ath9k/gpio.c
39 +++ b/drivers/net/wireless/ath/ath9k/gpio.c
40 @@ -147,10 +147,12 @@ void ath_init_leds(struct ath_softc *sc)
41 if (AR_SREV_9100(sc->sc_ah))
44 - if (AR_SREV_9287(sc->sc_ah))
45 - sc->sc_ah->led_pin = ATH_LED_PIN_9287;
47 - sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
48 + if (sc->sc_ah->led_pin < 0) {
49 + if (AR_SREV_9287(sc->sc_ah))
50 + sc->sc_ah->led_pin = ATH_LED_PIN_9287;
52 + sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
55 /* Configure gpio 1 for output */
56 ath9k_hw_cfg_output(sc->sc_ah, sc->sc_ah->led_pin,
57 --- a/include/linux/ath9k_platform.h
58 +++ b/include/linux/ath9k_platform.h
60 struct ath9k_platform_data {
61 u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS];
69 #endif /* _LINUX_ATH9K_PLATFORM_H */