[OpenWrt-Devel] [PATCH] ramips: fix leds on GL.iNet GL-MT300N-V2

hexa at darmstadt.ccc.de hexa at darmstadt.ccc.de
Fri Nov 2 15:52:01 EDT 2018


From: Martin Weinelt <hexa at darmstadt.ccc.de>

The WAN LED now shows the link state. It's color is green,
not blue.

Use the physical radio for the WiFi-LED to be resilient
against changing interface names

Signed-off-by: Martin Weinelt <hexa at darmstadt.ccc.de>
---
 target/linux/ramips/base-files/etc/board.d/01_leds | 3 ++-
 target/linux/ramips/dts/GL-MT300N-V2.dts           | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 5f5e5630fd..6a1729f34d 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -149,7 +149,8 @@ gl-mt750)
 	set_wifi_led "$boardname:wlan"
 	;;
 gl-mt300n-v2)
-	set_wifi_led "$boardname:red:wlan"
+	ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x1"
+	ucidef_set_led_switch "wlan2g" "wlan2g" "$boardname:red:wlan" "phy0tpt"
 	;;
 hc5661|\
 hc5661a)
diff --git a/target/linux/ramips/dts/GL-MT300N-V2.dts b/target/linux/ramips/dts/GL-MT300N-V2.dts
index 48c43baeff..ba5a595b10 100644
--- a/target/linux/ramips/dts/GL-MT300N-V2.dts
+++ b/target/linux/ramips/dts/GL-MT300N-V2.dts
@@ -35,7 +35,7 @@
 		};
 
 		wan {
-			label = "gl-mt300n-v2:blue:wan";
+			label = "gl-mt300n-v2:green:wan";
 			gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
 		};
 
-- 
2.19.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list