2016-03-02 13:22:40 +00:00
|
|
|
From: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
|
|
|
|
Date: Sun, 31 Jan 2016 20:45:57 +0100
|
|
|
|
Subject: [PATCH v4 1/8] mac80211: ath9k: enable platform WLAN LED name
|
|
|
|
|
|
|
|
Enable platform-supplied WLAN LED name for ath9k device. It replaces generic
|
|
|
|
'ath9k-phy*' label with string set during platform initialization.
|
|
|
|
|
|
|
|
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
|
|
|
|
---
|
|
|
|
drivers/net/wireless/ath/ath9k/gpio.c | 10 +++++++---
|
|
|
|
include/linux/ath9k_platform.h | 1 +
|
|
|
|
2 files changed, 8 insertions(+), 3 deletions(-)
|
|
|
|
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
2016-05-14 15:38:56 +00:00
|
|
|
@@ -155,8 +155,11 @@ void ath_init_leds(struct ath_softc *sc)
|
|
|
|
|
|
|
|
ath_fill_led_pin(sc);
|
2016-03-02 13:22:40 +00:00
|
|
|
|
|
|
|
- snprintf(led_name, sizeof(led_name), "ath9k-%s",
|
|
|
|
- wiphy_name(sc->hw->wiphy));
|
|
|
|
+ if (pdata && pdata->led_name)
|
|
|
|
+ strncpy(led_name, pdata->led_name, sizeof(led_name));
|
|
|
|
+ else
|
|
|
|
+ snprintf(led_name, sizeof(led_name), "ath9k-%s",
|
2016-05-14 15:38:56 +00:00
|
|
|
+ wiphy_name(sc->hw->wiphy));
|
2016-03-02 13:22:40 +00:00
|
|
|
|
|
|
|
if (ath9k_led_blink)
|
|
|
|
trigger = sc->led_default_trigger;
|
|
|
|
--- a/include/linux/ath9k_platform.h
|
|
|
|
+++ b/include/linux/ath9k_platform.h
|
2016-05-14 15:38:56 +00:00
|
|
|
@@ -49,6 +49,7 @@ struct ath9k_platform_data {
|
2016-03-02 13:22:40 +00:00
|
|
|
|
|
|
|
int num_leds;
|
|
|
|
const struct gpio_led *leds;
|
|
|
|
+ const char *led_name;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _LINUX_ATH9K_PLATFORM_H */
|