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