adbd9d1f1f
This PR adds support for TP-Link TL-WR842N-v2 router which is supported by ar71xx to ath79. This is a low cost model with following specs: CPU: Atheros AR9341 SoC RAM: 32 MB DDR1 Flash: 8 MB NOR SPI Switch: Internal AR9341 5 port 10/100 Mbit Ports: 5x 10/100 Mbit(1x WAN, 4x LAN) USB: 1x USB2.0 WLAN: 2.4 GHZ AR9341 Installation: Simply flash the factory image through stock firmware WEB UI. Signed-off-by: Robert Marko <robimarko@gmail.com>
123 lines
5.4 KiB
Bash
Executable file
123 lines
5.4 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
. /lib/functions/uci-defaults.sh
|
|
|
|
board_config_update
|
|
|
|
board=$(board_name)
|
|
boardname="${board##*,}"
|
|
|
|
case "$board" in
|
|
avm,fritz300e)
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:green:rssi0" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$boardname:green:rssi1" "wlan0" "20" "100"
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$boardname:green:rssi2" "wlan0" "40" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$boardname:green:rssi3" "wlan0" "60" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$boardname:green:rssi4" "wlan0" "80" "100"
|
|
;;
|
|
avm,fritz4020)
|
|
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
|
|
ucidef_set_led_switch "lan" "LAN" "$boardname:green:lan" "switch0" "0x1E"
|
|
;;
|
|
buffalo,whr-g301n)
|
|
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
|
|
ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x02"
|
|
ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan3" "LAN3" "$boardname:green:lan3" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan4" "LAN4" "$boardname:green:lan4" "switch0" "0x10"
|
|
;;
|
|
etactica,eg200)
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:red:eth0" "eth0"
|
|
ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" "33"
|
|
ucidef_set_led_default "etactica" "etactica" "$boardname:red:etactica" "ignore"
|
|
;;
|
|
netgear,wnr612-v2|\
|
|
on,n150r)
|
|
ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
|
|
ucidef_set_led_switch "lan1" "LAN1" "netgear:green:lan1" "switch0" "0x02" "0x0f"
|
|
ucidef_set_led_switch "lan2" "LAN2" "netgear:green:lan2" "switch0" "0x04" "0x0f"
|
|
;;
|
|
pcs,cap324)
|
|
ucidef_set_led_netdev "lan" "LAN" "pcs:lan:green" "eth0"
|
|
;;
|
|
pcs,cr3000)
|
|
ucidef_set_led_netdev "wan" "WAN" "pcs:blue:wan" "eth1"
|
|
ucidef_set_led_switch "lan1" "LAN1" "pcs:blue:lan1" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan2" "LAN2" "pcs:blue:lan2" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan3" "LAN3" "pcs:blue:lan3" "switch0" "0x10"
|
|
ucidef_set_led_switch "lan4" "LAN4" "pcs:blue:lan4" "switch0" "0x02"
|
|
;;
|
|
tplink,re450-v2)
|
|
ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" "eth0" "tx rx"
|
|
ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" "eth0" "link"
|
|
;;
|
|
tplink,tl-mr3020-v1|\
|
|
tplink,tl-mr3040-v2)
|
|
ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
|
|
;;
|
|
tplink,tl-wr1043nd-v4)
|
|
ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20"
|
|
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
|
|
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
|
;;
|
|
tplink,tl-wr740n-v1|\
|
|
tplink,tl-wr740n-v3|\
|
|
tplink,tl-wr741-v1|\
|
|
tplink,tl-wr743nd-v1|\
|
|
tplink,tl-wr841-v5|\
|
|
tplink,tl-wr941-v4)
|
|
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
|
|
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x02"
|
|
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x10"
|
|
;;
|
|
tplink,tl-wr740nd-v4|\
|
|
tplink,tl-wr741nd-v4|\
|
|
tplink,tl-wr842n-v2)
|
|
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
|
|
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
|
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
|
;;
|
|
tplink,tl-wr841-v9|\
|
|
tplink,tl-wr841-v11)
|
|
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
|
|
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10"
|
|
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
|
|
ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04"
|
|
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
|
|
;;
|
|
ubnt,bullet-m|\
|
|
ubnt,nano-m|\
|
|
ubnt,rocket-m)
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:red:link1" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:orange:link2" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link3" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link4" "wlan0" "76" "100"
|
|
;;
|
|
ubnt,nanostation-ac)
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:blue:rssi0" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:blue:rssi1" "wlan0" "26" "100"
|
|
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:blue:rssi2" "wlan0" "51" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:blue:rssi3" "wlan0" "76" "100"
|
|
;;
|
|
wd,mynet-wifi-rangeextender)
|
|
ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
|
|
ucidef_set_rssimon "wlan0" "200000" "1"
|
|
ucidef_set_led_rssi "rssilow" "RSSILOW" "$boardname:rssi-low" "wlan0" "1" "100"
|
|
ucidef_set_led_rssi "rssimedium" "RSSIMED" "$boardname:blue:rssi-med" "wlan0" "33" "100"
|
|
ucidef_set_led_rssi "rssihigh" "RSSIMAX" "$boardname:blue:rssi-max" "wlan0" "66" "100"
|
|
;;
|
|
esac
|
|
|
|
board_config_flush
|
|
|
|
exit 0
|