summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4f47ace)
raw | patch | inline | side by side (parent: 4f47ace)
author | Holger Hans Peter Freyther <holger@freyther.de> | |
Thu, 7 Feb 2013 23:41:03 +0000 (23:41 +0000) | ||
committer | Tom Rini <trini@ti.com> | |
Wed, 20 Feb 2013 13:52:41 +0000 (08:52 -0500) |
The issue got introduced in a cleanup by Manjunath Hadli in commit
826e99136e2bce61f3f6572e32d7aa724c116e6d. The eth_getenv_enetaddr_by_index
method will validate the MAC addr and if none is set in the environment
0 will be returned. Set the MAC from the eeprom if no valid address
is found in environment.
Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>
826e99136e2bce61f3f6572e32d7aa724c116e6d. The eth_getenv_enetaddr_by_index
method will validate the MAC addr and if none is set in the environment
0 will be returned. Set the MAC from the eeprom if no valid address
is found in environment.
Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>
arch/arm/cpu/arm926ejs/davinci/misc.c | patch | blob | history |
index c310c69ad4118a215dda8e3a205797bef65c269f..162c1e0ff4a08cf84e26e78310991c8596c4d318 100644 (file)
int ret;
ret = eth_getenv_enetaddr_by_index("eth", 0, env_enetaddr);
- if (ret) {
+ if (!ret) {
/*
* There is no MAC address in the environment, so we
* initialize it from the value in the EEPROM.
ret = !eth_setenv_enetaddr("ethaddr", rom_enetaddr);
}
if (!ret)
- printf("Failed to set mac address from EEPROM\n");
+ printf("Failed to set mac address from EEPROM: %d\n", ret);
}
#endif /* CONFIG_DRIVER_TI_EMAC */