ramips: hc5xxx: use switch trigger for leds
authorChen Minqiang <ptpt52@gmail.com>
Wed, 6 Mar 2019 11:04:26 +0000 (19:04 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Sat, 17 Aug 2019 15:52:34 +0000 (23:52 +0800)
netdev on eth0.2 can't show link status of wan port because eth0 is
connected to builtin switch and is always link up. Use swconfig
trigger instead.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
[redo commit message]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
target/linux/ramips/base-files/etc/board.d/01_leds

index d5ea20127951d50f26ca0e0b29afba03bceb9d87..e54300dafba164a615e5ef6e0e78a69137f03e51 100755 (executable)
@@ -204,7 +204,7 @@ hauppauge,broadway)
        set_wifi_led "$boardname:red:wps_active"
        ;;
 hiwifi,hc5661)
-       ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
+       ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x01"
        set_wifi_led "$boardname:blue:wlan2g"
        ;;
 hiwifi,hc5661a|\
@@ -212,9 +212,13 @@ hiwifi,hc5761a|\
 xzwifi,creativebox-v1)
        ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x10"
        ;;
-hiwifi,hc5761|\
+hiwifi,hc5761)
+       ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x01"
+       ucidef_set_led_netdev "wifi5g" "wifi5g" "$boardname:blue:wlan5g" "wlan0"
+       ucidef_set_led_netdev "wifi2g" "wifi2g" "$boardname:blue:wlan2g" "wlan1"
+       ;;
 hiwifi,hc5861)
-       ucidef_set_led_netdev "internet" "internet" "$boardname:blue:internet" "eth0.2"
+       ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x20"
        ucidef_set_led_netdev "wifi5g" "wifi5g" "$boardname:blue:wlan5g" "wlan0"
        ucidef_set_led_netdev "wifi2g" "wifi2g" "$boardname:blue:wlan2g" "wlan1"
        ;;