mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00

* bump qca-nss-dp and ssdk ssdk-shell to 12.1 * [qca-ssdk] delete 0008 patch as 12.1 version do not need this * [ipq807x]: Add support for tplink-tl-er2260t(basic) * remove unused parts in 2260t.dts * NSS:bump nss-drv64 to 12.1r2 (may affect ipq806x) * fix nss-dp source_url * qca-ssdk: refresh ssdk patch
63 lines
1.3 KiB
Plaintext
63 lines
1.3 KiB
Plaintext
#
|
|
# 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
|
|
qnap,301w)
|
|
ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3 eth4" "eth5"
|
|
;;
|
|
redmi,ax6|\
|
|
xiaomi,ax3600)
|
|
ucidef_set_interfaces_lan_wan "eth1 eth2 eth3" "eth0"
|
|
;;
|
|
zte,mf269)
|
|
ucidef_set_interfaces_lan_wan "eth0" "eth1"
|
|
;;
|
|
tplink,tl-er2260t)
|
|
ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3 eth5" "eth4"
|
|
;;
|
|
tplink,xtr10890)
|
|
ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3 eth4" "eth5"
|
|
;;
|
|
*)
|
|
echo "Unsupported hardware. Network interfaces not initialized"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
ipq807x_setup_macs()
|
|
{
|
|
local board="$1"
|
|
local lan_mac=""
|
|
local wan_mac=""
|
|
local label_mac=""
|
|
|
|
case "$board" in
|
|
zte,mf269)
|
|
wan_mac=$(mtd_get_mac_binary mac 0x0)
|
|
lan_mac=$(macaddr_add "$wan_mac" 1)
|
|
label_mac=$wan_mac
|
|
;;
|
|
esac
|
|
|
|
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
|
|
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
|
|
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
|
|
}
|
|
|
|
board_config_update
|
|
board=$(board_name)
|
|
ipq807x_setup_interfaces $board
|
|
ipq807x_setup_macs $board
|
|
board_config_flush
|
|
|
|
exit 0
|