net: Implement random ethaddr fallback in eth.c

Implement the random ethaddr fallback in eth.c so it is in a common
place and not reimplemented in each board or driver that wants this
behavior.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Joe Hershberger
2015-05-04 14:55:13 -05:00
parent abbfcbe58e
commit bef1014b31
4 changed files with 24 additions and 1 deletions

3
README
View File

@@ -5623,7 +5623,8 @@ o If both the SROM and the environment contain a MAC address, and the
warning is printed.
o If neither SROM nor the environment contain a MAC address, an error
is raised.
is raised. If CONFIG_NET_RANDOM_ETHADDR is defined, then in this case
a random, locally-assigned MAC is used.
If Ethernet drivers implement the 'write_hwaddr' function, valid MAC addresses
will be programmed into hardware as part of the initialization process. This