kernel: update linux 3.7 to 3.7.3
[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 all0315n |\
19 all0258n |\
20 ja76pf2|\
21 ubnt-unifi-outdoor)
22         ucidef_set_interface_lan "eth0 eth1"
23         ;;
24
25 ap136-010)
26         ucidef_set_interfaces_lan_wan "eth0" "eth1"
27         ucidef_add_switch "switch0" "1" "1"
28         ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
29         ucidef_add_switch_vlan "switch0" "2" "5 6"
30         ;;
31
32 ap136-020 |\
33 ap135-020)
34         ucidef_set_interfaces_lan_wan "eth1" "eth0"
35         ucidef_add_switch "switch0" "1" "1"
36         ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
37         ucidef_add_switch_vlan "switch0" "2" "5 6"
38         ;;
39
40 db120 |\
41 rb-2011l | \
42 rb-2011uas-2hnd)
43         ucidef_set_interfaces_lan_wan "eth0.1 eth1" "eth0.2"
44         ucidef_add_switch "eth0" "1" "1"
45         ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
46         ucidef_add_switch_vlan "eth0" "2" "0t 1"
47         ucidef_add_switch "eth1" "1" "1"
48         ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5"
49         ;;
50
51 dir-825-b1|\
52 tew-673gru)
53         ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
54         ucidef_add_switch "rtl8366s" "1" "1"
55         ucidef_add_switch_vlan "rtl8366s" "1" "0 1 2 3 5t"
56         ;;
57
58 nbg460n_550n_550nh)
59         ucidef_set_interfaces_lan_wan "eth0" "eth1"
60         ucidef_add_switch "rtl8366s" "1" "1"
61         ucidef_add_switch_vlan "rtl8366s" "0" "0 1 2 3 5"
62         ;;
63
64 rb-433 |\
65 rb-433u)
66         ucidef_set_interfaces_lan_wan "eth1" "eth0"
67         ucidef_add_switch "switch0" "1" "1"
68         ucidef_add_switch_vlan "switch0" "1" "1 2 5"
69         ;;
70
71 rb-435g)
72         ucidef_set_interfaces_lan_wan "eth1" "eth0"
73         ucidef_add_switch "switch0" "1" "1"
74         ucidef_add_switch_vlan "switch0" "1" "0 1 2"
75         ;;
76
77 rb-450)
78         ucidef_set_interfaces_lan_wan "eth1" "eth0"
79         ucidef_add_switch "eth1" "1" "1"
80         ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 5"
81         ;;
82
83 rb-450g |\
84 routerstation-pro)
85         ucidef_set_interfaces_lan_wan "eth1" "eth0"
86         ucidef_add_switch "switch0" "1" "1"
87         ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
88         ;;
89
90 ap136 |\
91 rb-750gl |\
92 rb-751g |\
93 wzr-hp-g450h)
94         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
95         ucidef_add_switch "switch0" "1" "1"
96         ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
97         ucidef_add_switch_vlan "switch0" "2" "0t 1"
98         ;;
99
100 rb-493g)
101         ucidef_set_interfaces_lan_wan "eth0 eth1.1" "eth1.2"
102         ucidef_add_switch "switch0" "1" "1"
103         ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
104         ucidef_add_switch "switch1" "1" "1"
105         ucidef_add_switch_vlan "switch1" "1" "0t 1 2 3 4"
106         ucidef_add_switch_vlan "switch1" "2" "0t 5"
107         ;;
108
109 wzr-hp-g300nh2 |\
110 pb92 |\
111 ap113)
112         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
113         ucidef_add_switch "eth0" "1" "1"
114         ucidef_add_switch_vlan "eth0" "1" "0t 1 3 4 5"
115         ucidef_add_switch_vlan "eth0" "2" "0t 2"
116         ;;
117
118 tl-wdr4300|\
119 tl-wr1041n-v2)
120         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
121         ucidef_add_switch "eth0" "1" "1"
122         ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
123         ucidef_add_switch_vlan "eth0" "2" "0t 1"
124         ;;
125
126 tl-wr1043nd)
127         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
128         ucidef_add_switch "rtl8366rb" "1" "1"
129         ucidef_add_switch_vlan "rtl8366rb" "1" "1 2 3 4 5t"
130         ucidef_add_switch_vlan "rtl8366rb" "2" "0 5t"
131         ;;
132
133 tl-wr2543n)
134         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
135         ucidef_add_switch "switch0" "1" "1"
136         ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
137         ucidef_add_switch_vlan "switch0" "2" "0 9t"
138         ;;
139
140 tl-wr841n-v1|\
141 tl-wr941nd)
142         ucidef_set_interface_raw "eth" "eth0"
143         ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
144         ;;
145
146 tl-wr841n-v8)
147         ucidef_set_interfaces_lan_wan "eth1" "eth0"
148         ucidef_add_switch "switch0" "1" "1"
149         ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
150         ;;
151
152 uap-pro)
153         ucidef_set_interface_lan "eth0"
154         ucidef_add_switch "switch0" "1" "1"
155         ucidef_add_switch_vlan "switch0" "1" "0 1 2"
156         ;;
157
158 wrt160nl)
159         ucidef_set_interfaces_lan_wan "eth0" "eth1"
160         ucidef_add_switch "eth0" "1" "1"
161         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
162         ;;
163
164 wzr-hp-g300nh)
165         ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
166         ucidef_add_switch "switch0" "1" "1"
167         ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
168         ;;
169
170 wndr4300)
171         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
172         ucidef_add_switch "switch0" "1" "1"
173         ucidef_add_switch_vlan "switch0" "1" "0t 1 2 3 4"
174         ucidef_add_switch_vlan "switch0" "2" "0t 5"
175         ;;
176
177 all0305 |\
178 aw-nr580 |\
179 bullet-m |\
180 cap4200ag |\
181 eap7660d |\
182 mr600 |\
183 rb-411 |\
184 tl-mr11u |\
185 tl-mr3020 |\
186 tl-mr3040 |\
187 tl-wa901nd |\
188 tl-wa901nd-v2 |\
189 tl-wr703n |\
190 wp543)
191         ucidef_set_interface_lan "eth0"
192         ;;
193
194 alfa-ap96 |\
195 alfa-nx |\
196 ap83 |\
197 jwap003 |\
198 pb42 |\
199 pb44 |\
200 routerstation|\
201 wpe72)
202         ucidef_set_interfaces_lan_wan "eth1" "eth0"
203         ;;
204
205 ap121 |\
206 ap121-mini |\
207 ap96 |\
208 airrouter |\
209 dir-600-a1 |\
210 dir-615-c1 |\
211 dir-615-e4 |\
212 ja76pf |\
213 rb-750 |\
214 rb-751 |\
215 tew-632brp |\
216 tew-712br |\
217 tl-mr3220 |\
218 tl-mr3220-v2 |\
219 tl-mr3420 |\
220 tl-wr741nd |\
221 tl-wr741nd-v4 |\
222 tl-wr841n-v7 |\
223 whr-g301n |\
224 whr-hp-g300n |\
225 whr-hp-gn |\
226 wzr-hp-ag300h)
227         ucidef_set_interfaces_lan_wan "eth0" "eth1"
228         ucidef_add_switch "eth0" "1" "1"
229         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4"
230         ;;
231
232 wzr-hp-g450h)
233         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
234         ucidef_add_switch "eth0" "1" "1"
235         ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
236         ucidef_add_switch_vlan "eth0" "2" "0t 1"
237         ;;
238
239 ew-dorin)
240         ucidef_set_interface_lan "eth0"
241         ucidef_add_switch "eth0" "1" "1"
242         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3"
243         ;;
244
245 ew-dorin-router)
246         ucidef_set_interfaces_lan_wan "eth0" "eth1"
247         ucidef_add_switch "eth0" "1" "1"
248         ucidef_add_switch_vlan "eth0" "1" "0 2 3"
249         ;;
250
251 *)
252         ucidef_set_interfaces_lan_wan "eth0" "eth1"
253         ;;
254 esac
255
256 uci commit network
257
258 exit 0