sunxi: nanopi r1s h5: read mac address from eeprom

NanoPi R1S H5 has a unique MAC address for the ethernet on board. As
the USB NIC doesn't have, just reuse this MAC and flipp the LA bit for it.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2021-06-11 15:50:53 +08:00
parent afd4f84321
commit a8aa2f0593
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -47,7 +47,8 @@ sunxi_setup_macs()
case "$board" in
friendlyarm,nanopi-r1s-h5)
lan_mac=$(nanopi_generate_mac)
wan_mac=$(get_mac_binary "/sys/bus/i2c/devices/0-0051/eeprom" 0xfa)
lan_mac=$(macaddr_setbit_la "$wan_mac")
;;
esac