[PATCH] eth: fix 'warning: No MAC address set' when using EEPROM MAC
Baruch Siach
baruch at tkos.co.il
Wed Dec 15 03:04:36 EST 2010
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 at 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
More information about the barebox
mailing list