diff mbox series

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

Message ID 20181102195201.26409-1-hexa@darmstadt.ccc.de
State Accepted
Headers show
Series [OpenWrt-Devel] ramips: fix leds on GL.iNet GL-MT300N-V2 | expand

Commit Message

Martin Weinelt Nov. 2, 2018, 7:52 p.m. UTC
From: Martin Weinelt <hexa@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@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(-)

Comments

Alexander 'lynxis' Couzens Nov. 2, 2018, 9:05 p.m. UTC | #1
Hi hexa,

thanks for your patch.

Best,
lynxis
diff mbox series

Patch

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>;
 		};