mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] eth: fix 'warning: No MAC address set' when using EEPROM MAC
@ 2010-12-15  8:04 Baruch Siach
  0 siblings, 0 replies; only message in thread
From: Baruch Siach @ 2010-12-15  8:04 UTC (permalink / raw)
  To: barebox

When retrieving the MAC address from EEPROM, we must notify the networking core
at eth registration time. Otherwise we get the 'No MAC address set' warning on
the first network access, and the MAC address is set to a random value instead
of the real one.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 net/eth.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/eth.c b/net/eth.c
index 4d58191..dafd392 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -168,8 +168,10 @@ int eth_register(struct eth_device *edev)
 		dev_set_param(dev, "ethaddr", ethaddr_str);
 	}
 
-	if (!eth_current)
+	if (!eth_current) {
 		eth_current = edev;
+		net_update_env();
+	}
 
 	return 0;
 }
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-12-15  8:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-15  8:04 [PATCH] eth: fix 'warning: No MAC address set' when using EEPROM MAC Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox