3724fd6d5c850b56ee6ec37d72cc2f15d5d18775
[openwrt/staging/wigyori.git] / target / linux / mediatek / mt7622 / base-files / etc / board.d / 02_network
1
2 . /lib/functions.sh
3 . /lib/functions/uci-defaults.sh
4 . /lib/functions/system.sh
5
6 mediatek_setup_interfaces()
7 {
8 local board="$1"
9
10 case $board in
11 bananapi,bpi-r64|\
12 linksys,e8450|\
13 linksys,e8450-ubi|\
14 mediatek,mt7622-rfb1)
15 ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
16 ;;
17 buffalo,wsr-2533dhp2)
18 ucidef_add_switch "switch0" \
19 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0"
20 ;;
21 ubnt,unifi-6-lr|\
22 ubnt,unifi-6-lr-ubootmod)
23 ucidef_set_interface_lan "eth0"
24 ;;
25 *)
26 ucidef_add_switch "switch0" \
27 "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6u@eth0" "5u@eth1"
28 ;;
29 esac
30 }
31
32 board_config_update
33 board=$(board_name)
34 mediatek_setup_interfaces $board
35 board_config_flush
36
37 exit 0