aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorChuanhong Guo <gch981213@gmail.com>2017-12-29 12:35:32 +0800
committerMathias Kresin <dev@kresin.me>2018-01-09 22:09:26 +0100
commit987a7e31759c0ef3124d521f434bd2d96ed89d6a (patch)
treec4a4e1ff72e29ea7db6edd9ed8ab36aa45953092 /target/linux/ramips
parentdbb5ffaed5d887c3c6b476ef7974fc05ddafd215 (diff)
downloadupstream-987a7e31759c0ef3124d521f434bd2d96ed89d6a.tar.gz
upstream-987a7e31759c0ef3124d521f434bd2d96ed89d6a.tar.bz2
upstream-987a7e31759c0ef3124d521f434bd2d96ed89d6a.zip
ramips: fix lenovo newifi-y1 switch and LED config
There are 3 ethernet ports on Y1. LAN1 on port1, LAN2 on port0 and WAN on port4. Use a standalone switch configuration to match this and use the switch trigger so that LAN LED could indicate the connetction status for both lan ports correctly. This patch also drop the internet led configuration, because there is a WAN led for port4 and eth0.2 isn't always used as WAN. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/ramips')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/01_leds3
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network5
2 files changed, 5 insertions, 3 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 e8c29fa037..cc30999e1c 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -351,8 +351,7 @@ y1)
set_usb_led "$board:blue:usb"
ucidef_set_led_netdev "wifi" "WIFI" "$board:blue:wifi" "wlan1"
ucidef_set_led_netdev "wifi5g" "WIFI5G" "$board:blue:wifi5g" "wlan0"
- ucidef_set_led_netdev "lan" "LAN" "$board:blue:lan" "eth0.1" "tx rx"
- ucidef_set_led_netdev "wan" "WAN" "$board:blue:internet" "eth0.2" "tx rx"
+ ucidef_set_led_switch "lan" "LAN" "$board:blue:lan" "switch0" "0x03"
;;
y1s)
set_usb_led "$board:blue:usb"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 1778dc9329..17d25b1954 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -100,7 +100,6 @@ ramips_setup_interfaces()
wl-wn575a3|\
wndr3700v5|\
wt1520|\
- y1|\
youku-yk1|\
zbt-ape522ii|\
zbt-we826|\
@@ -282,6 +281,10 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "0:wan" "6@eth0"
;;
+ y1)
+ ucidef_add_switch "switch0" \
+ "0:lan:2" "1:lan:1" "4:wan" "6@eth0"
+ ;;
*)
RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350)"`
if [ -n "${RT3X5X}" ]; then