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