ff5fc7a201e31e0847702fcfa0b18b82e0a24ab5
[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 cpva502p |\
46 dg834gt |\
47 dmv-s0 |\
48 dsl-2650u |\
49 dv-201amr |\
50 f5d7633 |\
51 fast2404 |\
52 magic |\
53 rg100a |\
54 rta1025W |\
55 td-w8900gb |\
56 usr9108 |\
57 v2500v_bb)
58 ucidef_set_interfaces_lan_wan "eth1" "eth0"
59 ucidef_add_switch "switch0" \
60 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth1"
61 ;;
62
63 dsl-274xb-c |\
64 hg553 |\
65 hg556a_* |\
66 homehub2a)
67 ucidef_add_switch "switch0" \
68 "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t@eth0"
69 ;;
70
71 dva-g3810bn |\
72 hg520 |\
73 neufbox4)
74 ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
75 ucidef_add_switch "switch0" \
76 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth1"
77 ;;
78
79 a4001n1 |\
80 a4001n |\
81 ar-5381u |\
82 ar-5387un |\
83 av4202n |\
84 bcm963281tan |\
85 bcm96328avng |\
86 bcm96368mvngr |\
87 dsl-274xb-f |\
88 dsl-275xb-d |\
89 fast2504n |\
90 fast2704v2 |\
91 hg622 |\
92 hg655b |\
93 p870hw-51a_v2 |\
94 r5010un_v2 |\
95 vr-3025un |\
96 vr-3025u |\
97 vr-3026e)
98 ucidef_add_switch "switch0" \
99 "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0"
100 ;;
101
102 vh4032n)
103 ucidef_add_switch "switch0" \
104 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t@eth0"
105 ;;
106
107 bcm96368mvwg)
108 ucidef_add_switch "switch0" \
109 "1:lan" "2:lan" "4:lan" "5:lan" "8t@eth0"
110 ;;
111
112 wap-5813n)
113 ucidef_add_switch "switch0" \
114 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@eth0"
115 ;;
116
117 fast2704n |\
118 dgnd3700v1_dgnd3800b)
119 ucidef_add_switch "switch0" \
120 "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "0:wan" "8t@eth0"
121 ;;
122
123 neufbox6)
124 ucidef_add_switch "switch0" \
125 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0"
126 ;;
127
128 vg50)
129 ucidef_add_switch "switch0" \
130 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8t@eth0"
131 ;;
132
133 bcm963268bu_p300)
134 ucidef_add_switch "switch0" \
135 "0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t@eth0"
136 ;;
137
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