[OpenWrt-Devel] [PATCH] ar71xx: Add usable, inactive LEDs on OpenMesh devices

Sven Eckelmann sven.eckelmann at open-mesh.com
Fri Nov 11 10:26:27 EST 2016


From: Jaylin Yu <jaylin.yu at open-mesh.com>

OpenMesh devices have often LEDs which are not yet used by OpenWrt. These
should still be available as disabled LEDs in the system configuration for
easier modification.

Signed-off-by: Jaylin Yu <jaylin.yu at open-mesh.com>
[sven.eckelmann at open-mesh.com: Remove LEDs already specified via diag.sh,
 add wifi/status LEDs]
Signed-off-by: Sven Eckelmann <sven.eckelmann at open-mesh.com>
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds
index d11369c..ec27e5b 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -328,6 +328,16 @@ mr18)
 
 mr600)
 	ucidef_set_led_wlan "wlan58" "WLAN58" "mr600:green:wlan58" "phy0tpt"
+	ucidef_set_led_default "wps" "WPS" "mr600:blue:wps" "0"
+	;;
+
+mr600v2)
+	ucidef_set_led_default "wlan24-red" "WLAN 2.4GHz (red)" "mr600:red:wlan24" "0"
+	ucidef_set_led_default "wlan24-yellow" "WLAN 2.4GHz (yellow)" "mr600:yellow:wlan24" "0"
+	ucidef_set_led_wlan "wlan24-green" "WLAN 4GHz (green)" "mr600:green:wlan24" "phy1tpt"
+	ucidef_set_led_default "wlan5-red" "WLAN 5GHz (red)" "mr600:red:wlan58" "0"
+	ucidef_set_led_default "wlan5-yellow" "WLAN 5GHz (yellow)" "mr600:yellow:wlan58" "0"
+	ucidef_set_led_wlan "wlan5-green" "WLAN 5GHz (green)" "mr600:green:wlan58" "phy0tpt"
 	;;
 
 mr1750 | \
@@ -335,6 +345,8 @@ mr1750v2)
 	ucidef_set_led_netdev "lan" "LAN" "mr1750:blue:wan" "eth0"
 	ucidef_set_led_wlan "wlan58" "WLAN58" "mr1750:blue:wlan58" "phy0tpt"
 	ucidef_set_led_wlan "wlan24" "WLAN24" "mr1750:blue:wlan24" "phy1tpt"
+	ucidef_set_led_default "status-red" "Status (red)" "mr900:red:wifi" "0"
+	ucidef_set_led_default "status-green" "Status (green)" "mr900:green:wifi" "0"
 	;;
 
 mr900 | \
@@ -396,17 +408,32 @@ om2p-hsv3 | \
 om2p-lc)
 	ucidef_set_led_netdev "port1" "port1" "om2p:blue:wan" "eth0"
 	ucidef_set_led_netdev "port2" "port2" "om2p:blue:lan" "eth1"
+	ucidef_set_led_default "wlan-red" "WLAN (red)" "om2p:red:wifi" "0"
+	ucidef_set_led_default "wlan-yellow" "WLAN (yellow)" "om2p:yellow:wifi" "0"
+	ucidef_set_led_default "wlan-green" "WLAN (green)" "om2p:green:wifi" "0"
 	;;
 
 om5p | \
 om5p-an)
 	ucidef_set_led_netdev "port1" "port1" "om5p:blue:wan" "eth0"
 	ucidef_set_led_netdev "port2" "port2" "om5p:blue:lan" "eth1"
+	ucidef_set_led_default "wlan-red" "WLAN (red)" "om5p:red:wifi" "0"
+	ucidef_set_led_default "wlan-yellow" "WLAN (yellow)" "om5p:yellow:wifi" "0"
+	ucidef_set_led_default "wlan-green" "WLAN (green)" "om5p:green:wifi" "0"
 	;;
 
 om5p-ac)
 	ucidef_set_led_netdev "port1" "port1" "om5pac:blue:lan" "eth0"
 	ucidef_set_led_netdev "port2" "port2" "om5pac:blue:wan" "eth1"
+	ucidef_set_led_default "wlan-red" "WLAN (red)" "om5pac:red:wifi" "0"
+	ucidef_set_led_default "wlan-yellow" "WLAN (yellow)" "om5pac:yellow:wifi" "0"
+	ucidef_set_led_default "wlan-green" "WLAN (green)" "om5pac:green:wifi" "0"
+	;;
+
+om5p-acv2)
+	ucidef_set_led_default "wlan-red" "WLAN (red)" "om5pac:red:wifi" "0"
+	ucidef_set_led_default "wlan-yellow" "WLAN (yellow)" "om5pac:yellow:wifi" "0"
+	ucidef_set_led_default "wlan-green" "WLAN (green)" "om5pac:green:wifi" "0"
 	;;
 
 omy-g1)
-- 
2.10.2
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list