base-files: add additional uci-defaults function for GRO and conduit
[openwrt/openwrt.git] / target / linux / ipq806x / base-files / etc / init.d / qca8k_set_port
1 #!/bin/sh /etc/rc.common
2
3 START=15
4
5 set_qca8k_port() {
6 local port=$1
7 local master=$2
8
9 ip link set $port type dsa conduit $master
10 }
11
12 boot() {
13 # Restore original implementation where the eth1 (port 6) was used
14 # for the lan port and the eth0 (port 0) was used for the wan port
15 case $(board_name) in
16 askey,rt4230w-rev6 |\
17 asrock,g10 |\
18 buffalo,wxr-2533dhp |\
19 compex,wpq864 |\
20 nec,wg2600hp |\
21 nec,wg2600hp3 |\
22 netgear,d7800 |\
23 netgear,r7500 |\
24 netgear,r7500v2 |\
25 netgear,r7800 |\
26 netgear,xr450 |\
27 netgear,xr500 |\
28 nokia,ac400i |\
29 tplink,ad7200 |\
30 tplink,c2600 |\
31 tplink,vr2600v |\
32 zyxel,nbg6817)
33 set_qca8k_port lan1 eth1
34 set_qca8k_port lan2 eth1
35 set_qca8k_port lan3 eth1
36 set_qca8k_port lan4 eth1
37 set_qca8k_port wan eth0
38 ;;
39 asus,onhub |\
40 tplink,onhub)
41 set_qca8k_port lan1 eth1
42 set_qca8k_port wan eth0
43 ;;
44 esac
45 }