2549ff954e836905b24ff7ea2589050a4392036f
[openwrt/openwrt.git] / target / linux / mediatek / base-files / etc / board.d / 02_network
1 #!/bin/sh
2
3 . /lib/functions.sh
4 . /lib/mediatek.sh
5 . /lib/functions/uci-defaults.sh
6 . /lib/functions/system.sh
7
8 mediatek_setup_interfaces()
9 {
10 local board="$1"
11
12 case $board in
13 eMMC | \
14 NAND | \
15 mt7623_evb)
16 ucidef_set_interfaces_lan_wan "eth0.1" "eth1.2"
17 ucidef_add_switch "switch0" \
18 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" "5@eth1"
19 ;;
20 esac
21 }
22
23 board_config_update
24 board=$(mediatek_board_name)
25 mediatek_setup_interfaces $board
26 board_config_flush
27
28 exit 0