mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
omap2: set the ethaddr as well as the usbethaddr env var to ensure static MAC
The kernel gets the ethernet MAC from the ethaddr variable, the omap boards for devices with USB based eth adapters just set the usbethaddr which doesn't appear to get passed to the kernel. The same Raspberry Pi code sets both ethaddr and usbethaddr so lets do that so linux (tested 4.13 and 4.14) get a static rather than a random MAC address, while not regressing users of usbethaddr. Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
This commit is contained in:
parent
0290700429
commit
b59670f2bd
1 changed files with 3 additions and 0 deletions
|
@ -215,6 +215,9 @@ void omap_die_id_usbethaddr(void)
|
|||
mac[5] = (die_id[0] >> 8) & 0xff;
|
||||
|
||||
eth_env_set_enetaddr("usbethaddr", mac);
|
||||
|
||||
if (!env_get("ethaddr"))
|
||||
eth_env_set_enetaddr("ethaddr", mac);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue