When there's no ethernet address available, u-boot currently prints
"could not set ethernet address", but fails to mention that there's no
address it could set. Make it a bit less confusing.

Signed-off-by: Pavel Machek <[email protected]>

diff --git a/net/eth.c b/net/eth.c
index 99386e3..b72ae84 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -179,10 +179,12 @@ int eth_write_hwaddr(struct eth_device *dev, const char 
*base_name,
                        dev->name);
        }
 
-       if (dev->write_hwaddr &&
-                       !eth_mac_skip(eth_number)) {
-               if (!is_valid_ether_addr(dev->enetaddr))
+       if (dev->write_hwaddr && !eth_mac_skip(eth_number)) {
+               if (!is_valid_ether_addr(dev->enetaddr)) {
+                       printf("\nError: %s ethernet address not valid: %pM\n",
+                                dev->name, dev->enetaddr);
                        return -1;
+               }
 
                ret = dev->write_hwaddr(dev);
        }

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to