2011-11-07 21:43:51 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2015-11-26 14:42:28 +00:00
|
|
|
# Copyright (C) 2011-2015 OpenWrt.org
|
2011-11-07 21:43:51 +00:00
|
|
|
#
|
|
|
|
|
2015-12-03 19:23:44 +00:00
|
|
|
. /lib/functions/system.sh
|
2015-11-26 14:42:28 +00:00
|
|
|
. /lib/functions/uci-defaults-new.sh
|
2015-11-25 11:53:59 +00:00
|
|
|
. /lib/ar71xx.sh
|
2015-11-20 22:14:36 +00:00
|
|
|
|
2015-11-26 14:42:28 +00:00
|
|
|
board_config_update
|
|
|
|
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interface_loopback
|
|
|
|
|
2011-11-07 21:43:51 +00:00
|
|
|
board=$(ar71xx_board_name)
|
|
|
|
|
2015-11-26 14:42:28 +00:00
|
|
|
|
2011-11-07 21:43:51 +00:00
|
|
|
case "$board" in
|
2012-08-27 14:55:32 +00:00
|
|
|
all0315n |\
|
2012-03-16 18:00:34 +00:00
|
|
|
all0258n |\
|
2012-11-13 20:57:18 +00:00
|
|
|
ja76pf2|\
|
2015-07-07 13:46:38 +00:00
|
|
|
rocket-m-ti |\
|
2012-11-13 20:57:18 +00:00
|
|
|
ubnt-unifi-outdoor)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interface_lan "eth0 eth1"
|
2011-11-07 21:44:23 +00:00
|
|
|
;;
|
|
|
|
|
2013-11-29 20:18:49 +00:00
|
|
|
ap132 |\
|
|
|
|
wlr8100)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
|
2013-01-29 19:12:32 +00:00
|
|
|
;;
|
|
|
|
|
2015-06-18 18:21:41 +00:00
|
|
|
esr1750 |\
|
|
|
|
epg5000)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
|
2012-12-22 12:12:50 +00:00
|
|
|
;;
|
|
|
|
|
2015-11-26 14:42:28 +00:00
|
|
|
ap136-010 |\
|
2015-07-24 09:09:42 +00:00
|
|
|
ap147-010)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1"
|
2015-07-24 09:09:42 +00:00
|
|
|
;;
|
|
|
|
|
2012-12-29 16:02:27 +00:00
|
|
|
ap136-020 |\
|
2013-11-29 20:51:13 +00:00
|
|
|
ap135-020 |\
|
2014-10-22 11:02:18 +00:00
|
|
|
tl-wr1043nd-v2 |\
|
|
|
|
wzr-450hp2)
|
2012-12-26 09:50:36 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "6@eth0"
|
2012-12-26 09:50:36 +00:00
|
|
|
;;
|
|
|
|
|
2014-07-23 12:47:25 +00:00
|
|
|
archer-c5 |\
|
2014-02-19 12:15:34 +00:00
|
|
|
archer-c7 |\
|
|
|
|
tl-wdr4900-v2)
|
2013-07-22 16:02:13 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth1" "2:lan" "3:lan" "4:lan" "5:lan" "6@eth0" "1:wan"
|
2013-07-22 16:02:13 +00:00
|
|
|
;;
|
|
|
|
|
2015-08-17 06:16:54 +00:00
|
|
|
bsb)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth1" "1:lan" "3:lan" # XXX: confirm cpu port!
|
2015-08-17 06:16:54 +00:00
|
|
|
ucidef_set_interface_wlan
|
|
|
|
;;
|
|
|
|
|
2014-11-26 08:59:32 +00:00
|
|
|
cpe510)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "5:lan" "4:wan"
|
2014-11-26 08:59:32 +00:00
|
|
|
;;
|
|
|
|
|
2015-09-16 08:31:40 +00:00
|
|
|
airgatewaypro)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "4:lan" "5:wan"
|
2015-09-16 08:31:40 +00:00
|
|
|
;;
|
|
|
|
|
2012-09-09 14:05:22 +00:00
|
|
|
db120 |\
|
2012-09-09 14:05:32 +00:00
|
|
|
rb-2011l | \
|
2013-05-30 17:38:15 +00:00
|
|
|
rb-2011uas |\
|
2014-07-13 16:25:58 +00:00
|
|
|
rb-2011uias |\
|
2014-08-28 06:27:45 +00:00
|
|
|
rb-2011uas-2hnd|\
|
|
|
|
rb-2011uias-2hnd)
|
2013-05-30 17:38:30 +00:00
|
|
|
case "$board" in
|
2014-08-28 06:27:45 +00:00
|
|
|
rb-2011uas* | rb-2011uias | rb-2011uias-2hnd)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan" "6:sfp"
|
|
|
|
;;
|
|
|
|
*)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
|
|
|
|
;;
|
2013-05-30 17:38:30 +00:00
|
|
|
esac
|
2015-11-26 14:42:28 +00:00
|
|
|
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch1" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:lan"
|
2011-12-15 22:25:38 +00:00
|
|
|
;;
|
|
|
|
|
2012-02-08 16:26:25 +00:00
|
|
|
dir-825-b1|\
|
|
|
|
tew-673gru)
|
2015-11-26 14:42:28 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "5@eth0"
|
2011-11-07 21:44:07 +00:00
|
|
|
;;
|
|
|
|
|
2014-12-17 08:27:38 +00:00
|
|
|
f9k1115v2)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"2:lan" "3:lan" "4:lan" "5:lan" "6@eth1" \
|
|
|
|
"0@eth0" "1:wan" # XXX: confirm cpu ports!
|
2014-12-17 08:27:38 +00:00
|
|
|
;;
|
|
|
|
|
2011-11-07 21:44:20 +00:00
|
|
|
nbg460n_550n_550nh)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "5@eth0"
|
2011-11-07 21:44:20 +00:00
|
|
|
;;
|
|
|
|
|
2015-11-07 12:51:39 +00:00
|
|
|
nbg6616 |\
|
2014-04-13 08:29:07 +00:00
|
|
|
nbg6716)
|
2015-11-26 14:42:28 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" \
|
|
|
|
"5:wan" "6@eth1"
|
2014-04-13 08:29:07 +00:00
|
|
|
;;
|
|
|
|
|
2015-09-16 08:32:56 +00:00
|
|
|
ap143 |\
|
2011-11-07 21:43:58 +00:00
|
|
|
rb-433 |\
|
|
|
|
rb-433u)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"1:lan" "2:lan" "5@eth1"
|
2011-11-07 21:43:58 +00:00
|
|
|
;;
|
|
|
|
|
2012-11-18 10:18:02 +00:00
|
|
|
rb-435g)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth1" "1:lan" "2:lan" # XXX: confirm!
|
2012-11-18 10:18:02 +00:00
|
|
|
;;
|
|
|
|
|
2011-11-07 21:44:02 +00:00
|
|
|
rb-450)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "5@eth1"
|
2011-11-07 21:44:02 +00:00
|
|
|
;;
|
|
|
|
|
2011-11-07 21:44:01 +00:00
|
|
|
rb-450g |\
|
|
|
|
routerstation-pro)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth1" "2:lan:3" "3:lan:2" "4:lan:1"
|
2011-11-07 21:44:01 +00:00
|
|
|
;;
|
|
|
|
|
2012-07-05 08:26:50 +00:00
|
|
|
ap136 |\
|
2012-03-19 15:57:04 +00:00
|
|
|
rb-750gl |\
|
2012-04-06 06:45:07 +00:00
|
|
|
rb-751g |\
|
2013-02-17 10:08:41 +00:00
|
|
|
rb-951g-2hnd |\
|
2012-03-19 15:57:04 +00:00
|
|
|
wzr-hp-g450h)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
|
2012-03-19 15:57:04 +00:00
|
|
|
;;
|
|
|
|
|
2014-06-18 10:08:08 +00:00
|
|
|
rb-951ui-2hnd)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
|
|
|
;;
|
|
|
|
|
2011-11-07 21:44:12 +00:00
|
|
|
rb-493g)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0 eth1.1" "eth1.2"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch1" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
2011-11-07 21:44:12 +00:00
|
|
|
;;
|
|
|
|
|
2011-12-21 19:32:40 +00:00
|
|
|
wzr-hp-g300nh2 |\
|
2012-01-28 13:19:49 +00:00
|
|
|
pb92 |\
|
|
|
|
ap113)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "2:wan"
|
2011-11-07 21:44:08 +00:00
|
|
|
;;
|
|
|
|
|
2014-06-26 11:49:47 +00:00
|
|
|
el-m150)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0:lan" "1:lan" "3@eth1" # XXX: confirm!
|
2014-06-26 11:49:47 +00:00
|
|
|
;;
|
|
|
|
|
2012-06-19 11:51:18 +00:00
|
|
|
tl-wdr4300|\
|
2012-05-05 17:02:35 +00:00
|
|
|
tl-wr1041n-v2)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
|
2012-05-05 17:02:35 +00:00
|
|
|
;;
|
|
|
|
|
2011-11-07 21:44:11 +00:00
|
|
|
tl-wr1043nd)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0"
|
2011-11-07 21:44:11 +00:00
|
|
|
;;
|
|
|
|
|
2012-01-07 19:36:35 +00:00
|
|
|
tl-wr2543n)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0"
|
2012-01-07 19:36:35 +00:00
|
|
|
;;
|
|
|
|
|
2011-11-07 21:44:03 +00:00
|
|
|
tl-wr841n-v1|\
|
|
|
|
tl-wr941nd)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interface_raw "eth" "eth0"
|
|
|
|
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
|
2011-11-07 21:44:03 +00:00
|
|
|
;;
|
|
|
|
|
2015-07-08 14:26:18 +00:00
|
|
|
dir-615-i1 |\
|
2014-11-26 08:28:22 +00:00
|
|
|
r6100 |\
|
|
|
|
smart-300 |\
|
2013-03-11 15:55:22 +00:00
|
|
|
tl-mr3420-v2 |\
|
2013-04-26 17:00:54 +00:00
|
|
|
tl-wr841n-v8 |\
|
2013-11-15 10:11:24 +00:00
|
|
|
tl-wr842n-v2 |\
|
2015-02-04 06:10:20 +00:00
|
|
|
tl-wr941nd-v5 |\
|
2015-11-08 20:39:18 +00:00
|
|
|
tl-wr941nd-v6 |\
|
2015-08-17 06:24:04 +00:00
|
|
|
tl-wdr6500-v2 |\
|
2013-07-28 10:23:37 +00:00
|
|
|
wnr2000-v3 |\
|
2014-11-03 20:20:56 +00:00
|
|
|
wnr2000-v4 |\
|
2013-09-19 16:56:50 +00:00
|
|
|
wnr2200 |\
|
2015-01-30 08:06:40 +00:00
|
|
|
wnr612-v2 |\
|
|
|
|
wnr1000-v2)
|
2012-10-04 20:16:05 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4@eth1" # XXX: confirm!
|
2012-10-04 20:16:05 +00:00
|
|
|
;;
|
|
|
|
|
2012-12-17 12:28:11 +00:00
|
|
|
uap-pro)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan" "2:wan"
|
2012-12-17 12:28:11 +00:00
|
|
|
;;
|
|
|
|
|
2014-07-14 07:38:43 +00:00
|
|
|
nanostation-m-xw)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "5:lan" "1:wan"
|
2014-07-14 07:38:43 +00:00
|
|
|
;;
|
|
|
|
|
2011-11-07 21:44:09 +00:00
|
|
|
wrt160nl)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4@eth0"
|
2011-11-07 21:44:09 +00:00
|
|
|
;;
|
|
|
|
|
2011-11-07 21:44:17 +00:00
|
|
|
wzr-hp-g300nh)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "5@eth0"
|
2011-11-07 21:44:17 +00:00
|
|
|
;;
|
|
|
|
|
2014-11-27 14:27:34 +00:00
|
|
|
dgl-5500-a1 |\
|
2013-09-20 16:59:44 +00:00
|
|
|
dir-825-c1)
|
|
|
|
local mac
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
2014-07-21 19:26:54 +00:00
|
|
|
mac=$(mtd_get_mac_ascii nvram "wan_mac")
|
2013-09-20 16:59:44 +00:00
|
|
|
[ -n "$mac" ] && ucidef_set_interface_macaddr "wan" "$mac"
|
2013-12-16 07:16:43 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
mynet-n750)
|
|
|
|
local mac
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
2013-12-16 07:16:43 +00:00
|
|
|
mac=$(mtd_get_mac_ascii devdata "wanmac")
|
|
|
|
[ -n "$mac" ] && ucidef_set_interface_macaddr "wan" "$mac"
|
2013-09-20 16:59:44 +00:00
|
|
|
;;
|
|
|
|
|
2015-07-24 09:09:49 +00:00
|
|
|
onion-omega)
|
|
|
|
ucidef_set_interface_lan "wlan0"
|
|
|
|
;;
|
|
|
|
|
2014-11-19 09:20:47 +00:00
|
|
|
dhp-1565-a1 |\
|
2013-03-11 15:55:15 +00:00
|
|
|
dir-835-a1 |\
|
2014-07-21 18:41:52 +00:00
|
|
|
wndr3700v4 | \
|
2012-12-12 16:49:51 +00:00
|
|
|
wndr4300)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
2013-11-15 08:21:59 +00:00
|
|
|
mac_lan=$(mtd_get_mac_binary caldata 0)
|
|
|
|
[ -n "$mac_lan" ] && ucidef_set_interface_macaddr "lan" "$mac_lan"
|
|
|
|
mac_wan=$(mtd_get_mac_binary caldata 6)
|
|
|
|
[ -n "$mac_wan" ] && ucidef_set_interface_macaddr "wan" "$mac_wan"
|
2012-12-12 16:49:51 +00:00
|
|
|
;;
|
|
|
|
|
2014-07-14 10:25:51 +00:00
|
|
|
esr900)
|
|
|
|
local mac
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
|
2014-07-14 10:25:51 +00:00
|
|
|
mac=$(mtd_get_mac_ascii u-boot-env "wanaddr")
|
|
|
|
[ -n "$mac" ] && ucidef_set_interface_macaddr "wan" "$mac"
|
|
|
|
;;
|
|
|
|
|
2015-11-21 21:24:18 +00:00
|
|
|
dlan-hotspot |\
|
2015-07-14 07:32:33 +00:00
|
|
|
dlan-pro-500-wp)
|
|
|
|
ucidef_set_interface_lan "eth0 eth1"
|
|
|
|
;;
|
|
|
|
|
2015-07-14 07:37:03 +00:00
|
|
|
dlan-pro-1200-ac)
|
|
|
|
ucidef_set_interface_lan "eth0"
|
2015-12-03 17:30:08 +00:00
|
|
|
ucidef_add_switch "switch0"
|
|
|
|
ucidef_add_switch_attr "switch0" "reset" "false"
|
2015-11-26 14:42:28 +00:00
|
|
|
ucidef_add_switch_ports "switch0" \
|
|
|
|
"0@eth0" "2:lan" "3:lan" "4:lan"
|
2015-07-14 07:37:03 +00:00
|
|
|
;;
|
|
|
|
|
2012-08-22 12:33:22 +00:00
|
|
|
all0305 |\
|
2015-10-19 10:10:02 +00:00
|
|
|
antminer-s1 |\
|
|
|
|
antminer-s3 |\
|
2011-11-07 21:43:52 +00:00
|
|
|
aw-nr580 |\
|
|
|
|
bullet-m |\
|
2012-10-27 08:55:39 +00:00
|
|
|
cap4200ag |\
|
2014-07-14 21:30:28 +00:00
|
|
|
eap300v2 |\
|
2011-11-07 21:43:52 +00:00
|
|
|
eap7660d |\
|
2015-02-07 19:59:05 +00:00
|
|
|
el-mini |\
|
2014-09-15 10:19:14 +00:00
|
|
|
loco-m-xw |\
|
2015-09-14 20:11:01 +00:00
|
|
|
mr1750 |\
|
2012-11-18 09:32:35 +00:00
|
|
|
mr600 |\
|
2013-02-01 15:50:45 +00:00
|
|
|
mr600v2 |\
|
2014-11-14 16:54:15 +00:00
|
|
|
mr900 |\
|
2014-11-14 16:55:04 +00:00
|
|
|
mr900v2 |\
|
2011-11-07 21:43:52 +00:00
|
|
|
rb-411 |\
|
2014-07-20 17:30:24 +00:00
|
|
|
rb-911g-2hpnd |\
|
2015-04-07 20:04:14 +00:00
|
|
|
rb-911g-5hpacd |\
|
2014-07-20 17:30:24 +00:00
|
|
|
rb-911g-5hpnd |\
|
|
|
|
rb-912uag-2hpnd |\
|
|
|
|
rb-912uag-5hpnd |\
|
2014-07-01 13:38:30 +00:00
|
|
|
rb-sxt2n |\
|
|
|
|
rb-sxt5n |\
|
2015-04-21 12:42:13 +00:00
|
|
|
rocket-m-xw |\
|
2013-07-26 07:31:59 +00:00
|
|
|
tl-mr10u |\
|
2012-01-31 18:37:01 +00:00
|
|
|
tl-mr11u |\
|
2015-02-13 07:29:03 +00:00
|
|
|
tl-mr12u |\
|
2013-09-19 17:52:42 +00:00
|
|
|
tl-mr13u |\
|
2012-01-04 17:30:47 +00:00
|
|
|
tl-mr3020 |\
|
2012-09-24 18:45:56 +00:00
|
|
|
tl-mr3040 |\
|
2013-09-25 18:42:11 +00:00
|
|
|
tl-mr3040-v2 |\
|
2015-01-20 15:48:07 +00:00
|
|
|
tl-wa701nd-v2 |\
|
2015-02-24 12:00:50 +00:00
|
|
|
tl-wa7210n-v2 |\
|
2013-11-11 08:04:47 +00:00
|
|
|
tl-wa750re |\
|
|
|
|
tl-wa850re |\
|
2014-07-13 07:12:22 +00:00
|
|
|
tl-wa830re-v2 |\
|
2013-12-15 20:39:11 +00:00
|
|
|
tl-wa801nd-v2 |\
|
2012-01-04 17:30:52 +00:00
|
|
|
tl-wa901nd |\
|
2011-11-07 21:43:52 +00:00
|
|
|
tl-wa901nd-v2 |\
|
2013-12-15 21:34:19 +00:00
|
|
|
tl-wa901nd-v3 |\
|
2011-11-07 21:43:52 +00:00
|
|
|
tl-wr703n |\
|
2014-07-14 16:03:35 +00:00
|
|
|
tube2h |\
|
2013-05-08 17:03:42 +00:00
|
|
|
wndap360 |\
|
2013-11-07 22:31:53 +00:00
|
|
|
mynet-rext |\
|
2011-11-07 21:43:52 +00:00
|
|
|
wp543)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interface_lan "eth0"
|
2011-11-07 21:43:52 +00:00
|
|
|
;;
|
|
|
|
|
2015-11-10 23:13:09 +00:00
|
|
|
arduino-yun | \
|
2013-08-05 10:41:48 +00:00
|
|
|
dir-505-a1)
|
|
|
|
ucidef_set_interface_lan "eth1"
|
|
|
|
;;
|
|
|
|
|
2012-01-04 21:13:54 +00:00
|
|
|
alfa-ap96 |\
|
2012-01-01 19:30:25 +00:00
|
|
|
alfa-nx |\
|
2011-11-07 21:43:54 +00:00
|
|
|
ap83 |\
|
2015-11-24 18:29:59 +00:00
|
|
|
gl-ar150 |\
|
2015-11-24 18:30:50 +00:00
|
|
|
gl-domino |\
|
2014-07-13 18:21:06 +00:00
|
|
|
gl-inet |\
|
2011-11-07 21:43:54 +00:00
|
|
|
jwap003 |\
|
|
|
|
pb42 |\
|
|
|
|
pb44 |\
|
2012-01-26 17:01:41 +00:00
|
|
|
routerstation|\
|
2013-07-28 10:23:33 +00:00
|
|
|
tl-wr710n |\
|
2013-04-26 17:00:49 +00:00
|
|
|
tl-wr720n-v3|\
|
2012-01-26 17:01:41 +00:00
|
|
|
wpe72)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
2011-11-07 21:43:54 +00:00
|
|
|
;;
|
|
|
|
|
2015-11-24 18:30:19 +00:00
|
|
|
gl-ar300)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth1" "eth0"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
|
2015-11-24 18:30:19 +00:00
|
|
|
;;
|
|
|
|
|
2015-04-20 20:47:48 +00:00
|
|
|
wpj344)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "3:lan" "2:wan"
|
2015-04-20 20:47:48 +00:00
|
|
|
;;
|
|
|
|
|
2015-06-18 18:21:15 +00:00
|
|
|
wpj531)
|
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
|
|
;;
|
|
|
|
|
2015-03-06 14:41:57 +00:00
|
|
|
wpj558)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"5:lan" "1:wan" "6@eth0"
|
2015-03-06 14:41:57 +00:00
|
|
|
;;
|
|
|
|
|
2011-11-07 21:43:56 +00:00
|
|
|
ap121 |\
|
|
|
|
ap121-mini |\
|
|
|
|
ap96 |\
|
2011-12-01 22:49:02 +00:00
|
|
|
airrouter |\
|
2011-11-07 21:43:56 +00:00
|
|
|
dir-600-a1 |\
|
|
|
|
dir-615-c1 |\
|
2014-06-02 14:43:35 +00:00
|
|
|
dir-615-e1 |\
|
2012-01-31 18:37:09 +00:00
|
|
|
dir-615-e4 |\
|
2014-06-02 14:56:35 +00:00
|
|
|
hiwifi-hc6361 |\
|
2011-11-07 21:43:56 +00:00
|
|
|
ja76pf |\
|
2015-02-09 12:16:51 +00:00
|
|
|
mc-mac1200r|\
|
2015-10-19 17:55:25 +00:00
|
|
|
minibox-v1 |\
|
2013-09-19 22:36:41 +00:00
|
|
|
mynet-n600 |\
|
2014-03-27 06:36:47 +00:00
|
|
|
oolite |\
|
2014-09-15 10:19:38 +00:00
|
|
|
qihoo-c301 |\
|
2012-01-06 07:20:54 +00:00
|
|
|
rb-750 |\
|
2012-04-06 06:45:07 +00:00
|
|
|
rb-751 |\
|
2011-11-07 21:43:56 +00:00
|
|
|
tew-632brp |\
|
2012-08-22 20:12:24 +00:00
|
|
|
tew-712br |\
|
2015-11-22 20:00:13 +00:00
|
|
|
tew-732br |\
|
2011-11-07 21:43:56 +00:00
|
|
|
tl-mr3220 |\
|
2012-12-19 08:50:41 +00:00
|
|
|
tl-mr3220-v2 |\
|
2011-11-07 21:43:56 +00:00
|
|
|
tl-mr3420 |\
|
2015-09-14 20:12:16 +00:00
|
|
|
tl-wdr3320-v2 |\
|
2013-03-24 19:23:36 +00:00
|
|
|
tl-wdr3500 |\
|
2011-11-07 21:43:56 +00:00
|
|
|
tl-wr741nd |\
|
|
|
|
tl-wr741nd-v4 |\
|
2012-01-04 17:30:57 +00:00
|
|
|
tl-wr841n-v7 |\
|
2014-04-07 08:00:02 +00:00
|
|
|
tl-wr841n-v9 |\
|
2011-11-07 21:43:56 +00:00
|
|
|
whr-g301n |\
|
|
|
|
whr-hp-g300n |\
|
|
|
|
whr-hp-gn |\
|
2013-03-03 21:59:34 +00:00
|
|
|
wzr-hp-ag300h)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
|
2011-11-07 21:43:56 +00:00
|
|
|
;;
|
|
|
|
|
2011-12-21 19:32:40 +00:00
|
|
|
wzr-hp-g450h)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "2:lan:1 3:lan:2 4:lan:3 5:lan:4" "1:wan"
|
2011-12-21 19:32:40 +00:00
|
|
|
;;
|
|
|
|
|
2012-10-14 16:24:25 +00:00
|
|
|
ew-dorin)
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0@eth0" "1:lan" "2:lan" "3:wan"
|
2012-10-14 16:24:25 +00:00
|
|
|
;;
|
|
|
|
|
2012-08-01 12:24:57 +00:00
|
|
|
ew-dorin-router)
|
2012-06-19 00:22:04 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" "0@eth0" "2:lan" "3:lan"
|
2012-06-19 00:22:04 +00:00
|
|
|
;;
|
|
|
|
|
2014-01-23 11:33:42 +00:00
|
|
|
wndr3700)
|
2015-11-26 14:42:28 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
2015-12-03 17:30:24 +00:00
|
|
|
ucidef_add_switch "switch0" \
|
2015-11-26 14:42:28 +00:00
|
|
|
"0:lan" "1:lan" "2:lan" "3:lan" "5@eth0"
|
|
|
|
|
2014-01-23 11:33:42 +00:00
|
|
|
# Blinkrate: 0=43ms; 1=84ms; 2=120ms; 3=170ms; 4=340ms; 5=670ms
|
2015-11-26 14:42:28 +00:00
|
|
|
ucidef_add_switch_attr "switch0" "blinkrate" 2
|
2014-01-23 11:33:42 +00:00
|
|
|
|
|
|
|
# Port 1 controls the GREEN configuration of LEDs for
|
|
|
|
# the switch and the section does not correspond to a real
|
|
|
|
# switch port.
|
|
|
|
#
|
|
|
|
# 0=LED off; 1=Collision/FDX; 2=Link/activity; 3=1000 Mb/s;
|
|
|
|
# 4=100 Mb/s; 5=10 Mb/s; 6=1000 Mb/s+activity; 7=100 Mb/s+activity;
|
|
|
|
# 8=10 Mb/s+activity; 9=10/100 Mb/s+activity; 10: Fiber;
|
|
|
|
# 11: Fault; 12: Link/activity(tx); 13: Link/activity(rx);
|
|
|
|
# 14: Link (master); 15: separate register
|
2015-11-26 14:42:28 +00:00
|
|
|
ucidef_add_switch_port_attr "switch0" 1 led 6
|
2014-01-23 11:33:42 +00:00
|
|
|
|
|
|
|
# Port 2 controls the ORANGE configuration of LEDs for
|
|
|
|
# the switch and the section does not correspond to a real
|
|
|
|
# switch port.
|
|
|
|
#
|
|
|
|
# See the key above for switch port 1 for the meaning of the
|
|
|
|
# 'led' setting below.
|
2015-11-26 14:42:28 +00:00
|
|
|
ucidef_add_switch_port_attr "switch0" 2 led 9
|
2014-01-23 11:33:42 +00:00
|
|
|
|
|
|
|
# Port 5 controls the configuration of the WAN LED and the
|
|
|
|
# section does not correspond to a real switch port.
|
|
|
|
#
|
|
|
|
# To toggle the use of green or orange LEDs for the WAN port,
|
|
|
|
# see the LED setting for wndr3700:green:wan in /etc/config/system.
|
|
|
|
#
|
|
|
|
# See the key above for switch port 1 for the meaning of the
|
|
|
|
# 'led' setting below.
|
2015-11-26 14:42:28 +00:00
|
|
|
ucidef_add_switch_port_attr "switch0" 5 led 2
|
2014-01-23 11:33:42 +00:00
|
|
|
;;
|
|
|
|
|
2011-11-07 21:43:51 +00:00
|
|
|
*)
|
2011-12-01 22:48:47 +00:00
|
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
2011-11-07 21:43:51 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2015-11-26 14:42:28 +00:00
|
|
|
board_config_flush
|
2011-11-07 21:43:51 +00:00
|
|
|
|
|
|
|
exit 0
|