9
0
Fork 0

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>
This commit is contained in:
Baruch Siach 2010-12-15 10:04:36 +02:00 committed by Sascha Hauer
parent e987040bc9
commit fad11e8564
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}