ipq8074/rap630e: Fix the LAN and WAN MAC addresses

Fixes: WIFI-15286
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
This commit is contained in:
jackcybertan
2025-12-17 03:25:27 +00:00
committed by John Crispin
parent b0918f55be
commit 2710848a63

View File

@@ -121,10 +121,13 @@ qcom_setup_macs()
lan_mac=$(macaddr_add "$wan_mac" 2)
;;
sonicfi,rap630e)
mac=$(fw_printenv -n BaseMacAddress)
mtd=$(find_mtd_chardev "0:APPSBLENV")
[ -z "$mtd" ] && return;
mac=$(grep BaseMacAddress= $mtd | cut -d '=' -f2)
[ -z "$mac" ] && return;
lan_mac=$(macaddr_canonicalize $mac)
wan_mac=$(macaddr_add "$wan_mac" 1)
wan_mac=$(macaddr_canonicalize $mac)
lan_mac=$(macaddr_add "$wan_mac" 1)
ucidef_set_network_device_mac eth1 $wan_mac
ucidef_set_network_device_mac eth0 $lan_mac
ip link set eth1 address $wan_mac