01_leds 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2011 OpenWrt.org
  4. #
  5. . /lib/functions/uci-defaults.sh
  6. . /lib/ar71xx.sh
  7. board=$(ar71xx_board_name)
  8. case "$board" in
  9. airgateway)
  10. ucidef_set_led_wlan "wlan" "WLAN" "ubnt:blue:wlan" "phy0tpt"
  11. ;;
  12. alfa-nx)
  13. ucidef_set_led_netdev "wan" "WAN" "alfa:green:led_2" "eth0"
  14. ucidef_set_led_netdev "lan" "LAN" "alfa:green:led_3" "eth1"
  15. ;;
  16. all0258n)
  17. ucidef_set_rssimon "wlan0" "40000" "1"
  18. ucidef_set_led_rssi "rssilow" "RSSILOW" "all0258n:red:rssilow" "wlan0" "1" "40" "0" "6"
  19. ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "all0258n:yellow:rssimedium" "wlan0" "30" "80" "-29" "5"
  20. ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0258n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
  21. ;;
  22. all0315n)
  23. ucidef_set_rssimon "wlan0" "40000" "1"
  24. ucidef_set_led_rssi "rssilow" "RSSILOW" "all0315n:red:rssilow" "wlan0" "1" "40" "0" "6"
  25. ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "all0315n:yellow:rssimedium" "wlan0" "30" "80" "-29" "5"
  26. ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "all0315n:green:rssihigh" "wlan0" "70" "100" "-69" "8"
  27. ;;
  28. antminer-s1)
  29. ucidef_set_led_default "sys" "SYS" "antminer-s1:green:sys" "0"
  30. ucidef_set_led_wlan "wlan" "WLAN" "antminer-s1:green:wlan" "phy0tpt"
  31. ;;
  32. antminer-s3)
  33. ucidef_set_led_wlan "wlan" "WLAN" "antminer-s3:green:wlan" "phy0tpt"
  34. ucidef_set_led_default "sys" "SYS" "antminer-s3:green:sys" "0"
  35. ucidef_set_led_default "lan" "LAN" "antminer-s3:yellow:lan" "0"
  36. ;;
  37. ap113)
  38. ucidef_set_led_usbdev "usb" "USB" "ap113:green:usb" "1-1"
  39. ;;
  40. bsb)
  41. ucidef_set_led_default "sys" "SYS" "bsb:red:sys" "1"
  42. ;;
  43. bullet-m | \
  44. nanostation-m | \
  45. rocket-m | \
  46. rocket-m-xw | \
  47. nanostation-m-xw | \
  48. loco-m-xw)
  49. ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:red:link1" "wlan0" "1" "100" "0" "13"
  50. ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:orange:link2" "wlan0" "26" "100" "-25" "13"
  51. ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link3" "wlan0" "51" "100" "-50" "13"
  52. ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link4" "wlan0" "76" "100" "-75" "13"
  53. ;;
  54. bxu2000n-2-a1)
  55. ucidef_set_led_wlan "wlan" "WLAN" "bhu:green:wlan" "phy0tpt"
  56. ;;
  57. cap4200ag)
  58. ucidef_set_led_default "lan_green" "LAN_GREEN" "senao:green:lan" "1"
  59. ucidef_set_led_wlan "wlan_amber" "WLAN_AMBER" "senao:amber:wlan" "phy0tpt"
  60. ucidef_set_led_wlan "wlan_green" "WLAN_GREEN" "senao:green:wlan" "phy1tpt"
  61. ;;
  62. carambola2)
  63. ucidef_set_led_netdev "lan" "LAN" "carambola2:orange:eth0" "eth0"
  64. ucidef_set_led_netdev "wan" "WAN" "carambola2:orange:eth1" "eth1"
  65. ucidef_set_led_wlan "wlan" "WLAN" "carambola2:green:wlan" "phy0tpt"
  66. ;;
  67. cpe510)
  68. ucidef_set_led_switch "lan0" "LAN0" "tp-link:green:lan0" "switch0" "0x20"
  69. ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
  70. ucidef_set_rssimon "wlan0" "40000" "1"
  71. ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:green:link1" "wlan0" "1" "100" "0" "13"
  72. ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:green:link2" "wlan0" "26" "100" "-25" "13"
  73. ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:green:link3" "wlan0" "51" "100" "-50" "13"
  74. ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "76" "100" "-75" "13"
  75. ;;
  76. db120)
  77. ucidef_set_led_usbdev "usb" "USB" "db120:green:usb" "1-1"
  78. ;;
  79. dragino2)
  80. ucidef_set_led_wlan "wlan" "WLAN" "dragino2:red:wlan" "phy0tpt"
  81. ucidef_set_led_netdev "lan" "LAN" "dragino2:red:lan" "eth0"
  82. ucidef_set_led_netdev "wan" "WAN" "dragino2:red:wan" "eth1"
  83. ;;
  84. dw33d)
  85. ucidef_set_led_usbdev "mmc" "MMC" "dw33d:blue:mmc" "1-1"
  86. ucidef_set_led_usbdev "usb" "USB" "dw33d:blue:usb" "2-1"
  87. ucidef_set_led_netdev "internet" "INTERNET" "dw33d:blue:internet" "eth0"
  88. ucidef_set_led_wlan "wlan2g" "WLAN-2.4G" "dw33d:blue:wlan-2g" "phy1tpt"
  89. ;;
  90. eap300v2)
  91. ucidef_set_led_netdev "lan" "LAN" "engenius:blue:lan" "eth0"
  92. ucidef_set_led_wlan "wlan" "WLAN" "engenius:blue:wlan" "phy0tpt"
  93. ;;
  94. f9k1115v2)
  95. ucidef_set_led_usbdev "usb2" "USB2" "belkin:green:usb2" "1-1"
  96. ;;
  97. rb-750)
  98. ucidef_set_led_default "act" "act" "rb750:green:act" "1"
  99. ucidef_set_led_netdev "port1" "port1" "rb750:green:port1" "eth1"
  100. ucidef_set_led_switch "port2" "port2" "rb750:green:port2" "switch0" "0x10"
  101. ucidef_set_led_switch "port3" "port3" "rb750:green:port3" "switch0" "0x08"
  102. ucidef_set_led_switch "port4" "port4" "rb750:green:port4" "switch0" "0x04"
  103. ucidef_set_led_switch "port5" "port5" "rb750:green:port5" "switch0" "0x02"
  104. ;;
  105. rb-2011l|\
  106. rb-2011uas|\
  107. rb-2011uias|\
  108. rb-2011uas-2hnd|\
  109. rb-2011uias-2hnd)
  110. ucidef_set_led_switch "eth6" "ETH6" "rb:green:eth6" "switch1" "0x20"
  111. ucidef_set_led_switch "eth7" "ETH7" "rb:green:eth7" "switch1" "0x10"
  112. ucidef_set_led_switch "eth8" "ETH8" "rb:green:eth8" "switch1" "0x08"
  113. ucidef_set_led_switch "eth9" "ETH9" "rb:green:eth9" "switch1" "0x04"
  114. ucidef_set_led_switch "eth10" "ETH10" "rb:green:eth10" "switch1" "0x02"
  115. ;;
  116. dhp-1565-a1)
  117. ucidef_set_led_switch "wan" "WAN" "d-link:green:planet" "switch0" "0x20"
  118. ;;
  119. dir-505-a1)
  120. ucidef_set_led_netdev "lan" "LAN" "d-link:green:power" "eth1"
  121. ;;
  122. dir-600-a1|\
  123. dir-615-e1|\
  124. dir-615-e4)
  125. ucidef_set_led_netdev "wan" "WAN" "d-link:green:wan" "eth1"
  126. ucidef_set_led_switch "lan1" "LAN1" "d-link:green:lan1" "switch0" "0x02"
  127. ucidef_set_led_switch "lan2" "LAN2" "d-link:green:lan2" "switch0" "0x04"
  128. ucidef_set_led_switch "lan3" "LAN3" "d-link:green:lan3" "switch0" "0x08"
  129. ucidef_set_led_switch "lan4" "LAN4" "d-link:green:lan4" "switch0" "0x10"
  130. ;;
  131. dir-615-c1)
  132. ucidef_set_led_netdev "wan" "WAN" "d-link:green:wan" "eth1"
  133. ucidef_set_led_wlan "wlan" "WLAN" "d-link:green:wlan" "phy0tpt"
  134. ;;
  135. dir-825-b1)
  136. ucidef_set_led_usbdev "usb" "USB" "d-link:blue:usb" "1-1"
  137. ;;
  138. dir-615-i1)
  139. ucidef_set_led_default "power" "POWER" "d-link:green:power" "1"
  140. ucidef_set_led_default "diag" "DIAG" "d-link:amber:power" "0"
  141. ucidef_set_led_default "wps" "WPS" "d-link:blue:wps" "0"
  142. ucidef_set_led_netdev "wan" "WAN" "d-link:green:wan" "eth0"
  143. ucidef_set_led_wlan "wlan" "WLAN" "d-link:green:wlan" "phy0tpt"
  144. ;;
  145. dir-825-c1)
  146. ucidef_set_led_usbdev "usb" "USB" "d-link:blue:usb" "1-1"
  147. ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "d-link:blue:wlan2g" "phy0tpt"
  148. ;;
  149. dlan-pro-500-wp)
  150. ucidef_set_led_default "power" "System Power" "devolo:green:status" "1"
  151. ucidef_set_led_netdev "lan" "Ethernet Activity" "devolo:green:eth" "br-lan"
  152. ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "devolo:green:wlan-2g" "phy0tpt"
  153. ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "devolo:blue:wlan-5g" "none"
  154. ;;
  155. dlan-pro-1200-ac)
  156. ucidef_set_led_wlan "wlan" "WLAN" "devolo:status:wlan" "phy0radio"
  157. ucidef_set_led_trigger_gpio "plcw" "dLAN" "devolo:status:dlan" "17" "0"
  158. ucidef_set_led_trigger_gpio "plcr" "dLAN" "devolo:error:dlan" "16" "0"
  159. ;;
  160. gl-inet)
  161. ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
  162. ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
  163. ;;
  164. esr900)
  165. ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "engenius:blue:wlan-2g" "phy0tpt"
  166. ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "engenius:blue:wlan-5g" "phy1tpt"
  167. ;;
  168. esr1750)
  169. ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "esr1750:blue:wlan-2g" "phy0tpt"
  170. ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "esr1750:blue:wlan-5g" "phy1tpt"
  171. ;;
  172. epg5000)
  173. ucidef_set_led_wlan "wlan2g" "WLAN 2.4 GHz" "epg5000:blue:wlan-2g" "phy1tpt"
  174. ucidef_set_led_wlan "wlan5g" "WLAN 5 GHz" "epg5000:blue:wlan-5g" "phy0tpt"
  175. ;;
  176. hiwifi-hc6361)
  177. ucidef_set_led_netdev "inet" "INET" "hiwifi:blue:internet" "eth1"
  178. ucidef_set_led_wlan "wlan" "WLAN" "hiwifi:blue:wlan-2p4" "phy0tpt"
  179. ;;
  180. hornet-ub | \
  181. hornet-ub-x2)
  182. ucidef_set_led_netdev "lan" "LAN" "alfa:blue:lan" "eth0"
  183. ucidef_set_led_netdev "wan" "WAN" "alfa:blue:wan" "eth1"
  184. ucidef_set_led_wlan "wlan" "WLAN" "alfa:blue:wlan" "phy0tpt"
  185. ucidef_set_led_usbdev "usb" "USB" "alfa:blue:usb" "1-1"
  186. ;;
  187. mc-mac1200r)
  188. ucidef_set_led_wlan "wlan2g" "WLAN2G" "mercury:green:wlan2g" "phy1tpt"
  189. ucidef_set_led_wlan "wlan5g" "WLAN5G" "mercury:green:wlan5g" "phy0tpt"
  190. ;;
  191. mr12)
  192. ucidef_set_led_netdev "wan" "WAN" "mr12:green:wan" "eth0"
  193. ucidef_set_led_wlan "wlan1" "WLAN1" "mr12:green:wifi1" "phy0assoc"
  194. ucidef_set_led_wlan "wlan2" "WLAN2" "mr12:green:wifi2" "phy0assoc"
  195. ucidef_set_led_wlan "wlan3" "WLAN3" "mr12:green:wifi3" "phy0assoc"
  196. ucidef_set_led_wlan "wlan4" "WLAN4" "mr12:green:wifi4" "phy0tpt"
  197. ;;
  198. mr16)
  199. ucidef_set_led_netdev "wan" "WAN" "mr16:green:wan" "eth0"
  200. ucidef_set_led_wlan "wlan1" "WLAN1" "mr16:green:wifi1" "phy0assoc"
  201. ucidef_set_led_wlan "wlan2" "WLAN2" "mr16:green:wifi2" "phy0assoc"
  202. ucidef_set_led_wlan "wlan3" "WLAN3" "mr16:green:wifi3" "phy0assoc"
  203. ucidef_set_led_wlan "wlan4" "WLAN4" "mr16:green:wifi4" "phy0tpt"
  204. ;;
  205. mr600)
  206. ucidef_set_led_wlan "wlan58" "WLAN58" "mr600:green:wlan58" "phy0tpt"
  207. ;;
  208. mr1750 | \
  209. mr1750v2)
  210. ucidef_set_led_netdev "lan" "LAN" "mr1750:blue:wan" "eth0"
  211. ucidef_set_led_wlan "wlan58" "WLAN58" "mr1750:blue:wlan58" "phy0tpt"
  212. ucidef_set_led_wlan "wlan24" "WLAN24" "mr1750:blue:wlan24" "phy1tpt"
  213. ;;
  214. mr900 | \
  215. mr900v2)
  216. ucidef_set_led_netdev "lan" "LAN" "mr900:blue:wan" "eth0"
  217. ucidef_set_led_wlan "wlan24" "WLAN24" "mr900:blue:wlan24" "phy0tpt"
  218. ucidef_set_led_wlan "wlan58" "WLAN58" "mr900:blue:wlan58" "phy1tpt"
  219. ;;
  220. mynet-n600)
  221. ucidef_set_led_netdev "wan" "WAN" "wd:blue:internet" "eth1"
  222. ucidef_set_led_switch "lan1" "LAN1" "wd:green:lan1" "switch0" "0x02"
  223. ucidef_set_led_switch "lan2" "LAN2" "wd:green:lan2" "switch0" "0x10"
  224. ucidef_set_led_switch "lan3" "LAN3" "wd:green:lan3" "switch0" "0x08"
  225. ucidef_set_led_switch "lan4" "LAN4" "wd:green:lan4" "switch0" "0x04"
  226. ;;
  227. mynet-rext)
  228. ucidef_set_led_netdev "lan" "LAN" "wd:blue:ethernet" "eth0"
  229. ucidef_set_rssimon "wlan0" "40000" "1"
  230. ucidef_set_led_rssi "rssilow" "RSSILOW" "wd:blue:quality1" "wlan0" "1" "40" "0" "6"
  231. ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "wd:blue:quality2" "wlan0" "30" "80" "-29" "5"
  232. ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "wd:blue:quality3" "wlan0" "70" "100" "-69" "8"
  233. ucidef_set_led_wlan "wlan" "WLAN" "wd:blue:wireless" "phy0tpt"
  234. ;;
  235. mzk-w04u)
  236. ucidef_set_led_usbdev "usb" "USB" "planex:green:usb" "1-1"
  237. ;;
  238. mzk-w300nh)
  239. ucidef_set_led_wlan "wlan" "WLAN" "planex:green:wlan" "phy0tpt"
  240. ;;
  241. nbg460n_550n_550nh)
  242. ucidef_set_led_wlan "wlan" "WLAN" "nbg460n:green:wlan" "phy0tpt"
  243. ;;
  244. nbg6716)
  245. ucidef_set_led_netdev "wan" "WAN" "zyxel:white:internet" "eth1"
  246. ucidef_set_led_wlan "wlan" "WLAN" "zyxel:white:wifi2g" "phy1tpt"
  247. ucidef_set_led_wlan "wlan5" "WLAN5" "zyxel:white:wifi5g" "phy0tpt"
  248. ucidef_set_led_usbdev "usb1" "USB1" "zyxel:white:usb1" "2-1"
  249. ucidef_set_led_usbdev "usb2" "USB2" "zyxel:white:usb2" "1-1"
  250. ;;
  251. om2p | \
  252. om2pv2 | \
  253. om2p-hs | \
  254. om2p-hsv2 | \
  255. om2p-hsv3 | \
  256. om2p-lc)
  257. ucidef_set_led_netdev "port1" "port1" "om2p:blue:wan" "eth0"
  258. ucidef_set_led_netdev "port2" "port2" "om2p:blue:lan" "eth1"
  259. ;;
  260. om5p | \
  261. om5p-an)
  262. ucidef_set_led_netdev "port1" "port1" "om5p:blue:wan" "eth0"
  263. ucidef_set_led_netdev "port2" "port2" "om5p:blue:lan" "eth1"
  264. ;;
  265. om5p-ac)
  266. ucidef_set_led_netdev "port1" "port1" "om5pac:blue:lan" "eth0"
  267. ucidef_set_led_netdev "port2" "port2" "om5pac:blue:wan" "eth1"
  268. ;;
  269. qihoo-c301)
  270. ucidef_set_led_wlan "wlan2g" "WLAN2G" "qihoo:red:status" "phy1tpt"
  271. ;;
  272. smart-300)
  273. ucidef_set_led_netdev "wan" "WAN" "nc-link:green:wan" "eth0"
  274. ucidef_set_led_switch "lan1" "LAN1" "nc-link:green:lan1" "switch0" "0x04"
  275. ucidef_set_led_switch "lan2" "LAN2" "nc-link:green:lan2" "switch0" "0x08"
  276. ucidef_set_led_switch "lan3" "LAN3" "nc-link:green:lan3" "switch0" "0x10"
  277. ucidef_set_led_switch "lan4" "LAN4" "nc-link:green:lan4" "switch0" "0x02"
  278. ucidef_set_led_wlan "wlan" "WLAN" "nc-link:green:wlan" "phy0tpt"
  279. ;;
  280. tew-712br)
  281. ucidef_set_led_netdev "wan" "WAN" "trendnet:green:wan" "eth1"
  282. ucidef_set_led_switch "lan1" "LAN1" "trendnet:green:lan1" "switch0" "0x02"
  283. ucidef_set_led_switch "lan2" "LAN2" "trendnet:green:lan2" "switch0" "0x04"
  284. ucidef_set_led_switch "lan3" "LAN3" "trendnet:green:lan3" "switch0" "0x08"
  285. ucidef_set_led_switch "lan4" "LAN4" "trendnet:green:lan4" "switch0" "0x10"
  286. ucidef_set_led_wlan "wlan" "WLAN" "trendnet:green:wlan" "phy0tpt"
  287. ;;
  288. tew-732br)
  289. ucidef_set_led_netdev "wan" "WAN" "trendnet:green:wan" "eth1"
  290. ;;
  291. tl-mr11u | \
  292. tl-mr3020 | \
  293. tl-mr3040 | \
  294. tl-mr3040-v2)
  295. ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
  296. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  297. ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
  298. ;;
  299. tl-mr3220 | \
  300. tl-mr3420 )
  301. ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
  302. ;;
  303. tl-mr3220-v2)
  304. ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
  305. ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
  306. ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
  307. ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
  308. ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
  309. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  310. ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
  311. ;;
  312. tl-mr3420-v2)
  313. ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
  314. ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
  315. ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
  316. ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
  317. ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
  318. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  319. ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
  320. ;;
  321. tl-wa7210n-v2)
  322. ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
  323. ucidef_set_rssimon "wlan0" "40000" "1"
  324. ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:green:signal1" "wlan0" "1" "100" "0" "13"
  325. ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:green:signal2" "wlan0" "26" "100" "-25" "13"
  326. ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:green:signal3" "wlan0" "51" "100" "-50" "13"
  327. ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:signal4" "wlan0" "76" "100" "-75" "13"
  328. ;;
  329. tl-wa750re)
  330. ucidef_set_led_netdev "lan" "LAN" "tp-link:orange:lan" "eth0"
  331. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:orange:wlan" "phy0tpt"
  332. ucidef_set_rssimon "wlan0" "40000" "1"
  333. ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:orange:signal1" "wlan0" "1" "100" "0" "13"
  334. ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:orange:signal2" "wlan0" "20" "100" "-19" "13"
  335. ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "tp-link:orange:signal3" "wlan0" "40" "100" "-39" "13"
  336. ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:orange:signal4" "wlan0" "60" "100" "-59" "13"
  337. ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:orange:signal5" "wlan0" "80" "100" "-79" "13"
  338. ;;
  339. tl-wa850re)
  340. ucidef_set_led_netdev "lan" "LAN" "tp-link:blue:lan" "eth0"
  341. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:blue:wlan" "phy0tpt"
  342. ucidef_set_rssimon "wlan0" "40000" "1"
  343. ucidef_set_led_rssi "rssilow" "RSSILOW" "tp-link:blue:signal1" "wlan0" "1" "100" "0" "13"
  344. ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "tp-link:blue:signal2" "wlan0" "20" "100" "-19" "13"
  345. ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "tp-link:blue:signal3" "wlan0" "40" "100" "-39" "13"
  346. ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "tp-link:blue:signal4" "wlan0" "60" "100" "-59" "13"
  347. ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:blue:signal5" "wlan0" "80" "100" "-79" "13"
  348. ;;
  349. tl-wa701nd-v2)
  350. ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
  351. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  352. ;;
  353. tl-wa860re)
  354. ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
  355. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  356. ;;
  357. tl-wa901nd)
  358. ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
  359. ;;
  360. tl-wa901nd-v2)
  361. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  362. ;;
  363. tl-wa901nd-v4)
  364. ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
  365. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  366. ;;
  367. tl-wdr3500)
  368. ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
  369. ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:green:wlan2g" "phy0tpt"
  370. ;;
  371. tl-wdr4300)
  372. ucidef_set_led_usbdev "usb1" "USB1" "tp-link:green:usb1" "1-1.1"
  373. ucidef_set_led_usbdev "usb2" "USB2" "tp-link:green:usb2" "1-1.2"
  374. ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:blue:wlan2g" "phy0tpt"
  375. ;;
  376. tl-wdr4900-v2)
  377. ucidef_set_led_usbdev "usb1" "USB1" "tp-link:green:usb1" "1-1"
  378. ucidef_set_led_usbdev "usb2" "USB2" "tp-link:green:usb2" "2-1"
  379. ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:blue:wlan2g" "phy0tpt"
  380. ucidef_set_led_wlan "wlan5g" "WLAN5G" "tp-link:blue:wlan5g" "phy1tpt"
  381. ;;
  382. archer-c5|\
  383. archer-c7)
  384. ucidef_set_led_usbdev "usb1" "USB1" "tp-link:green:usb1" "1-1"
  385. ucidef_set_led_usbdev "usb2" "USB2" "tp-link:green:usb2" "2-1"
  386. ucidef_set_led_wlan "wlan2g" "WLAN2G" "tp-link:blue:wlan2g" "phy1tpt"
  387. ucidef_set_led_wlan "wlan5g" "WLAN5G" "tp-link:blue:wlan5g" "phy0tpt"
  388. ;;
  389. tl-wr741nd)
  390. ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
  391. ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x02"
  392. ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x04"
  393. ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x08"
  394. ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x10"
  395. ;;
  396. tl-wr741nd-v4)
  397. ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
  398. ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
  399. ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
  400. ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
  401. ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
  402. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  403. ;;
  404. tl-wr841n-v8 | \
  405. tl-wr941nd-v5)
  406. ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
  407. ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
  408. ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
  409. ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
  410. ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
  411. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  412. ;;
  413. tl-wr941nd-v6)
  414. ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth0"
  415. ucidef_set_led_switch "lan1" "LAN1" "tp-link:blue:lan1" "switch0" "0x10"
  416. ucidef_set_led_switch "lan2" "LAN2" "tp-link:blue:lan2" "switch0" "0x08"
  417. ucidef_set_led_switch "lan3" "LAN3" "tp-link:blue:lan3" "switch0" "0x04"
  418. ucidef_set_led_switch "lan4" "LAN4" "tp-link:blue:lan4" "switch0" "0x02"
  419. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:blue:wlan" "phy0tpt"
  420. ;;
  421. tl-wa830re-v2)
  422. ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
  423. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  424. ;;
  425. tl-wr841n-v9 | \
  426. tl-wr841n-v11)
  427. ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth1"
  428. ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
  429. ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
  430. ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
  431. ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
  432. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  433. ;;
  434. tl-wr842n-v2)
  435. ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
  436. ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
  437. ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
  438. ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
  439. ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
  440. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  441. ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
  442. ;;
  443. tl-wa801nd-v2 | \
  444. tl-wa901nd-v3)
  445. ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
  446. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  447. ;;
  448. tl-wr941nd | \
  449. tl-wr1041n-v2)
  450. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  451. ;;
  452. tl-wr1043nd | \
  453. tl-wr1043nd-v2)
  454. ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
  455. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  456. ;;
  457. tl-wr2543n)
  458. ucidef_set_led_usbdev "usb" "USB" "tp-link:green:usb" "1-1"
  459. ;;
  460. tube2h)
  461. ucidef_set_led_netdev "lan" "LAN" "alfa:blue:lan" "eth0"
  462. ucidef_set_rssimon "wlan0" "40000" "1"
  463. ucidef_set_led_rssi "signal1" "SIGNAL1" "alfa:red:signal1" "wlan0" "1" "100" "0" "13"
  464. ucidef_set_led_rssi "signal2" "SIGNAL2" "alfa:orange:signal2" "wlan0" "26" "100" "-25" "13"
  465. ucidef_set_led_rssi "signal3" "SIGNAL3" "alfa:green:signal3" "wlan0" "51" "100" "-50" "13"
  466. ucidef_set_led_rssi "signal4" "SIGNAL4" "alfa:green:signal4" "wlan0" "76" "100" "-75" "13"
  467. ;;
  468. wrt160nl)
  469. ucidef_set_led_wlan "wlan" "WLAN" "wrt160nl:blue:wlan" "phy0tpt"
  470. ;;
  471. wndap360)
  472. ucidef_set_led_power "power" "POWER GREEN" "netgear:green:power" "1"
  473. ;;
  474. wndr3700)
  475. ucidef_set_led_default "wan" "WAN LED (green)" "netgear:green:wan" "0"
  476. ucidef_set_led_usbdev "usb" "USB" "netgear:green:usb" "1-1"
  477. ;;
  478. r6100)
  479. ucidef_set_led_netdev "wan" "WAN (green)" "netgear:green:wan" "eth0"
  480. ucidef_set_led_usbdev "usb" "USB" "netgear:blue:usb" "1-1"
  481. ucidef_set_led_wlan "wlan" "WLAN" "netgear:blue:wlan" "phy1tpt"
  482. ;;
  483. wndr3700v4 | \
  484. wndr4300)
  485. ucidef_set_led_netdev "wan" "WAN (green)" "netgear:green:wan" "eth0.2"
  486. ucidef_set_led_usbdev "usb" "USB" "netgear:green:usb" "1-1"
  487. ucidef_set_led_wlan "wlan2g" "WLAN2G" "netgear:green:wlan2g" "phy0tpt"
  488. ucidef_set_led_wlan "wlan5g" "WLAN5G" "netgear:blue:wlan5g" "phy1tpt"
  489. ;;
  490. whr-g301n |\
  491. whr-hp-g300n |\
  492. whr-hp-gn)
  493. ucidef_set_led_netdev "wan" "WAN" "buffalo:green:wan" "eth1"
  494. ucidef_set_led_switch "lan1" "LAN1" "buffalo:green:lan1" "switch0" "0x02"
  495. ucidef_set_led_switch "lan2" "LAN2" "buffalo:green:lan2" "switch0" "0x04"
  496. ucidef_set_led_switch "lan3" "LAN3" "buffalo:green:lan3" "switch0" "0x08"
  497. ucidef_set_led_switch "lan4" "LAN4" "buffalo:green:lan4" "switch0" "0x10"
  498. ;;
  499. wlae-ag300n)
  500. ucidef_set_led_netdev "wireless" "WIRELESS" "buffalo:green:wireless" "wlan0"
  501. ;;
  502. wnr2000-v4)
  503. ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
  504. ucidef_set_led_netdev "wlan" "WLAN" "netgear:blue:wlan" "wlan0"
  505. ucidef_set_led_switch "lan1" "LAN1" "netgear:amber:lan1" "switch0" "0x02"
  506. ucidef_set_led_switch "lan2" "LAN2" "netgear:amber:lan2" "switch0" "0x04"
  507. ucidef_set_led_switch "lan3" "LAN3" "netgear:amber:lan3" "switch0" "0x08"
  508. ucidef_set_led_switch "lan4" "LAN4" "netgear:amber:lan4" "switch0" "0x10"
  509. ucidef_set_led_usbdev "usb" "USB" "netgear:amber:status" "1-1"
  510. ;;
  511. wpn824n)
  512. ucidef_set_led_netdev "wan-amber" "WAN (amber)" "netgear:amber:wan" "eth0"
  513. ucidef_set_led_wlan "wlan" "WLAN" "netgear:blue:wlan" "phy0tpt"
  514. ucidef_set_led_switch "lan1amber" "LAN1 (amber)" "netgear:amber:lan1" "switch0" "0x02"
  515. ucidef_set_led_switch "lan2amber" "LAN2 (amber)" "netgear:amber:lan2" "switch0" "0x04"
  516. ucidef_set_led_switch "lan3amber" "LAN3 (amber)" "netgear:amber:lan3" "switch0" "0x08"
  517. ucidef_set_led_switch "lan4amber" "LAN4 (amber)" "netgear:amber:lan4" "switch0" "0x10"
  518. ucidef_set_led_default "lan1green" "LAN1 (green)" "netgear:green:lan1" "0"
  519. ucidef_set_led_default "lan2green" "LAN2 (green)" "netgear:green:lan2" "0"
  520. ucidef_set_led_default "lan3green" "LAN3 (green)" "netgear:green:lan3" "0"
  521. ucidef_set_led_default "lan4green" "LAN4 (green)" "netgear:green:lan4" "0"
  522. ucidef_set_led_default "wan-green" "WAN (green)" "netgear:green:wan" "0"
  523. ucidef_set_led_default "wps1" "WPS1" "netgear:blue:wps1" "0"
  524. ucidef_set_led_default "wps2" "WPS2" "netgear:blue:wps2" "0"
  525. ucidef_set_led_default "status" "STATUS" "netgear:amber:status" "0"
  526. ucidef_set_led_default "test" "TEST" "netgear:amber:test" "0"
  527. ;;
  528. wzr-hp-ag300h)
  529. ucidef_set_led_default "diag" "DIAG" "buffalo:red:diag" "0"
  530. ucidef_set_led_netdev "router" "ROUTER" "buffalo:green:router" "eth1"
  531. ucidef_set_led_usbdev "usb" "USB" "buffalo:green:usb" "1-1"
  532. ;;
  533. wzr-hp-g300nh)
  534. ucidef_set_led_wlan "wlan" "Wireless" "buffalo:green:wireless" "phy0tpt"
  535. ucidef_set_led_netdev "router" "Router" "buffalo:green:router" "eth1"
  536. ucidef_set_led_usbdev "usb" "USB" "buffalo:blue:usb" "1-1"
  537. ;;
  538. zcn-1523h-2)
  539. ucidef_set_led_netdev "lan1" "lan1" "zcn-1523h:green:lan1" "eth0"
  540. ;;
  541. zcn-1523h-5)
  542. ucidef_set_led_netdev "lan1" "lan1" "zcn-1523h:green:lan1" "eth0"
  543. ucidef_set_led_netdev "lan2" "lan2" "zcn-1523h:green:lan2" "eth1"
  544. ;;
  545. esac
  546. ucidef_commit_leds
  547. exit 0