summaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
blob: f537ccdb80af210f35b9d82cf6e97ffb2a00bc5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

. /lib/functions.sh
. /lib/functions/uci-defaults.sh
. /lib/functions/system.sh

mediatek_setup_interfaces()
{
	local board="$1"

	case $board in
	bananapi,bpi-r64|\
	linksys,e8450|\
	linksys,e8450-ubi|\
	mediatek,mt7622-rfb1)
		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
		;;
	ubnt,unifi-6-lr)
		ucidef_set_interfaces_lan "eth0"
		;;
	*)
		ucidef_add_switch "switch0" \
				  "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6u@eth0" "5u@eth1"
		;;
	esac
}

board_config_update
board=$(board_name)
mediatek_setup_interfaces $board
board_config_flush

exit 0