diff options
author | Simon Glass <sjg@chromium.org> | 2016-01-17 14:51:58 -0700 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2016-01-28 12:32:46 -0600 |
commit | 9987ecdd36da79535c4229ecc5693533aaa8d17b (patch) | |
tree | eb71eb6e57b439f75f0bbb7b6e51c6df73869853 /net/eth_internal.h | |
parent | 818f91eb5778781083e33ce3291bba76a3f1601c (diff) | |
download | u-boot-9987ecdd36da79535c4229ecc5693533aaa8d17b.tar.gz |
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>
Diffstat (limited to 'net/eth_internal.h')
-rw-r--r-- | net/eth_internal.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/eth_internal.h b/net/eth_internal.h index e65d8984e8..38d84201e6 100644 --- a/net/eth_internal.h +++ b/net/eth_internal.h @@ -12,4 +12,20 @@ /* Do init that is common to driver model and legacy networking */ void eth_common_init(void); +/** + * eth_setenv_enetaddr_by_index() - set the MAC address envrionment variable + * + * This sets up an environment variable with the given MAC address (@enetaddr). + * The environment variable to be set is defined by <@base_name><@index>addr. + * If @index is 0 it is omitted. For common Ethernet this means ethaddr, + * eth1addr, etc. + * + * @base_name: Base name for variable, typically "eth" + * @index: Index of interface being updated (>=0) + * @enetaddr: Pointer to MAC address to put into the variable + * @return 0 if OK, other value on error + */ +int eth_setenv_enetaddr_by_index(const char *base_name, int index, + uchar *enetaddr); + #endif |