ucidef_set_interface_lan "$lan_list"
lan_mac=""
+lan_mac_end=""
label_mac=""
case $board in
*)
- lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
- label_mac=$lan_mac
+ lan_mac=$(mtd_get_mac_ascii u-boot-env2 mac_start)
+ lan_mac_end=$(mtd_get_mac_ascii u-boot-env2 mac_end)
+ label_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
+ [ -z "$lan_mac" ] && lan_mac=$label_mac
;;
esac
ucidef_set_network_device_mac eth0 $lan_mac
for lan in $lan_list; do
ucidef_set_network_device_mac $lan $lan_mac
- lan_mac=$(macaddr_setbit_la $lan_mac)
+ [ -z "$lan_mac_end" ] || [ "$lan_mac" == "$lan_mac_end" ] && lan_mac=$(macaddr_setbit_la $lan_mac)
lan_mac=$(macaddr_add $lan_mac 1)
done
[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac