mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 21:51:31 +00:00
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: Holger Brunck <holger.brunck@keymile.com>
This commit is contained in:
parent
6821a7457c
commit
b63d4f34d0
1 changed files with 3 additions and 6 deletions
|
@ -302,14 +302,11 @@ static int ivm_populate_env(unsigned char *buf, int len)
|
||||||
|
|
||||||
/* if an offset is defined, add it */
|
/* if an offset is defined, add it */
|
||||||
process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADRESS_OFFSET);
|
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
|
#ifdef CONFIG_KMVECT1
|
||||||
/* KMVECT1 has two ethernet interfaces */
|
/* KMVECT1 has two ethernet interfaces */
|
||||||
if (getenv("eth1addr") == NULL) {
|
|
||||||
process_mac(valbuf, page2, 1);
|
process_mac(valbuf, page2, 1);
|
||||||
setenv((char *)"eth1addr", (char *)valbuf);
|
setenv((char *)"eth1addr", (char *)valbuf);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue