
. /lib/functions/leds.sh
. /lib/functions/uci-defaults.sh

board=$(board_name)

board_config_update

case $board in
aigale,ai-br100)
	ucidef_set_led_netdev "wan" "wan" "blue:wan" "eth0.2"
	ucidef_set_led_netdev "wifi_led" "wifi" "blue:wlan" "wlan0"
	;;
alfa-network,ac1200rm)
	ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan2g" "wlan1"
	;;
alfa-network,r36m-e4g)
	ucidef_set_led_netdev "4g" "4g" "orange:4g" "wwan0"
	ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x8"
	ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
	;;
alfa-network,tube-e4g)
	ucidef_set_led_netdev "4g" "4g" "green:4g" "wwan0"
	ucidef_set_led_netdev "lan" "lan" "blue:lan" "eth0"
	;;
asus,rp-n53)
	ucidef_set_led_netdev "eth" "Network" "white:back" "eth0"
	ucidef_set_led_netdev "wifi_led" "wifi" "blue:wifi" "wlan0"
	;;
asus,rt-n12p)
	ucidef_set_led_netdev "lan" "lan" "green:lan" eth0.1
	ucidef_set_led_netdev "wan" "wan" "green:wan" eth0.2
	ucidef_set_led_netdev "wifi_led" "wifi" "green:air" "wlan0"
	;;
asus,rt-n14u)
	ucidef_set_led_netdev "lan" "lan" "blue:lan" eth0.1
	ucidef_set_led_netdev "wan" "wan" "blue:wan" eth0.2
	ucidef_set_led_netdev "wifi_led" "wifi" "blue:air" "wlan0"
	;;
bdcom,wap2100-sk)
	ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan2g" "wlan0"
	;;
comfast,cf-wr800n)
	ucidef_set_led_netdev "lan" "lan" "white:ethernet" eth0.1
	ucidef_set_led_netdev "wifi_led" "wifi" "white:wifi" "wlan0"
	;;
dlink,dir-810l|\
trendnet,tew-810dr)
	ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
	;;
dlink,dwr-116-a1|\
head-weblink,hdrm200|\
ohyeah,oy-0001|\
planex,mzk-ex300np|\
zbtlink,zbt-we826-16m|\
zbtlink,zbt-we826-32m|\
zbtlink,zbt-wr8305rt|\
zyxel,keenetic-omni|\
zyxel,keenetic-omni-ii|\
zyxel,keenetic-viva)
	ucidef_set_led_netdev "wifi_led" "wifi" "green:wifi" "wlan0"
	;;
dlink,dwr-118-a1)
	ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1f"
	ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x20"
	ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan2g" "wlan1"
	;;
dlink,dwr-118-a2)
	ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e"
	ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
	ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan2g" "wlan1"
	;;
dlink,dwr-921-c1|\
dlink,dwr-922-e2)
	ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x0f"
	ucidef_set_led_netdev "signalstrength" "signalstrength" "green:sigstrength" "wwan0" "link"
	ucidef_set_led_netdev "4g" "4g" "green:4g" "wwan0" "tx rx"
	ucidef_set_led_netdev "wifi_led" "wifi" "green:wifi" "wlan0"
	;;
dlink,dwr-960)
	ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x2e"
	ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
	;;
domywifi,dm202|\
domywifi,dm203|\
domywifi,dw22d)
	ucidef_set_led_switch "lan1" "lan1" "amber:lan1" "switch0" "0x02"
	ucidef_set_led_switch "lan2" "lan2" "amber:lan2" "switch0" "0x04"
	ucidef_set_led_switch "lan3" "lan3" "amber:lan3" "switch0" "0x08"
	ucidef_set_led_switch "lan4" "lan4" "amber:lan4" "switch0" "0x10"
	ucidef_set_led_switch "wan" "wan" "amber:wan" "switch0" "0x01"
		;;
dovado,tiny-ac)
	ucidef_set_led_netdev "wifi_led" "wifi" "orange:wifi" "wlan0"
	;;
edimax,br-6478ac-v2|\
edimax,ew-7478apc)
	ucidef_set_led_netdev "wifi_led" "wifi" "blue:wlan" "wlan0"
	;;
edimax,ew-7476rpc|\
edimax,ew-7478ac)
	ucidef_set_led_switch "lan" "lan" "green:lan"  "switch0" "0x20"
	;;
elecom,wrh-300cr)
	ucidef_set_led_netdev "lan" "lan" "green:ethernet" "eth0"
	ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan" "wlan0"
	;;
engenius,esr600)
	ucidef_set_led_netdev "wlan5g" "5.0GHz" "blue:wlan5g" "wlan0"
	ucidef_set_led_netdev "wlan2g" "2.4GHz" "blue:wlan2g" "wlan1"
	;;
glinet,gl-mt300a|\
glinet,gl-mt300n|\
glinet,gl-mt750)
	ucidef_set_led_netdev "wifi_led" "wifi" "wlan" "wlan0"
	;;
hiwifi,hc5661|\
hiwifi,hc5761)
	ucidef_set_led_switch "internet" "internet" "blue:internet" "switch0" "0x01"
	;;
hiwifi,hc5861)
	ucidef_set_led_switch "internet" "internet" "blue:internet" "switch0" "0x20"
	;;
hnet,c108)
	ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
	ucidef_set_led_netdev "modem" "modem" "green:modem" "wwan0"
	;;
