summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2010-12-15 10:04:36 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-12-16 08:30:14 +0100
commitfad11e85641d27f683e2866ec5700cafd5868179 (patch)
tree4671bef26e6e4ee44d9fc77b044788b698e6292b
parente987040bc914e0677e62600d2b510389632a2605 (diff)
downloadbarebox-fad11e85641d27f683e2866ec5700cafd5868179.tar.gz
eth: fix 'warning: No MAC address set' when using EEPROM MAC
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> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--net/eth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/eth.c b/net/eth.c
index cfb0fef..a82a263 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;
}