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
|
2012-07-12 13:29:46 +00:00
|
|
|
3g-6200n)
|
|
|
|
set_wifi_led "edimax:amber:wlan"
|
|
|
|
set_usb_led "edimax:blue:3g"
|
|
|
|
;;
|
2013-04-03 10:00:03 +00:00
|
|
|
3g-6200nl)
|
|
|
|
set_wifi_led "edimax:green:wlan"
|
|
|
|
;;
|
2013-01-19 17:05:06 +00:00
|
|
|
3g300m)
|
|
|
|
set_usb_led "tenda:blue:3g"
|
|
|
|
;;
|
2014-10-29 11:01:17 +00:00
|
|
|
a5-v11)
|
|
|
|
ucidef_set_led_default "power" "POWER" "a5-v11:red:power" "1"
|
|
|
|
;;
|
2012-12-29 17:50:32 +00:00
|
|
|
air3gii)
|
|
|
|
set_wifi_led "airlive:green:wlan"
|
|
|
|
set_usb_led "airlive:green:mobile"
|
|
|
|
;;
|
2012-01-24 11:48:47 +00:00
|
|
|
all0256n)
|
2012-08-22 09:46:30 +00:00
|
|
|
ucidef_set_rssimon "wlan0" "40000" "1"
|
|
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "all0256n:green:rssilow" "wlan0" "1" "40" "0" "6"
|
|
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "all0256n:green:rssimed" "wlan0" "30" "80" "-29" "5"
|
|
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0256n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
|
2012-01-24 11:48:47 +00:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2014-11-03 08:00:13 +00:00
|
|
|
ar670w|\
|
|
|
|
ar725w|\
|
2014-06-13 09:16:15 +00:00
|
|
|
awapn2403)
|
|
|
|
set_wifi_led "rt2800soc-phy0::radio"
|
|
|
|
;;
|
2013-04-25 19:02:53 +00:00
|
|
|
asl26555)
|
|
|
|
ucidef_set_led_default "power" "POWER" "asl26555:green:power" "1"
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0"
|
|
|
|
set_wifi_led "asl26555:green:wlan"
|
|
|
|
set_usb_led "asl26555:green:3g"
|
|
|
|
;;
|
2011-10-24 21:49:36 +00:00
|
|
|
bc2)
|
|
|
|
set_usb_led "bc2:blue:usb"
|
|
|
|
;;
|
2013-02-02 17:01:50 +00:00
|
|
|
br6425)
|
|
|
|
set_wifi_led "edimax:orange:wlan"
|
|
|
|
;;
|
2014-01-15 18:29:44 +00:00
|
|
|
br-6475nd)
|
|
|
|
set_wifi_led "edimax:amber:wlan"
|
|
|
|
;;
|
2012-12-10 14:13:01 +00:00
|
|
|
broadway)
|
|
|
|
set_usb_led "red:diskmounted"
|
|
|
|
set_wifi_led "red:wps_active"
|
|
|
|
;;
|
2013-01-06 11:11:42 +00:00
|
|
|
br6524n)
|
|
|
|
set_wifi_led "edimax:blue:wlan"
|
|
|
|
;;
|
2014-06-02 12:42:52 +00:00
|
|
|
cy-swr1100)
|
|
|
|
ucidef_set_led_default "wps" "WPS" "samsung:blue:wps" "0"
|
|
|
|
set_usb_led "samsung:blue:usb"
|
|
|
|
;;
|
2013-04-03 10:00:08 +00:00
|
|
|
d105)
|
|
|
|
ucidef_set_led_default "power" "POWER" "d105:red:power" "1"
|
|
|
|
set_usb_led "d105:green:usb"
|
|
|
|
;;
|
2012-05-29 16:39:03 +00:00
|
|
|
dir-300-b1|\
|
|
|
|
dir-600-b1|\
|
2012-08-12 12:48:24 +00:00
|
|
|
dir-600-b2|\
|
|
|
|
dir-620-a1)
|
2012-05-29 16:39:03 +00:00
|
|
|
# ANDed with vlan switch port 4 led state
|
2012-05-29 16:39:18 +00:00
|
|
|
ucidef_set_led_default "wan" "WAN LED (amber)" "d-link:amber:wan" "1"
|
2012-08-12 12:48:24 +00:00
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
2012-05-29 16:39:03 +00:00
|
|
|
;;
|
2012-11-25 14:25:27 +00:00
|
|
|
dir-615-d|\
|
2012-08-17 17:56:05 +00:00
|
|
|
dir-615-h1)
|
|
|
|
ucidef_set_led_default "status" "Status LED (amber)" "d-link:amber:status" "0"
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2013-04-25 19:02:48 +00:00
|
|
|
dir-620-d1)
|
|
|
|
set_wifi_led "d-link:green:wifi"
|
|
|
|
;;
|
2013-08-14 18:15:35 +00:00
|
|
|
dir-810l)
|
2014-10-06 04:52:36 +00:00
|
|
|
ucidef_set_led_default "power" "POWER" "d-link:green:power" "1"
|
2013-08-14 18:15:35 +00:00
|
|
|
;;
|
2013-08-14 19:35:27 +00:00
|
|
|
dir-610-a1 |\
|
2013-09-18 16:31:37 +00:00
|
|
|
dir-300-b7 |\
|
|
|
|
dir-320-b1 |\
|
2011-12-23 14:27:10 +00:00
|
|
|
esr-9753)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2012-01-23 10:23:32 +00:00
|
|
|
f5d8235-v1)
|
|
|
|
set_usb_led "f5d8235-v1:blue:storage"
|
|
|
|
;;
|
|
|
|
f5d8235-v2)
|
|
|
|
set_usb_led "f5d8235v2:blue:storage"
|
|
|
|
;;
|
2011-10-24 21:49:31 +00:00
|
|
|
fonera20n)
|
2012-07-24 20:38:31 +00:00
|
|
|
set_usb_led "fonera20n:orange:usb"
|
|
|
|
set_wifi_led "fonera20n:orange:wifi"
|
2011-10-24 21:49:31 +00:00
|
|
|
;;
|
2014-01-12 12:07:40 +00:00
|
|
|
hlk-rm04)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2014-10-06 04:52:07 +00:00
|
|
|
ht-tm02)
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "ht-tm02:white:status" "eth0"
|
|
|
|
set_wifi_led "ht-tm02:blue:wifi"
|
|
|
|
;;
|
2012-08-17 17:56:07 +00:00
|
|
|
all0239-3g|\
|
2011-10-24 21:49:31 +00:00
|
|
|
hw550-3g)
|
|
|
|
set_usb_led "hw550-3g:green:usb"
|
|
|
|
;;
|
2014-07-26 20:36:22 +00:00
|
|
|
mlw221)
|
|
|
|
set_wifi_led "kingston:blue:wifi"
|
2014-08-01 11:19:39 +00:00
|
|
|
ucidef_set_led_default "system" "system" "kingston:blue:system" "1"
|
2014-07-26 20:36:22 +00:00
|
|
|
;;
|
2011-10-24 21:49:31 +00:00
|
|
|
mofi3500-3gn)
|
|
|
|
set_usb_led "mofi3500-3gn:green:usb"
|
|
|
|
;;
|
2013-07-27 09:23:52 +00:00
|
|
|
mpr-a1)
|
2014-08-18 13:09:39 +00:00
|
|
|
set_wifi_led "hame:blue:system"
|
2013-07-27 09:23:52 +00:00
|
|
|
;;
|
2013-06-10 08:24:56 +00:00
|
|
|
mpr-a2)
|
2014-08-18 13:09:39 +00:00
|
|
|
set_wifi_led "hame:blue:system"
|
2013-06-10 08:24:56 +00:00
|
|
|
;;
|
2012-12-29 17:50:38 +00:00
|
|
|
mzk-w300nh2)
|
|
|
|
set_wifi_led "mzkw300nh2:amber:wlan"
|
|
|
|
;;
|
2014-02-18 13:33:25 +00:00
|
|
|
na930)
|
|
|
|
set_usb_led "na930:blue:status"
|
|
|
|
;;
|
2011-10-24 21:49:31 +00:00
|
|
|
nw718)
|
|
|
|
set_usb_led "nw718:amber:usb"
|
|
|
|
;;
|
2013-02-02 17:21:05 +00:00
|
|
|
omni-emb-hpm)
|
|
|
|
ucidef_set_led_default "power" "POWER" "emb:orange:power" "1"
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "emb:green:eth" "eth0"
|
|
|
|
set_wifi_led "emb:green:wifi"
|
|
|
|
;;
|
2014-08-18 16:09:21 +00:00
|
|
|
omni-plug)
|
|
|
|
set_wifi_led "miniplug:green:wlan"
|
|
|
|
set_usb_led "miniplug:green:mobile"
|
|
|
|
;;
|
2014-04-22 08:08:51 +00:00
|
|
|
px4885)
|
|
|
|
set_wifi_led "7links:orange:wifi"
|
|
|
|
set_usb_led "7links:blue:storage"
|
|
|
|
;;
|
2012-02-19 16:44:49 +00:00
|
|
|
sl-r7205)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2012-02-15 21:13:11 +00:00
|
|
|
v11st-fe)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2014-08-01 20:51:24 +00:00
|
|
|
vocore)
|
|
|
|
ucidef_set_led_netdev "eth" "ETH" "vocore:orange:eth" "eth0"
|
|
|
|
set_wifi_led "vocore:green:status"
|
|
|
|
;;
|
2012-04-21 12:30:40 +00:00
|
|
|
w306r-v20)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2011-12-28 08:43:32 +00:00
|
|
|
w502u)
|
|
|
|
set_usb_led "alfa:blue:usb"
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2012-01-23 10:23:32 +00:00
|
|
|
wcr-150gn)
|
|
|
|
set_usb_led "wcr150gn:amber:user"
|
|
|
|
;;
|
2013-07-22 15:36:39 +00:00
|
|
|
hg255d)
|
|
|
|
set_wifi_led "hg255d:wlan"
|
|
|
|
set_usb_led "hg255d:usb"
|
2014-08-18 13:09:20 +00:00
|
|
|
ucidef_set_led_interface "lan" "hg255d:internet"
|
2013-07-22 15:36:39 +00:00
|
|
|
;;
|
2013-04-09 14:19:33 +00:00
|
|
|
wnce2001)
|
|
|
|
set_wifi_led "netgear:green:wlan"
|
|
|
|
;;
|
2013-12-25 17:04:50 +00:00
|
|
|
rt-n14u)
|
|
|
|
ucidef_set_led_default "power" "power" "asus:blue:power" "1"
|
2014-08-18 13:09:20 +00:00
|
|
|
ucidef_set_led_interafce "lan" "asus:blue:lan"
|
|
|
|
ucidef_set_led_netdev "wan" "asus:blue:wan"
|
2013-12-25 17:04:50 +00:00
|
|
|
set_wifi_led "asus:blue:air"
|
|
|
|
set_usb_led "asus:blue:usb"
|
|
|
|
;;
|
2013-08-14 18:15:35 +00:00
|
|
|
rp-n53)
|
|
|
|
ucidef_set_led_netdev "eth" "Network" "asus:white:back" "eth0"
|
|
|
|
set_wifi_led "asus:blue:wifi"
|
|
|
|
;;
|
2013-10-28 06:47:31 +00:00
|
|
|
whr-300hp2 |\
|
2014-07-01 10:26:42 +00:00
|
|
|
whr-600d |\
|
|
|
|
whr-1166d)
|
2013-10-28 06:47:31 +00:00
|
|
|
ucidef_set_led_default "power" "power" "buffalo:green:power" "1"
|
|
|
|
ucidef_set_led_default "router" "router" "buffalo:green:router" "1"
|
|
|
|
;;
|
2014-07-10 22:02:28 +00:00
|
|
|
zbt-wa05)
|
|
|
|
ucidef_set_led_default "power" "power" "zbtlink:blue:power" "1"
|
|
|
|
set_wifi_led "zbtlink:blue:air"
|
|
|
|
set_usb_led "zbtlink:blue:usb"
|
|
|
|
;;
|
2014-07-12 06:54:03 +00:00
|
|
|
wr8305rt)
|
|
|
|
ucidef_set_led_default "power" "power" "wr8305rt:sys" "1"
|
|
|
|
set_usb_led "wr8305rt:usb"
|
|
|
|
set_wifi_led "wr8305rt:wifi"
|
|
|
|
;;
|
2014-10-10 08:56:43 +00:00
|
|
|
wt1520)
|
|
|
|
set_wifi_led "rt2800pci-phy0::radio"
|
|
|
|
;;
|
2014-10-20 06:28:48 +00:00
|
|
|
wt3020)
|
|
|
|
ucidef_set_led_default "power" "power" "nexx:blue:power" "0"
|
|
|
|
;;
|
2014-08-03 11:13:52 +00:00
|
|
|
y1 |\
|
|
|
|
y1s)
|
|
|
|
ucidef_set_led_default "power" "power" "lenovo:blue:power" "1"
|
|
|
|
set_usb_led "lenovo:blue:usb"
|
|
|
|
set_wifi_led "lenovo:blue:wifi"
|
|
|
|
;;
|
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
|