bcm63xx: fix DSL-274xB F1 default network config
[openwrt/openwrt.git] / target / linux / brcm63xx / base-files / etc / uci-defaults / 02_network
1 #!/bin/sh
2 #
3 # Copyright (C) 2012 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/brcm63xx.sh
12
13 ucidef_set_interface_loopback
14
15 case "$board_name" in
16
17 CVG834G_E15R3921 |\
18 RTA770BW |\
19 RTA770W |\
20 96348W3 |\
21 96358-502V |\
22 SPW500V)
23 ucidef_set_interface_lan "eth0"
24 ;;
25
26 96338GW |\
27 96338W |\
28 96338W2_E7T |\
29 96348A-122 |\
30 96348W3 |\
31 CPVA642 |\
32 CT536_CT5621 |\
33 CT6373-1 |\
34 D-4P-W |\
35 "F@ST2604" |\
36 RTA1320_16M |\
37 V2110)
38 ucidef_set_interface_lan "eth0"
39 ucidef_add_switch "eth0" "1" "1"
40 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5"
41 ;;
42
43 96348GW |\
44 96348GW-10 |\
45 96348GW-11 |\
46 96348GW-A |\
47 96358VW |\
48 96358VW2 |\
49 AGPF-S0 |\
50 "CPVA502+" |\
51 DV201AMR |\
52 DWV-S0 |\
53 "F@ST2404" |\
54 HW553 |\
55 MAGIC |\
56 RTA1025W_16 |\
57 V2500V_BB)
58 ucidef_set_interfaces_lan_wan "eth1" "eth0"
59 ucidef_add_switch "eth1" "1" "1"
60 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5"
61 ;;
62
63 AW4139 |\
64 AW4339U |\
65 HW556*)
66 ucidef_set_interface_lan "eth0.1"
67 ucidef_add_switch "eth0" "1" "1"
68 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 4 5t"
69 ;;
70
71 NB4-* |\
72 DVG3810BN)
73 ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
74 ucidef_add_switch "eth1" "1" "1"
75 ucidef_add_switch_vlan "eth1" "1" "0 1 2 3 4 5t"
76 ;;
77
78 96328avng |\
79 96328A-1241N |\
80 96328A-1441N1 |\
81 963281TAN |\
82 963281T_TEF |\
83 96368MVNgr)
84 ucidef_set_interface_lan "eth0.1"
85 ucidef_add_switch "eth0" "1" "1"
86 ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 8t"
87 ;;
88
89 96368MVWG)
90 ucidef_set_interface_lan "eth0.1"
91 ucidef_add_switch "eth0" "1" "1"
92 ucidef_add_switch_vlan "eth0" "1" "1 2 4 5 8t"
93 ;;
94
95 NB6)
96 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
97 ucidef_add_switch "switch0" "1" "1"
98 ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 9t"
99 ucidef_add_switch_vlan "switch0" "2" "0 9t"
100 ;;
101
102 *)
103 ucidef_set_interfaces_lan_wan "eth1" "eth0"
104 ;;
105
106 esac
107
108 uci commit network
109
110 exit 0