ar71xx: add initial support for RB2011UAS-2HnD
[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         ucidef_set_interface_lan "eth0 eth1"
22         ;;
23
24 db120 |\
25 rb-2011l | \
26 rb-2011uas-2hnd)
27         ucidef_set_interfaces_lan_wan "eth0.1 eth1" "eth0.2"
28         ucidef_add_switch "eth0" "1" "1"
29         ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
30         ucidef_add_switch_vlan "eth0" "2" "0t 1"
31         ucidef_add_switch "eth1" "1" "1"
32         ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5"
33         ;;
34
35 dir-825-b1|\
36 dir-825-b1-openwrt|\
37 dir-825-b1-tostock|\
38 tew-673gru)
39         ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
40         ucidef_add_switch "rtl8366s" "1" "1"
41         ucidef_add_switch_vlan "rtl8366s" "1" "0 1 2 3 5t"
42         ;;
43
44 nbg460n_550n_550nh)
45         ucidef_set_interfaces_lan_wan "eth0" "eth1"
46         ucidef_add_switch "rtl8366s" "1" "1"
47         ucidef_add_switch_vlan "rtl8366s" "0" "0 1 2 3 5"
48         ;;
49
50 rb-433 |\
51 rb-433u)
52         ucidef_set_interfaces_lan_wan "eth1" "eth0"
53         ucidef_add_switch "switch0" "1" "1"
54         ucidef_add_switch_vlan "switch0" "1" "1 2 5"
55         ;;
56
57 rb-450)
58         ucidef_set_interfaces_lan_wan "eth1" "eth0"
59         ucidef_add_switch "eth1" "1" "1"
60         ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 5"
61         ;;
62
63 rb-450g |\
64 routerstation-pro)
65         ucidef_set_interfaces_lan_wan "eth1" "eth0"
66         ucidef_add_switch "switch0" "1" "1"
67         ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
68         ;;
69
70 ap136 |\
71 rb-750gl |\
72 rb-751g |\
73 wzr-hp-g450h)
74         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
75         ucidef_add_switch "switch0" "1" "1"
76         ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
77         ucidef_add_switch_vlan "switch0" "2" "0t 1"
78         ;;
79
80 rb-493g)
81         ucidef_set_interfaces_lan_wan "eth0 eth1.1" "eth1.2"
82         ucidef_add_switch "switch0" "1" "1"
83         ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
84         ucidef_add_switch "switch1" "1" "1"
85         ucidef_add_switch_vlan "switch1" "1" "0t 1 2 3 4"
86         ucidef_add_switch_vlan "switch1" "2" "0t 5"
87         ;;
88
89 wzr-hp-g300nh2 |\
90 pb92 |\
91 ap113)
92         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
93         ucidef_add_switch "eth0" "1" "1"
94         ucidef_add_switch_vlan "eth0" "1" "0t 1 3 4 5"
95         ucidef_add_switch_vlan "eth0" "2" "0t 2"
96         ;;
97
98 tl-wdr4300|\
99 tl-wr1041n-v2)
100         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
101         ucidef_add_switch "eth0" "1" "1"
102         ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
103         ucidef_add_switch_vlan "eth0" "2" "0t 1"
104         ;;
105
106 tl-wr1043nd)
107         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
108         ucidef_add_switch "rtl8366rb" "1" "1"
109         ucidef_add_switch_vlan "rtl8366rb" "1" "1 2 3 4 5t"
110         ucidef_add_switch_vlan "rtl8366rb" "2" "0 5t"
111         ;;
112
113 tl-wr2543n)
114         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
115         ucidef_add_switch "switch0" "1" "1"
116         ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
117         ucidef_add_switch_vlan "switch0" "2" "0 9t"
118         ;;
119
120 tl-wr841n-v1|\
121 tl-wr941nd)
122         ucidef_set_interface_raw "eth" "eth0"
123         ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
124         ;;
125
126 wrt160nl)
127         ucidef_set_interfaces_lan_wan "eth0" "eth1"
128         ucidef_add_switch "eth0" "1" "1"
129         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
130         ;;
131
132 wzr-hp-g300nh)
133         ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
134         ucidef_add_switch "switch0" "1" "1"
135         ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
136         ;;
137
138 all0305 |\
139 aw-nr580 |\
140 bullet-m |\
141 eap7660d |\
142 ew-dorin |\
143 rb-411 |\
144 tl-mr11u |\
145 tl-mr3020 |\
146 tl-wa901nd |\
147 tl-wa901nd-v2 |\
148 tl-wr703n |\
149 wp543)
150         ucidef_set_interface_lan "eth0"
151         ;;
152
153 alfa-ap96 |\
154 alfa-nx |\
155 ap83 |\
156 jwap003 |\
157 pb42 |\
158 pb44 |\
159 routerstation|\
160 wpe72)
161         ucidef_set_interfaces_lan_wan "eth1" "eth0"
162         ;;
163
164 ap121 |\
165 ap121-mini |\
166 ap96 |\
167 airrouter |\
168 dir-600-a1 |\
169 dir-615-c1 |\
170 dir-615-e4 |\
171 ja76pf |\
172 rb-750 |\
173 rb-751 |\
174 tew-632brp |\
175 tew-712br |\
176 tl-mr3220 |\
177 tl-mr3420 |\
178 tl-wr741nd |\
179 tl-wr741nd-v4 |\
180 tl-wr841n-v7 |\
181 whr-g301n |\
182 whr-hp-g300n |\
183 whr-hp-gn |\
184 wzr-hp-ag300h)
185         ucidef_set_interfaces_lan_wan "eth0" "eth1"
186         ucidef_add_switch "eth0" "1" "1"
187         ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4"
188         ;;
189
190 wzr-hp-g450h)
191         ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
192         ucidef_add_switch "eth0" "1" "1"
193         ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
194         ucidef_add_switch_vlan "eth0" "2" "0t 1"
195         ;;
196
197 ew-dorin-router)
198         ucidef_set_interfaces_lan_wan "eth0" "eth1"
199         ucidef_add_switch "eth0" "1" "1"
200         ucidef_add_switch_vlan "eth0" "1" "0 2 3"
201         ;;
202
203 *)
204         ucidef_set_interfaces_lan_wan "eth0" "eth1"
205         ;;
206 esac
207
208 uci commit network
209
210 exit 0