all: drop old uci-defaults.sh
[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 rta770bw |\
15 rta770w |\
16 spw303v |\
17 spw500v)
18 ucidef_set_interface_lan "eth0"
19 ;;
20
21 ar1004g |\
22 bcm96338gw |\
23 bcm96338w |\
24 cpva642 |\
25 ct-5365 |\
26 ct-536p_5621t |\
27 ct-6373 |\
28 dg834g_v4 |\
29 dsl-2640b-b |\
30 dsl-2640u |\
31 fast2604 |\
32 rta1320 |\
33 v2110)
34 ucidef_add_switch "switch0" \
35 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth0"
36 ;;
37
38 agpf-s0 |\
39 bcm96348gw |\
40 bcm96348gw-10 |\
41 bcm96348gw-11 |\
42 bcm96358vw |\
43 bcm96358vw2 |\
44 cpva502p |\
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" "5@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 bcm963281tan |\
83 bcm96328avng |\
84 bcm96368mvngr |\
85 dsl-274xb-f |\
86 dsl-275xb-d |\
87 fast2504n |\
88 fast2704v2 |\
89 hg655b |\
90 p870hw-51a_v2 |\
91 r5010un_v2 |\
92 vr-3025un |\
93 vr-3025u |\
94 vr-3026e)
95 ucidef_add_switch "switch0" \
96 "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0"
97 ;;
98
99 bcm96368mvwg)
100 ucidef_add_switch "switch0" \
101 "1:lan" "2:lan" "4:lan" "5:lan" "8t@eth0"
102 ;;
103
104 wap-5813n)
105 ucidef_add_switch "switch0" \
106 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@eth0"
107 ;;
108
109 fast2704n |\
110 dgnd3700v1_dgnd3800b)
111 ucidef_add_switch "switch0" \
112 "1:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "0:wan" "8t@eth0"
113 ;;
114
115 neufbox6)
116 ucidef_add_switch "switch0" \
117 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0"
118 ;;
119
120 vg50)
121 ucidef_add_switch "switch0" \
122 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8t@eth0"
123 ;;
124
125 bcm963268bu_p300)
126 ucidef_add_switch "switch0" \
127 "0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t@eth0"
128 ;;
129
130 *)
131 ucidef_set_interfaces_lan_wan "eth1" "eth0"
132 ;;
133
134 esac
135
136 board_config_flush
137
138 exit 0