# # Copyright (c) 2015 The Linux Foundation. All rights reserved. # Copyright (c) 2011-2015 OpenWrt.org # . /lib/functions/uci-defaults.sh . /lib/functions/system.sh ipq807x_setup_interfaces() { local board="$1" case "$board" in redmi,ax6|\ xiaomi,ax3600) ucidef_set_interfaces_lan_wan "eth1 eth2 eth3" "eth0" ;; zte,mf269) ucidef_set_interfaces_lan_wan "eth0" "eth1" hw_mac_addr=$(mtd_get_mac_binary "mac" 0x0) ucidef_set_interface_macaddr "wan" "$hw_mac_addr" ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 1)" ;; *) echo "Unsupported hardware. Network interfaces not initialized" ;; esac } board_config_update board=$(board_name) ipq807x_setup_interfaces $board board_config_flush exit 0