brcm63xx: CPVA502+: fix userspace support
[openwrt/openwrt.git] / target / linux / brcm63xx / base-files / etc / board.d / 02_network
1 #!/bin/sh
2 #
3 # Copyright (C) 2012-2015 OpenWrt.org
4 #
5
6 . /lib/functions/uci-defaults.sh
7 . /lib/brcm63xx.sh
8
9 board_config_update
10
11 case "$(brcm63xx_board_name)" in
12
13 cvg834g |\
14 evg2000 |\
15 rta770bw |\
16 rta770w |\
17 spw303v |\
18 spw500v)
19 ucidef_set_interface_lan "eth0"
20 ;;
21
22 ar1004g |\
23 bcm96338gw |\
24 bcm96338w |\
25 cpva642 |\
26 ct-5365 |\
27 ct-536p_5621t |\
28 ct-6373 |\
29 dg834g_v4 |\
30 dsl-2640b-b |\
31 dsl-2640u |\
32 fast2604 |\
33 rta1320 |\
34 v2110)
35 ucidef_add_switch "switch0" \
36 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth0"
37 ;;
38
39 agpf-s0 |\
40 bcm96348gw |\
41 bcm96348gw-10 |\
42 bcm96348gw-11 |\
43 bcm96358vw |\
44 bcm96358vw2 |\
45 dg834gt |\
46 dmv-s0 |\
47 dsl-2650u |\
48 dv-201amr |\
49 f5d7633 |\
50 fast2404 |\
51 magic |\
52 rg100a |\
53 rta1025W |\
54 td-w8900gb |\
55 usr9108 |\
56 v2500v_bb)
57 ucidef_set_interfaces_lan_wan "eth1" "eth0"
58 ucidef_add_switch "switch0" \
59 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth1"
60 ;;
61
62 dsl-274xb-c |\
63 hg553 |\
64 hg556a_* |\
65 homehub2a)
66 ucidef_add_switch "switch0" \
67 "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t@eth0"
68 ;;
69
70 dva-g3810bn |\
71 hg520 |\
72 neufbox4)
73 ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
74 ucidef_add_switch "switch0" \
75 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth1"
76 ;;
77
78 a4001n1 |\
79 a4001n |\
80 ar-5381u |\
81 ar-5387un |\
82 av4202n |\
83 bcm963281tan |\
84 bcm96328avng |\
85 bcm96368mvngr |\
86 dsl-274xb-f |\
87 dsl-275xb-d |\
88 fast2504n |\
89 fast2704v2 |\
90 hg622 |\
91 hg655b |\
92 p870hw-51a_v2 |\
93 r5010un_v2 |\
94 vr-3025un |\
95 vr-3025u |\
96 vr-3026e)
97 ucidef_add_switch "switch0" \
98 "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0"
99 ;;
100
101 vh4032n)
102 ucidef_add_switch "switch0" \
103 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t@eth0"
104 ;;
105
106 bcm96368mvwg)
107 ucidef_add_switch "switch0" \
108 "1:lan" "2:lan" "4:lan" "5:lan" "8t@eth0"
109 ;;
110
111 wap-5813n)
112 ucidef_add_switch "switch0" \
113 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@eth0"
114 ;;
115
116 fast2704n |\
117 dgnd3700v1_dgnd3800b)
118 ucidef_add_switch "switch0" \
119 "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "0:wan" "8t@eth0"
120 ;;
121
122 neufbox6)
123 ucidef_add_switch "switch0" \
124 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0"
125 ;;
126
127 vg50)
128 ucidef_add_switch "switch0" \
129 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8t@eth0"
130 ;;
131
132 bcm963268bu_p300)
133 ucidef_add_switch "switch0" \
134 "0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t@eth0"
135 ;;
136
137 cpva502p |\
138 livebox1)
139 ucidef_set_interfaces_lan_wan "eth0" "eth1"
140 ;;
141
142 *)
143 ucidef_set_interfaces_lan_wan "eth1" "eth0"
144 ;;
145
146 esac
147
148 board_config_flush
149
150 exit 0