2011-10-24 21:49:31 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2014-08-18 13:09:20 +00:00
|
|
|
. /lib/functions/uci-defaults-new.sh
|
2011-10-24 21:49:31 +00:00
|
|
|
. /lib/ramips.sh
|
|
|
|
|
|
|
|
set_usb_led() {
|
2012-05-29 16:39:18 +00:00
|
|
|
ucidef_set_led_usbdev "usb" "USB" "$1" "1-1"
|
2011-10-24 21:49:31 +00:00
|
|
|
}
|
|
|
|
|
2011-12-23 14:27:10 +00:00
|
|
|
set_wifi_led() {
|
2012-05-29 16:39:18 +00:00
|
|
|
ucidef_set_led_netdev "wifi_led" "wifi" "$1" "wlan0"
|
2012-05-29 16:39:03 +00:00
|
|
|
}
|
|
|
|
|
2014-08-18 13:09:20 +00:00
|
|
|
|
2011-10-24 21:49:31 +00:00
|
|
|
board=$(ramips_board_name)
|
|
|
|
|
2014-08-18 13:09:20 +00:00
|
|
|
board_config_update
|
|
|
|
|
2011-10-24 21:49:31 +00:00
|
|
|
case $board in
|
2015-08-17 06:24:47 +00:00
|
|
|
3g150b|\
|
2015-08-17 06:24:34 +00:00
|
|
|
3g300m)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:blue:3g"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
3g-6200n)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:amber:wlan"
|
|
|
|
set_usb_led "$board:blue:3g"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
3g-6200nl|\
|
|
|
|
br-6475nd|\
|
|
|
|
mzk-w300nh2)
|
|
|
|
set_wifi_led "$board:amber:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
a5-v11)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
ai-br100)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_netdev "wan" "wan" "$board:blue:wan" "eth0.2"
|
|
|
|
set_wifi_led "$board:blue:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
air3gii)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:green:wlan"
|
|
|
|
set_usb_led "$board:green:mobile"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
all0239-3g|\
|
|
|
|
hw550-3g|\
|
|
|
|
mofi3500-3gn|\
|
2015-11-24 18:29:26 +00:00
|
|
|
sap-g3200u3|\
|
|
|
|
wf-2881)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:green:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
all0256n)
|
|
|
|
ucidef_set_rssimon "wlan0" "40000" "1"
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "$board:green:rssilow" "wlan0" "1" "40" "0" "6"
|
|
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$board:green:rssimed" "wlan0" "30" "80" "-29" "5"
|
|
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$board:green:rssihigh" "wlan0" "70" "100" "-69" "8"
|
2015-08-17 06:24:34 +00:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
|
|
|
ar670w|\
|
|
|
|
ar725w|\
|
|
|
|
awapn2403)
|
|
|
|
set_wifi_led "rt2800soc-phy0::radio"
|
|
|
|
;;
|
|
|
|
asl26555)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "POWER" "$board:green:power" "1"
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "$board:green:eth" "eth0"
|
|
|
|
set_wifi_led "$board:green:wlan"
|
|
|
|
set_usb_led "$board:green:3g"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
bc2)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:blue:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
br-6425)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:orange:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
broadway)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:red:diskmounted"
|
|
|
|
set_wifi_led "$board:red:wps_active"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
cf-wr800n)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_netdev "lan" "lan" "$board:white:ethernet" eth0.1
|
|
|
|
set_wifi_led "$board:white:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
cy-swr1100)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "wps" "WPS" "$board:blue:wps" "0"
|
|
|
|
set_usb_led "$board:blue:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
d105)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
|
|
|
|
set_usb_led "$board:green:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-09-14 20:08:55 +00:00
|
|
|
db-wrt01)
|
|
|
|
ucidef_set_led_default "power" "power" "$board:orange:power" "1"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
dcs-930l-b1)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
|
|
|
|
ucidef_set_led_netdev "wifi" "WiFi" "$board:blue:wps"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
dir-300-b1|\
|
|
|
|
dir-600-b1|\
|
|
|
|
dir-600-b2|\
|
|
|
|
dir-620-a1)
|
|
|
|
ucidef_set_led_default "wan" "WAN LED (amber)" "$board:amber:wan" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
|
|
|
dir-300-b7|\
|
|
|
|
dir-320-b1|\
|
|
|
|
dir-610-a1|\
|
|
|
|
esr-9753|\
|
|
|
|
hlk-rm04|\
|
|
|
|
sl-r7205|\
|
|
|
|
v11st-fe|\
|
|
|
|
w306r-v20|\
|
|
|
|
wt1520)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
dir-615-d|\
|
2015-08-17 06:24:34 +00:00
|
|
|
dir-615-h1)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "status" "Status LED (amber)" "$board:amber:status" "0"
|
2015-08-17 06:24:34 +00:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
|
|
|
dir-620-d1)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:green:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
dir-810l|\
|
|
|
|
mzk-dp150n)
|
|
|
|
ucidef_set_led_default "power" "power" "$board:green:power" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
f5d8235-v1|\
|
2015-08-17 06:24:34 +00:00
|
|
|
f5d8235-v2)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:blue:storage"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
fonera20n)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:orange:usb"
|
|
|
|
set_wifi_led "$board:orange:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-10-05 10:25:47 +00:00
|
|
|
hc5661)
|
|
|
|
ucidef_set_led_default "system" "system" "$board:blue:system" "1"
|
|
|
|
ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
|
|
|
|
set_wifi_led "$board:blue:wlan2g"
|
|
|
|
;;
|
|
|
|
hc5761)
|
|
|
|
ucidef_set_led_default "system" "system" "$board:blue:system" "1"
|
|
|
|
ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
|
|
|
|
set_wifi_led "$board:blue:wlan2g"
|
|
|
|
ucidef_set_led_netdev "wifi5g" "wifi5g" "$board:blue:wlan5g" "rai0"
|
|
|
|
;;
|
|
|
|
hc5861)
|
|
|
|
ucidef_set_led_default "system" "system" "$board:blue:system" "1"
|
|
|
|
ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
|
|
|
|
set_wifi_led "$board:blue:wlan2g"
|
|
|
|
ucidef_set_led_netdev "wifi5g" "wifi5g" "$board:blue:wlan5g" "rai0"
|
|
|
|
ucidef_set_led_default "turbo" "turbo" "$board:blue:turbo" "0"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
hg255d)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:green:wlan"
|
|
|
|
set_usb_led "$board:green:usb"
|
2015-11-26 12:46:04 +00:00
|
|
|
ucidef_set_led_netdev "internet" "internet" "$board:green:internet" "eth0.2"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
hpm)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "POWER" "$board:orange:power" "1"
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "$board:green:eth" "eth0"
|
|
|
|
set_wifi_led "$board:green:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
ht-tm02)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_netdev "eth" "Ethernet" "$board:green:lan" "eth0"
|
|
|
|
set_wifi_led "$board:blue:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
m2m)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:blue:wifi"
|
|
|
|
ucidef_set_led_netdev "eth" "Ethernet" "$board:green:wan" "eth0"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
miniembplug)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:red:wlan"
|
|
|
|
set_usb_led "$board:green:mobile"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
miwifi-mini)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:red:status" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
mlw221|\
|
2015-08-17 06:24:34 +00:00
|
|
|
mlwg2)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:blue:wifi"
|
|
|
|
ucidef_set_led_default "system" "system" "$board:blue:system" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
mpr-a1|\
|
2015-08-17 06:24:34 +00:00
|
|
|
mpr-a2)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:blue:system"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
mr-102n)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:green:wlan"
|
|
|
|
set_usb_led "$board:green:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
na930)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:blue:status"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
nw718)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:amber:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
oy-0001)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:green:power" "1"
|
|
|
|
set_wifi_led "$board:green:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
pbr-m1)
|
2015-12-11 15:03:50 +00:00
|
|
|
ucidef_set_led_netdev "internet" "internet" "$board:blue:internet" "eth0.2"
|
|
|
|
ucidef_set_led_default "power" "power" "$board:blue:power" "1"
|
|
|
|
ucidef_set_led_default "sys" "sys" "$board:blue:sys" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
px-4885)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:orange:wifi"
|
|
|
|
set_usb_led "$board:blue:storage"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
re6500)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:white:power" "1"
|
|
|
|
ucidef_set_led_default "wifi" "wifi" "$board:orange:wifi" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
rp-n53)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_netdev "eth" "Network" "$board:white:back" "eth0"
|
|
|
|
set_wifi_led "$board:blue:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
rt-n14u)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:blue:power" "1"
|
|
|
|
ucidef_set_led_netdev "lan" "lan" "$board:blue:lan" eth0.1
|
|
|
|
ucidef_set_led_netdev "wan" "wan" "$board:blue:wan" eth0.2
|
|
|
|
set_wifi_led "$board:blue:air"
|
|
|
|
set_usb_led "$board:blue:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-11-02 10:17:51 +00:00
|
|
|
tiny-ac)
|
|
|
|
set_wifi_led "$board:orange:wifi"
|
|
|
|
set_usb_led "$board:green:usb"
|
|
|
|
;;
|
2015-08-17 06:24:34 +00:00
|
|
|
vocore)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_netdev "eth" "ETH" "$board:orange:eth" "eth0"
|
|
|
|
set_wifi_led "$board:green:status"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
w502u)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:blue:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
|
|
|
wcr-150gn)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_usb_led "$board:amber:user"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
whr-1166d|\
|
|
|
|
whr-300hp2|\
|
2015-08-17 06:24:34 +00:00
|
|
|
whr-600d)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:green:power" "1"
|
|
|
|
ucidef_set_led_default "router" "router" "$board:green:router" "1"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
wnce2001)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:green:wlan"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
wt3020)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:blue:power" "0"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-08-17 06:24:47 +00:00
|
|
|
y1|\
|
2015-08-17 06:24:34 +00:00
|
|
|
y1s)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:blue:power" "1"
|
|
|
|
set_usb_led "$board:blue:usb"
|
|
|
|
set_wifi_led "$board:blue:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
zbt-wa05)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:blue:power" "1"
|
|
|
|
set_wifi_led "$board:blue:air"
|
|
|
|
set_usb_led "$board:blue:usb"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
zbt-wr8305rt)
|
2015-08-17 06:24:47 +00:00
|
|
|
ucidef_set_led_default "power" "power" "$board:green:sys" "1"
|
|
|
|
set_usb_led "$board:green:usb"
|
|
|
|
set_wifi_led "$board:green:wifi"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
|
|
|
zte-q7)
|
2015-08-17 06:24:47 +00:00
|
|
|
set_wifi_led "$board:blue:status"
|
2015-08-17 06:24:34 +00:00
|
|
|
;;
|
2015-11-24 18:29:02 +00:00
|
|
|
youku-yk1)
|
|
|
|
ucidef_set_led_default "power" "power" "$board:blue:power" "1"
|
|
|
|
set_wifi_led "$board:blue:air"
|
|
|
|
set_usb_led "$board:blue:usb"
|
|
|
|
;;
|
2011-10-24 21:49:31 +00:00
|
|
|
esac
|
2012-05-29 16:39:18 +00:00
|
|
|
|
2014-08-18 13:09:20 +00:00
|
|
|
board_config_flush
|
2012-05-29 16:39:18 +00:00
|
|
|
|
|
|
|
exit 0
|