aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-03-02 13:22:40 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-03-02 13:22:40 +0000
commitb68129bb095bc225e2bb04780bf68712fd55b5db (patch)
treede1db0df5bc9b874387f8a4aa617bd6eccbd2a8c /package/kernel/mac80211
parent53c5026eb9ec65dbf866cf20c7361ee1f8bedb75 (diff)
downloadmaster-187ad058-b68129bb095bc225e2bb04780bf68712fd55b5db.tar.gz
master-187ad058-b68129bb095bc225e2bb04780bf68712fd55b5db.tar.bz2
master-187ad058-b68129bb095bc225e2bb04780bf68712fd55b5db.zip
mac80211: ath9k: enable platform WLAN LED name
Enable platform-supplied WLAN LED name for ath9k device. Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> Acked-by: Hartmut Knaack <knaack.h@gmx.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48879 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211')
-rw-r--r--package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch b/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch
new file mode 100644
index 0000000000..8d2d899112
--- /dev/null
+++ b/package/kernel/mac80211/patches/546-ath9k_platform_led_name.patch
@@ -0,0 +1,48 @@
+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
+@@ -132,15 +132,19 @@ void ath_init_leds(struct ath_softc *sc)
+ if (AR_SREV_9100(sc->sc_ah))
+ return;
+
+- 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",
++ wiphy_name(sc->hw->wiphy));
+
+ if (ath9k_led_blink)
+ trigger = sc->led_default_trigger;
+ else
+ trigger = ieee80211_get_radio_led_name(sc->hw);
+
+- ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, !sc->sc_ah->config.led_active_high);
++ ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger,
++ !sc->sc_ah->config.led_active_high);
+
+ if (!pdata)
+ return;
+--- a/include/linux/ath9k_platform.h
++++ b/include/linux/ath9k_platform.h
+@@ -45,6 +45,7 @@ struct ath9k_platform_data {
+
+ int num_leds;
+ const struct gpio_led *leds;
++ const char *led_name;
+ };
+
+ #endif /* _LINUX_ATH9K_PLATFORM_H */