source: trunk/target/linux/ar71xx/base-files/etc/uci-defaults/network @ 29658

Last change on this file since 29658 was 29658, checked in by juhosg, 5 years ago

ar71xx: use the TL-MR3x20 code for the TL-WR841N/ND v7

These models are based on the AP99 reference board,
and uses the AR7241 SoC.

  • Property svn:executable set to *
File size: 3.2 KB
Line 
1#!/bin/sh
2#
3# Copyright (C) 2011 OpenWrt.org
4#
5
6[ -e /etc/config/network ] && exit 0
7
8touch /etc/config/network
9
10. /lib/functions/uci-defaults.sh
11. /lib/ar71xx.sh
12
13ucidef_set_interface_loopback
14
15board=$(ar71xx_board_name)
16
17case "$board" in
18all0258n)
19        ucidef_set_interface_lan "eth0 eth1"
20        ;;
21
22db120)
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
28dir-825-b1)
29        ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
30        ucidef_add_switch "rtl8366s" "1" "1"
31        ucidef_add_switch_vlan "rtl8366s" "1" "0 1 2 3 5t"
32        ;;
33
34nbg460n_550n_550nh)
35        ucidef_set_interfaces_lan_wan "eth0" "eth1"
36        ucidef_add_switch "rtl8366s" "1" "1"
37        ucidef_add_switch_vlan "rtl8366s" "0" "0 1 2 3 5"
38        ;;
39
40rb-433 |\
41rb-433u)
42        ucidef_set_interfaces_lan_wan "eth1" "eth0"
43        ucidef_add_switch "switch0" "1" "1"
44        ucidef_add_switch_vlan "switch0" "1" "1 2 5"
45        ;;
46
47rb-450)
48        ucidef_set_interfaces_lan_wan "eth1" "eth0"
49        ucidef_add_switch "eth1" "1" "1"
50        ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 5"
51        ;;
52
53rb-450g |\
54routerstation-pro)
55        ucidef_set_interfaces_lan_wan "eth1" "eth0"
56        ucidef_add_switch "switch0" "1" "1"
57        ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
58        ;;
59
60rb-493g)
61        ucidef_set_interfaces_lan_wan "eth0 eth1.1" "eth1.2"
62        ucidef_add_switch "switch0" "1" "1"
63        ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
64        ucidef_add_switch "switch1" "1" "1"
65        ucidef_add_switch_vlan "switch1" "1" "0t 1 2 3 4"
66        ucidef_add_switch_vlan "switch1" "2" "0t 5"
67        ;;
68
69wzr-hp-g300nh2 |\
70pb92)
71        ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
72        ucidef_add_switch "eth0" "1" "1"
73        ucidef_add_switch_vlan "eth0" "1" "0t 1 3 4 5"
74        ucidef_add_switch_vlan "eth0" "2" "0t 2"
75        ;;
76
77tl-wr1043nd)
78        ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
79        ucidef_add_switch "rtl8366rb" "1" "1"
80        ucidef_add_switch_vlan "rtl8366rb" "1" "1 2 3 4 5t"
81        ucidef_add_switch_vlan "rtl8366rb" "2" "0 5t"
82        ;;
83
84tl-wr841n-v1|\
85tl-wr941nd)
86        ucidef_set_interface_raw "eth" "eth0"
87        ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
88        ;;
89
90wrt160nl)
91        ucidef_set_interfaces_lan_wan "eth0" "eth1"
92        ucidef_add_switch "eth0" "1" "1"
93        ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
94        ;;
95
96wzr-hp-g300nh)
97        ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
98        ucidef_add_switch "switch0" "1" "1"
99        ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
100        ;;
101
102aw-nr580 |\
103bullet-m |\
104eap7660d |\
105rb-411 |\
106tl-mr3020 |\
107tl-wa901nd |\
108tl-wa901nd-v2 |\
109tl-wr703n |\
110wp543)
111        ucidef_set_interface_lan "eth0"
112        ;;
113
114alfa-nx |\
115ap83 |\
116jwap003 |\
117pb42 |\
118pb44 |\
119routerstation)
120        ucidef_set_interfaces_lan_wan "eth1" "eth0"
121        ;;
122
123ap121 |\
124ap121-mini |\
125ap96 |\
126airrouter |\
127dir-600-a1 |\
128dir-615-c1 |\
129ja76pf |\
130rb750 |\
131tew-632brp |\
132tl-mr3220 |\
133tl-mr3420 |\
134tl-wr741nd |\
135tl-wr741nd-v4 |\
136tl-wr841n-v7 |\
137whr-g301n |\
138whr-hp-g300n |\
139whr-hp-gn |\
140wzr-hp-ag300h)
141        ucidef_set_interfaces_lan_wan "eth0" "eth1"
142        ucidef_add_switch "eth0" "1" "1"
143        ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4"
144        ;;
145
146wzr-hp-g450h)
147        ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
148        ucidef_add_switch "eth0" "1" "1"
149        ucidef_add_switch_vlan "eth0" "1" "0t 2 3 4 5"
150        ucidef_add_switch_vlan "eth0" "2" "0t 1"
151        ;;
152
153*)
154        ucidef_set_interfaces_lan_wan "eth0" "eth1"
155        ;;
156esac
157
158uci commit network
159
160exit 0
Note: See TracBrowser for help on using the repository browser.