Commit Graph

5 Commits

Author SHA1 Message Date
Roger Quadros ee6fdfadaa net: don't override ethernet address environment
If the ethernet address environment is set with a valid
ethernet address prevent overriding it as it is most likely
set by the user and he/she doesn't want board code to
automatically override it whatsoever.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-20 17:57:16 -04:00
oliver@schinagl.nl 9f455bcb34 net: cosmetic: Make the MAC address string less magical
In u-boot printf has been extended with the %pM formatter to allow
printing of MAC addresses. However buffers that want to store a MAC
address cannot safely get the size. Add a define for this case so the
string of a MAC address can be reliably obtained.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-02-07 10:54:32 -06:00
Simon Glass 8607a6bf75 net: Move remaining common functions to eth_common.c
Move eth_current_changed(), eth_set_current(), eth_mac_skip() and
eth_get_name() into the common file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-01-28 12:32:46 -06:00
Simon Glass 9987ecdd36 net: Move environment functions to the common file
Move the functions which set ethernet environment variables to the common
file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-01-28 12:32:46 -06:00
Simon Glass 818f91eb57 net: Move common init into a new eth_common.c file
Only half of the init is actually common. Move that part into a new common
file and call it from driver-model and legacy code. More common functions
will be added in future patches.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-01-28 12:32:45 -06:00