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