ar71xx: add support for TP-Link TL-MR11U
[openwrt.git] / target / linux / ar71xx / base-files / etc / uci-defaults / network
1 #!/bin/sh
2 #
3 # Copyright (C) 2011 OpenWrt.org
4 #
5
6 [ -e /etc/config/network ] && exit 0
7
8 touch /etc/config/network
9
10 . /lib/functions/uci-defaults.sh
11 . /lib/ar71xx.sh
12
13 ucidef_set_interface_loopback
14
15 board=$(ar71xx_board_name)
16
17 case "$board" in
18 all0258n)
19 ucidef_set_interface_lan "eth0 eth1"
20 ;;
21
22 db120)
23 ucidef_set_interfaces_lan_wan "eth1" "eth0"
24 ucidef_add_switch "switch0" "1" "1"
25 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
26 ;;
27
28 dir-825-b1)
29 ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
30 ucidef_add_switch "rtl8366s" "1" "1"
31 ucidef_add_switch_vlan "rtl8366s" "1" "0 1 2 3 5t"
32 ;;
33
34 nbg460n_550n_550nh)
35 ucidef_set_interfaces_lan_wan "eth0" "eth1"
36 ucidef_add_switch "rtl8366s" "1" "1"
37 ucidef_add_switch_vlan "rtl8366s" "0" "0 1 2 3 5"
38 ;;
39
40 rb-433 |\
41 rb-433u)
42 ucidef_set_interfaces_lan_wan "eth1" "eth0"
43 ucidef_add_switch "switch0" "1" "1"
44 ucidef_add_switch_vlan "switch0" "1" "1 2 5"
45 ;;
46
47 rb-450)
48 ucidef_set_interfaces_lan_wan "eth1" "eth0"
49 ucidef_add_switch "eth1" "1" "1"
50 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 5"
51 ;;
52
53 rb-450g |\
54 routerstation-pro)
55 ucidef_set_interfaces_lan_wan "eth1" "eth0"
56 ucidef_add_switch "switch0" "1" "1"
57 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
58 ;;
59
60 rb-493g)
61 ucidef_set_interfaces_lan_wan "eth0 eth1.1" "eth1.2"
62 ucidef_add_switch "switch0" "1" "1"
63 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
64 ucidef_add_switch "switch1" "1" "1"
65 ucidef_add_switch_vlan "switch1" "1" "0t 1 2 3 4"
66 ucidef_add_switch_vlan "switch1" "2" "0t 5"
67 ;;
68
69 wzr-hp-g300nh2 |\
70 pb92 |\
71 ap113)
72 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
73 ucidef_add_switch "eth0" "1" "1"
74 ucidef_add_switch_vlan "eth0" "1" "0t 1 3 4 5"
75 ucidef_add_switch_vlan "eth0" "2" "0t 2"
76 ;;
77
78 tl-wr1043nd)
79 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
80 ucidef_add_switch "rtl8366rb" "1" "1"
81 ucidef_add_switch_vlan "rtl8366rb" "1" "1 2 3 4 5t"
82 ucidef_add_switch_vlan "rtl8366rb" "2" "0 5t"
83 ;;
84
85 tl-wr2543n)
86 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
87 ucidef_add_switch "switch0" "1" "1"
88 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
89 ucidef_add_switch_vlan "switch0" "2" "0 9t"
90 ;;
91
92 tl-wr841n-v1|\
93 tl-wr941nd)
94 ucidef_set_interface_raw "eth" "eth0"
95 ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
96 ;;
97
98 wrt160nl)
99 ucidef_set_interfaces_lan_wan "eth0" "eth1"
100 ucidef_add_switch "eth0" "1" "1"
101 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
102 ;;
103
104 wzr-hp-g300nh)
105 ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
106 ucidef_add_switch "switch0" "1" "1"
107 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
108 ;;
109
110 aw-nr580 |\
111 bullet-m |\
112 eap7660d |\
113 rb-411 |\
114 tl-mr11u |\
115 tl-mr3020 |\
116 tl-wa901nd |\
117 tl-wa901nd-v2 |\
118 tl-wr703n |\
119 wp543)
120 ucidef_set_interface_lan "eth0"
121 ;;
122
123 alfa-ap96 |\
124 alfa-nx |\
125 ap83 |\
126 jwap003 |\
127 pb42 |\
128 pb44 |\
129 routerstation|\
130 wpe72)
131 ucidef_set_interfaces_lan_wan "eth1" "eth0"
132 ;;
133
134 ap121 |\
135 ap121-mini |\
136 ap96 |\
137 airrouter |\
138 dir-600-a1 |\
139 dir-615-c1 |\
140 ja76pf |\
141 rb-750 |\
142 tew-632brp |\
143 tl-mr3220 |\
144 tl-mr3420 |\
145 tl-wr741nd |\
146 tl-wr741nd-v4 |\
147 tl-wr841n-v7 |\
148 whr-g301n |\
149 whr-hp-g300n |\
150 whr-hp-gn |\
151 wzr-hp-ag300h)
152 ucidef_set_interfaces_lan_wan "eth0" "eth1"
153 ucidef_add_switch "eth0" "1" "1"
154 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4"
155 ;;
156
157 wzr-hp-g450h)
158 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
159 ucidef_add_switch "eth0" "1" "1"
160 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
161 ucidef_add_switch_vlan "eth0" "2" "0t 1"
162 ;;
163
164 *)
165 ucidef_set_interfaces_lan_wan "eth0" "eth1"
166 ;;
167 esac
168
169 uci commit network
170
171 exit 0
This page took 0.061238 seconds and 5 git commands to generate.