ar71xx: add initial support for RB750GL
[openwrt/svn-archive/archive.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 rb-750gl |\
66 wzr-hp-g450h)
67 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
68 ucidef_add_switch "switch0" "1" "1"
69 ucidef_add_switch_vlan "switch0" "1" "0t 2 3 4 5"
70 ucidef_add_switch_vlan "switch0" "2" "0t 1"
71 ;;
72
73 rb-493g)
74 ucidef_set_interfaces_lan_wan "eth0 eth1.1" "eth1.2"
75 ucidef_add_switch "switch0" "1" "1"
76 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
77 ucidef_add_switch "switch1" "1" "1"
78 ucidef_add_switch_vlan "switch1" "1" "0t 1 2 3 4"
79 ucidef_add_switch_vlan "switch1" "2" "0t 5"
80 ;;
81
82 wzr-hp-g300nh2 |\
83 pb92 |\
84 ap113)
85 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
86 ucidef_add_switch "eth0" "1" "1"
87 ucidef_add_switch_vlan "eth0" "1" "0t 1 3 4 5"
88 ucidef_add_switch_vlan "eth0" "2" "0t 2"
89 ;;
90
91 tl-wr1043nd)
92 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
93 ucidef_add_switch "rtl8366rb" "1" "1"
94 ucidef_add_switch_vlan "rtl8366rb" "1" "1 2 3 4 5t"
95 ucidef_add_switch_vlan "rtl8366rb" "2" "0 5t"
96 ;;
97
98 tl-wr2543n)
99 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
100 ucidef_add_switch "switch0" "1" "1"
101 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
102 ucidef_add_switch_vlan "switch0" "2" "0 9t"
103 ;;
104
105 tl-wr841n-v1|\
106 tl-wr941nd)
107 ucidef_set_interface_raw "eth" "eth0"
108 ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
109 ;;
110
111 wrt160nl)
112 ucidef_set_interfaces_lan_wan "eth0" "eth1"
113 ucidef_add_switch "eth0" "1" "1"
114 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
115 ;;
116
117 wzr-hp-g300nh)
118 ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
119 ucidef_add_switch "switch0" "1" "1"
120 ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
121 ;;
122
123 aw-nr580 |\
124 bullet-m |\
125 eap7660d |\
126 rb-411 |\
127 tl-mr11u |\
128 tl-mr3020 |\
129 tl-wa901nd |\
130 tl-wa901nd-v2 |\
131 tl-wr703n |\
132 wp543)
133 ucidef_set_interface_lan "eth0"
134 ;;
135
136 alfa-ap96 |\
137 alfa-nx |\
138 ap83 |\
139 jwap003 |\
140 pb42 |\
141 pb44 |\
142 routerstation|\
143 wpe72)
144 ucidef_set_interfaces_lan_wan "eth1" "eth0"
145 ;;
146
147 ap121 |\
148 ap121-mini |\
149 ap96 |\
150 airrouter |\
151 dir-600-a1 |\
152 dir-615-c1 |\
153 dir-615-e4 |\
154 ja76pf |\
155 rb-750 |\
156 tew-632brp |\
157 tl-mr3220 |\
158 tl-mr3420 |\
159 tl-wr741nd |\
160 tl-wr741nd-v4 |\
161 tl-wr841n-v7 |\
162 whr-g301n |\
163 whr-hp-g300n |\
164 whr-hp-gn |\
165 wzr-hp-ag300h)
166 ucidef_set_interfaces_lan_wan "eth0" "eth1"
167 ucidef_add_switch "eth0" "1" "1"
168 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4"
169 ;;
170
171 wzr-hp-g450h)
172 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
173 ucidef_add_switch "eth0" "1" "1"
174 ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
175 ucidef_add_switch_vlan "eth0" "2" "0t 1"
176 ;;
177
178 *)
179 ucidef_set_interfaces_lan_wan "eth0" "eth1"
180 ;;
181 esac
182
183 uci commit network
184
185 exit 0