#
# Copyright (C) 2014-2016 OpenWrt.org
# Copyright (C) 2016 LEDE-Project.org
#

. /lib/functions/uci-defaults.sh

board_config_update

board=$(board_name)
boardname="${board##*,}"

case "$board" in
ctera,c200-v2)
	ucidef_set_led_usbport "usb2" "USB2" "green:usb-2" "usb1-port1" "usb2-port1"
	ucidef_set_led_usbport "usb3" "USB3" "green:usb-1" "usb1-port2" "usb2-port2"
	;;
kobol,helios4)
	ucidef_set_led_usbport "USB" "USB" "helios4:green:usb" "usb1-port1" "usb2-port1" "usb3-port1" "usb4-port1" "usb5-port1"
	;;
linksys,wrt1200ac)
	ucidef_set_led_netdev "wan" "WAN" "pca963x:caiman:white:wan" "wan"
	ucidef_set_led_usbport "usb1" "USB 1" "pca963x:caiman:white:usb2" "usb1-port1"
	ucidef_set_led_usbport "usb2" "USB 2" "pca963x:caiman:white:usb3_1" "usb2-port1" "usb3-port1"
	ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:caiman:white:usb3_2" "usb3-port1"
	;;
linksys,wrt1900ac-v1)
	ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "wan"
	ucidef_set_led_usbport "usb1" "USB 1" "mamba:white:usb2" "usb1-port1"
	ucidef_set_led_usbport "usb2" "USB 2" "mamba:white:usb3_1" "usb2-port1" "usb3-port1"
	ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "mamba:white:usb3_2" "usb3-port2"
	;;
linksys,wrt1900ac-v2)
	ucidef_set_led_netdev "wan" "WAN" "pca963x:cobra:white:wan" "wan"
	ucidef_set_led_usbport "usb1" "USB 1" "pca963x:cobra:white:usb2" "usb1-port1"
	ucidef_set_led_usbport "usb2" "USB 2" "pca963x:cobra:white:usb3_1" "usb2-port1" "usb3-port1"
	ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:cobra:white:usb3_2" "usb3-port1"
	;;
linksys,wrt1900acs)
	ucidef_set_led_netdev "wan" "WAN" "pca963x:shelby:white:wan" "wan"
	ucidef_set_led_usbport "usb1" "USB 1" "pca963x:shelby:white:usb2" "usb1-port1"
	ucidef_set_led_usbport "usb2" "USB 2" "pca963x:shelby:white:usb3_1" "usb2-port1" "usb3-port1"
	ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:shelby:white:usb3_2" "usb3-port1"
	;;
linksys,wrt3200acm)
	ucidef_set_led_netdev "wan" "WAN" "pca963x:rango:white:wan" "wan"
	ucidef_set_led_usbport "usb1" "USB 1" "pca963x:rango:white:usb2" "usb1-port1"
	ucidef_set_led_usbport "usb2" "USB 2" "pca963x:rango:white:usb3_1" "usb2-port1" "usb3-port1"
	ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:rango:white:usb3_2" "usb3-port1"
	;;
linksys,wrt32x)
	ucidef_set_led_netdev "wan" "WAN" "pca963x:venom:blue:wan" "wan"
	ucidef_set_led_usbport "usb1" "USB 1" "pca963x:venom:blue:usb2" "usb1-port1"
	ucidef_set_led_usbport "usb2" "USB 2" "pca963x:venom:blue:usb3_1" "usb2-port1" "usb3-port1"
	ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:venom:blue:usb3_2" "usb3-port1"
	;;
esac

board_config_flush

exit 0