iodata,wn-ac1167gr|\
iodata,wn-ac733gr3)
	ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy0radio"
	ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy1radio"
	;;
kimax,u25awf-h1)
	ucidef_set_led_netdev "eth" "eth" "green:lan" "eth0"
	ucidef_set_led_netdev "wifi_led" "wifi" "red:wifi" "wlan0"
	;;
kimax,u35wf)
	ucidef_set_led_netdev "eth" "ETH" "green:eth" "eth0"
	ucidef_set_led_netdev "wifi_led" "wifi" "blue:wifi" "wlan0"
	;;
kingston,mlw221|\
kingston,mlwg2|\
sanlinking,d240)
	ucidef_set_led_netdev "wifi_led" "wifi" "blue:wifi" "wlan0"
	;;
lava,lr-25g001)
	ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "green:wlan2g" "wlan1"
	ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "green:wlan5g" "wlan0"
	;;
lenovo,newifi-y1)
	ucidef_set_led_netdev "wifi" "WIFI" "blue:wifi" "wlan1"
	ucidef_set_led_netdev "wifi5g" "WIFI5G" "blue:wifi5g" "wlan0"
	ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x03"
	;;
lenovo,newifi-y1s)
	ucidef_set_led_netdev "wifi" "WIFI" "yellow:wifi" "wlan1"
	ucidef_set_led_netdev "wifi5g" "WIFI5G" "blue:wifi" "wlan0"
	ucidef_set_led_netdev "wan" "WAN" "blue:internet" "eth0.2" "tx rx"
	;;
netgear,ex2700|\
netgear,wn3000rp-v3)
	ucidef_set_led_netdev "wifi_led" "wifi" "green:router" "wlan0"
	;;
netgear,ex3700|\
netgear,ex6130)
	ucidef_set_led_netdev "wlan5g" "ROUTER (green)" "green:router" "wlan0"
	ucidef_set_led_netdev "wlan2g" "DEVICE (green)" "green:device" "wlan1"
	;;
netgear,jwnr2010-v5)
	ucidef_set_led_switch "lan1" "lan1" "green:lan1" "switch0" "0x08"
	ucidef_set_led_switch "lan2" "lan2" "green:lan2" "switch0" "0x04"
	ucidef_set_led_switch "lan3" "lan3" "green:lan3" "switch0" "0x02"
	ucidef_set_led_switch "lan4" "lan4" "green:lan4" "switch0" "0x01"
	ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
	;;
phicomm,psg1208)
	ucidef_set_led_netdev "wifi_led" "wifi" "white:wlan2g" "wlan0"
	;;
planex,mzk-ex750np|\
zbtlink,zbt-we826-e)
	ucidef_set_led_netdev "wifi_led" "wifi" "red:wifi" "wlan0"
	;;
ravpower,rp-wd03)
	ucidef_set_led_netdev "internet" "internet" "green:wifi" "eth0"
	;;
tplink,archer-c2-v1)
	ucidef_set_led_switch "lan" "lan" "green:lan" "switch1" "0x1e"
	ucidef_set_led_switch "wan" "wan" "green:wan" "switch1" "0x01"
	;;
tplink,archer-c20-v1|\
tplink,archer-c20i)
	ucidef_set_led_switch "lan" "lan" "blue:lan" "switch0" "0x1e"
	ucidef_set_led_switch "wan" "wan" "blue:wan" "switch0" "0x01"
	;;
tplink,archer-c50-v1)
	ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x1e"
	ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01"
	;;
tplink,archer-mr200)
	ucidef_set_led_netdev "lan" "lan" "white:lan" "eth0.1"
	ucidef_set_led_netdev "wan" "wan" "white:wan" "usb0"
	;;
tplink,re200-v1)
	ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
	;;
wavlink,wl-wn579x3)
	ucidef_set_led_switch "lan" "lan" "blue:lan" "switch0" "0x20"
	ucidef_set_led_switch "wan" "wan" "blue:wan" "switch0" "0x10"
	;;
xiaomi,miwifi-mini)
	ucidef_set_led_switch "lan1" "lan1" "green:lan1" "switch0" "0x02"
	ucidef_set_led_switch "lan2" "lan2" "green:lan2" "switch0" "0x01"
	ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
	;;
zbtlink,zbt-ape522ii)
	ucidef_set_led_netdev "wlan2g4" "wlan1-link" "green:wlan2g4" "wlan1"
	ucidef_set_led_netdev "sys1" "wlan1" "green:sys1" "wlan1" "tx rx"
	ucidef_set_led_netdev "sys2" "wlan0" "green:sys2" "wlan0" "tx rx"
	;;
zbtlink,zbt-wa05)
	ucidef_set_led_netdev "wifi_led" "wifi" "blue:air" "wlan0"
	;;
zbtlink,zbt-we1026-5g-16m)
	ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
	ucidef_set_led_netdev "wifi_led" "wifi" "green:wifi" "wlan0"
	;;
zbtlink,zbt-we1026-h-32m)
	ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x8"
	ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
	ucidef_set_led_netdev "wifi_led" "wifi" "green:wifi" "wlan0"
	;;
zbtlink,zbt-we2026)
	ucidef_set_led_netdev "wifi_led" "wifi" "green:wlan" "wlan0"
	;;
esac

board_config_flush

exit 0
