Skip to content
Snippets Groups Projects
Commit b63d4f34 authored by Holger Brunck's avatar Holger Brunck Committed by Tom Rini
Browse files

km/ivm: always set ethaddr after reading IVM


If we rebrand the IVM and ethaddr was set previously we need to change
ethaddr. Otherwise we end up with a wrong MAC adress for the ethernet
interface.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: default avatarHolger Brunck <holger.brunck@keymile.com>
parent 6821a745
No related branches found
No related tags found
No related merge requests found
......@@ -302,14 +302,11 @@ static int ivm_populate_env(unsigned char *buf, int len)
/* if an offset is defined, add it */
process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADRESS_OFFSET);
if (getenv("ethaddr") == NULL)
setenv((char *)"ethaddr", (char *)valbuf);
setenv((char *)"ethaddr", (char *)valbuf);
#ifdef CONFIG_KMVECT1
/* KMVECT1 has two ethernet interfaces */
if (getenv("eth1addr") == NULL) {
process_mac(valbuf, page2, 1);
setenv((char *)"eth1addr", (char *)valbuf);
}
process_mac(valbuf, page2, 1);
setenv((char *)"eth1addr", (char *)valbuf);
#endif
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment