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