Alter DTS for Belkin F9K1109v1 to trigger USB leds from the echi/ochi ports. Signed-off-by: Kip Porterfield <kip.porterfield@gmail.com>
34 lines
646 B
Bash
Executable file
34 lines
646 B
Bash
Executable file
#!/bin/sh
|
|
|
|
. /lib/functions/leds.sh
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
set_wifi_led() {
|
|
ucidef_set_led_netdev "wifi_led" "wifi" "${1}" "${2:-wlan0}"
|
|
}
|
|
|
|
|
|
board=$(board_name)
|
|
boardname="${board##*,}"
|
|
|
|
board_config_update
|
|
|
|
led_wlan="$(get_dt_led wlan)"
|
|
[ -n "$led_wlan" ] && ucidef_set_led_wlan "wifi_led" "wifi" "$led_wlan" "phy0tpt"
|
|
|
|
case $board in
|
|
belkin,f9k1109v1)
|
|
ucidef_set_led_netdev "lan" "lan" "$boardname:blue:wps" "eth0"
|
|
;;
|
|
edimax,br-6475nd)
|
|
set_wifi_led "$boardname:amber:wlan"
|
|
;;
|
|
omnima,hpm)
|
|
ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0"
|
|
set_wifi_led "$boardname:green:wifi"
|
|
;;
|
|
esac
|
|
|
|
board_config_flush
|
|
|
|
exit 0
|