This fixes "Warning: failed to set MAC address" on platforms which rely on
an 'ethaddr' environment variable to set the MAC address.
This bug was introduced by this commit:
7616e785 Add Ethernet hardware MAC address framework to usbnet
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Kumar Gala <galak@kernel.crashing.org>
Tested-by: Michal Simek <monstr@monstr.eu>
Tested-by: Heiko Schocher <hs@denx.de>
if (strchr(dev->name, ' '))
puts("\nWarning: eth device name has a space!\n");
- if (eth_write_hwaddr(dev, NULL, eth_number))
+ if (eth_write_hwaddr(dev, "eth", eth_number))
puts("Warning: failed to set MAC address\n");
eth_number++;