Correct call to eth_write_hwaddr()
authorSimon Glass <sjg@chromium.org>
Tue, 30 Aug 2011 05:51:00 +0000 (05:51 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 5 Sep 2011 14:06:06 +0000 (16:06 +0200)
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>
net/eth.c

index c9b7e85e392ef18290156bba6da59c568ddcd80d..dbd1e2dbae6dc264455ee3683abce39f78ec9e58 100644 (file)
--- a/net/eth.c
+++ b/net/eth.c
@@ -304,7 +304,7 @@ int eth_initialize(bd_t *bis)
                        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++;