1 --- a/include/linux/ath9k_platform.h
2 +++ b/include/linux/ath9k_platform.h
3 @@ -32,6 +32,9 @@ struct ath9k_platform_data {
5 int (*get_mac_revision)(void);
6 int (*external_reset)(void);
9 + const struct gpio_led *leds;
12 #endif /* _LINUX_ATH9K_PLATFORM_H */
13 --- a/drivers/net/wireless/ath/ath9k/gpio.c
14 +++ b/drivers/net/wireless/ath/ath9k/gpio.c
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 +#include <linux/ath9k_platform.h>
22 /********************************/
23 @@ -88,6 +89,24 @@ int ath_create_gpio_led(struct ath_softc
27 +static int ath_create_platform_led(struct ath_softc *sc,
28 + const struct gpio_led *gpio)
30 + struct ath_led *led;
33 + led = kzalloc(sizeof(*led), GFP_KERNEL);
38 + ret = ath_add_led(sc, led);
45 void ath_deinit_leds(struct ath_softc *sc)
48 @@ -103,8 +122,10 @@ void ath_deinit_leds(struct ath_softc *s
50 void ath_init_leds(struct ath_softc *sc)
52 + struct ath9k_platform_data *pdata = sc->dev->platform_data;
57 INIT_LIST_HEAD(&sc->leds);
59 @@ -133,6 +154,9 @@ void ath_init_leds(struct ath_softc *sc)
60 trigger = ieee80211_get_radio_led_name(sc->hw);
62 ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, 1);
64 + for (i = 0; i < pdata->num_leds; i++)
65 + ath_create_platform_led(sc, &pdata->leds[i]);