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

Last change on this file since 29395 was 29395, checked in by juhosg, 4 years ago

ar71xx: add support for Ubiquiti AirRouter

Signed-off-by: Gergely Barta <gergely.barta@…>

  • Property svn:executable set to *
File size: 2.8 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
22dir-825-b1)
23        ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
24        ucidef_add_switch "rtl8366s" "1" "1"
25        ucidef_add_switch_vlan "rtl8366s" "1" "0 1 2 3 5t"
26        ;;
27
28nbg460n_550n_550nh)
29        ucidef_set_interfaces_lan_wan "eth0" "eth1"
30        ucidef_add_switch "rtl8366s" "1" "1"
31        ucidef_add_switch_vlan "rtl8366s" "0" "0 1 2 3 5"
32        ;;
33
34rb-433 |\
35rb-433u)
36        ucidef_set_interfaces_lan_wan "eth1" "eth0"
37        ucidef_add_switch "switch0" "1" "1"
38        ucidef_add_switch_vlan "switch0" "1" "1 2 5"
39        ;;
40
41rb-450)
42        ucidef_set_interfaces_lan_wan "eth1" "eth0"
43        ucidef_add_switch "eth1" "1" "1"
44        ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 5"
45        ;;
46
47rb-450g |\
48routerstation-pro)
49        ucidef_set_interfaces_lan_wan "eth1" "eth0"
50        ucidef_add_switch "switch0" "1" "1"
51        ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
52        ;;
53
54rb-493g)
55        ucidef_set_interfaces_lan_wan "eth0 eth1.1" "eth1.2"
56        ucidef_add_switch "switch0" "1" "1"
57        ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
58        ucidef_add_switch "switch1" "1" "1"
59        ucidef_add_switch_vlan "switch1" "1" "0t 1 2 3 4"
60        ucidef_add_switch_vlan "switch1" "2" "0t 5"
61        ;;
62
63pb92)
64        ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
65        ucidef_add_switch "eth0" "1" "1"
66        ucidef_add_switch_vlan "eth0" "1" "0t 1 3 4 5"
67        ucidef_add_switch_vlan "eth0" "2" "0t 2"
68        ;;
69
70tl-wa901nd)
71        ucidef_set_interface_raw "eth" "eth0"
72        ucidef_set_interface_lan "lan"
73        ;;
74
75tl-wr1043nd)
76        ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
77        ucidef_add_switch "rtl8366rb" "1" "1"
78        ucidef_add_switch_vlan "rtl8366rb" "1" "1 2 3 4 5t"
79        ucidef_add_switch_vlan "rtl8366rb" "2" "0 5t"
80        ;;
81
82tl-wr841n-v1|\
83tl-wr941nd)
84        ucidef_set_interface_raw "eth" "eth0"
85        ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
86        ;;
87
88wrt160nl)
89        ucidef_set_interfaces_lan_wan "eth0" "eth1"
90        ucidef_add_switch "eth0" "1" "1"
91        ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
92        ;;
93
94wzr-hp-g300nh)
95        ucidef_set_interfaces_lan_wan "eth0.1" "eth1"
96        ucidef_add_switch "switch0" "1" "1"
97        ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 5t"
98        ;;
99
100aw-nr580 |\
101bullet-m |\
102eap7660d |\
103rb-411 |\
104tl-wa901nd-v2 |\
105tl-wr703n |\
106wp543)
107        ucidef_set_interface_lan "eth0"
108        ;;
109
110ap83 |\
111jwap003 |\
112pb42 |\
113pb44 |\
114routerstation)
115        ucidef_set_interfaces_lan_wan "eth1" "eth0"
116        ;;
117
118ap121 |\
119ap121-mini |\
120ap96 |\
121airrouter |\
122dir-600-a1 |\
123dir-615-c1 |\
124ja76pf |\
125rb750 |\
126tew-632brp |\
127tl-mr3220 |\
128tl-mr3420 |\
129tl-wr741nd |\
130tl-wr741nd-v4 |\
131whr-g301n |\
132whr-hp-g300n |\
133whr-hp-gn |\
134wzr-hp-ag300h)
135        ucidef_set_interfaces_lan_wan "eth0" "eth1"
136        ucidef_add_switch "eth0" "1" "1"
137        ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4"
138        ;;
139
140*)
141        ucidef_set_interfaces_lan_wan "eth0" "eth1"
142        ;;
143esac
144
145uci commit network
146
147exit 0
Note: See TracBrowser for help on using the repository browser.