Skip to content

Commit 2710848

Browse files
jackcybertanblogic
authored andcommitted
ipq8074/rap630e: Fix the LAN and WAN MAC addresses
Fixes: WIFI-15286 Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
1 parent b0918f5 commit 2710848

File tree

1 file changed

+6
-3
lines changed
  • feeds/ipq807x_v5.4/ipq50xx/base-files/etc/board.d

1 file changed

+6
-3
lines changed

feeds/ipq807x_v5.4/ipq50xx/base-files/etc/board.d/02_network

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,13 @@ qcom_setup_macs()
121121
lan_mac=$(macaddr_add "$wan_mac" 2)
122122
;;
123123
sonicfi,rap630e)
124-
mac=$(fw_printenv -n BaseMacAddress)
124+
mtd=$(find_mtd_chardev "0:APPSBLENV")
125+
[ -z "$mtd" ] && return;
126+
mac=$(grep BaseMacAddress= $mtd | cut -d '=' -f2)
127+
125128
[ -z "$mac" ] && return;
126-
lan_mac=$(macaddr_canonicalize $mac)
127-
wan_mac=$(macaddr_add "$wan_mac" 1)
129+
wan_mac=$(macaddr_canonicalize $mac)
130+
lan_mac=$(macaddr_add "$wan_mac" 1)
128131
ucidef_set_network_device_mac eth1 $wan_mac
129132
ucidef_set_network_device_mac eth0 $lan_mac
130133
ip link set eth1 address $wan_mac

0 commit comments

Comments
 (0)