d0c15a9f9871367d35a095f50bc03a8d6dc8f1e5
[openwrt/openwrt.git] / target / linux / bcm63xx / 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
8 board_config_update
9
10 case "$(board_name)" in
11 actiontec,r1000h|\
12 dynalink,rta770bw|\
13 dynalink,rta770w|\
14 netgear,cvg834g|\
15 netgear,dgnd3700-v2|\
16 netgear,evg2000|\
17 t-com,speedport-w-303v|\
18 t-com,speedport-w-500v)
19 ucidef_set_interface_lan "eth0"
20 ;;
21 adb,a4001n1|\
22 adb,a4001n|\
23 adb,av4202n|\
24 brcm,bcm963281tan|\
25 brcm,bcm96328avng|\
26 brcm,bcm96368mvngr|\
27 comtrend,ar-5381u|\
28 comtrend,ar-5387un|\
29 comtrend,vr-3025u|\
30 comtrend,vr-3025un|\
31 comtrend,vr-3026e|\
32 d-link,dsl-274xb-f1|\
33 d-link,dsl-275xb-d1|\
34 huawei,echolife-hg622|\
35 huawei,echolife-hg655b|\
36 nucom,r5010un-v2|\
37 sagem,fast-2504n|\
38 sagem,fast-2704-v2|\
39 zyxel,p870hw-51a-v2)
40 ucidef_add_switch "switch0" \
41 "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "8t@eth0"
42 ;;
43 alcatel,rg100a|\
44 belkin,f5d7633|\
45 brcm,bcm96348gw|\
46 brcm,bcm96348gw-10|\
47 brcm,bcm96348gw-11|\
48 brcm,bcm96358vw|\
49 brcm,bcm96358vw2|\
50 bt,voyager-2500v-bb|\
51 davolink,dv-201amr|\
52 d-link,dsl-2650u|\
53 dynalink,rta1025w|\
54 netgear,dg834gt-pn|\
55 pirelli,agpf-s0|\
56 sagem,fast-2404|\
57 telsey,magic|\
58 tp-link,td-w8900gb|\
59 usrobotics,usr9108)
60 ucidef_set_interfaces_lan_wan "eth1" "eth0"
61 ucidef_add_switch "switch0" \
62 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth1"
63 ;;
64 asmax,ar-1004g|\
65 brcm,bcm96338gw|\
66 brcm,bcm96338w|\
67 bt,voyager-2110|\
68 comtrend,ct-5365|\
69 comtrend,ct-536plus|\
70 comtrend,ct-6373|\
71 d-link,dsl-2640b-b|\
72 d-link,dsl-2640u|\
73 dynalink,rta1320|\
74 netgear,dg834g-v4|\
75 sagem,fast-2604|\
76 telsey,cpva642)
77 ucidef_add_switch "switch0" \
78 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5u@eth0"
79 ;;
80 brcm,bcm963268bu-p300)
81 ucidef_add_switch "switch0" \
82 "0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t@eth0"
83 ;;
84 brcm,bcm96368mvwg)
85 ucidef_add_switch "switch0" \
86 "1:lan" "2:lan" "4:lan" "5:lan" "8t@eth0"
87 ;;
88 bt,home-hub-2-a|\
89 d-link,dsl-274xb-c2|\
90 huawei,echolife-hg553|\
91 huawei,echolife-hg556a-a|\
92 huawei,echolife-hg556a-b|\
93 huawei,echolife-hg556a-c)
94 ucidef_add_switch "switch0" \
95 "0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "5t@eth0"
96 ;;
97 comtrend,ar-5315u|\
98 observa,vh4032n|\
99 sagem,fast-2704n)
100 ucidef_add_switch "switch0" \
101 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t@eth0"
102 ;;
103 comtrend,vg-8050)
104 ucidef_add_switch "switch0" \
105 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "8t@eth0"
106 ;;
107 comtrend,vr-3032u)
108 ucidef_add_switch "switch0" \
109 "0:lan:2" "1:lan:3" "2:lan:4" "3:lan:1" "8t@eth0"
110 ;;
111 comtrend,wap-5813n)
112 ucidef_add_switch "switch0" \
113 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5t@eth0"
114 ;;
115 d-link,dva-g3810bn-tl|\
116 huawei,echolife-hg520v|\
117 sfr,neufbox-4-foxconn-r1|\
118 sfr,neufbox-4-sercomm-r0)
119 ucidef_set_interfaces_lan_wan "eth1.1" "eth0"
120 ucidef_add_switch "switch0" \
121 "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5t@eth1"
122 ;;
123 inteno,vg50)
124 ucidef_add_switch "switch0" \
125 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8t@eth0"
126 ;;
127 inventel,livebox-1|\
128 telsey,cpva502plus)
129 ucidef_set_interfaces_lan_wan "eth0" "eth1"
130 ;;
131 netgear,dgnd3700-v1)
132 ucidef_add_switch "switch0" \
133 "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "8t@eth0"
134 ;;
135 sercomm,ad1018-nor)
136 ucidef_add_switch "switch0" \
137 "1:lan:3" "2:lan:2" "3:lan:1" "0:wan" "8t@eth0"
138 ;;
139 sfr,neufbox-6-sercomm-r0)
140 ucidef_add_switch "switch0" \
141 "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0"
142 ;;
143 sky,sr102)
144 ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
145 ucidef_add_switch "switch0" \
146 "0:lan" "1:lan" "2:lan" "3:wan" "8t@eth0"
147 ;;
148 *)
149 ucidef_set_interfaces_lan_wan "eth1" "eth0"
150 ;;
151 esac
152
153 board_config_flush
154
155 exit 0