diff options
author | Simon Glass <sjg@chromium.org> | 2019-08-01 18:46:53 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-08-11 23:43:41 +0300 |
commit | b79cf1af0d1cf175c4414ea1b8465747431d77cf (patch) | |
tree | 11c7b46f5b2781f552a909ed310530203b89ab44 | |
parent | 7b51b576d6db714e8668a98de67e93651e18123c (diff) | |
download | u-boot-b79cf1af0d1cf175c4414ea1b8465747431d77cf.tar.xz |
env: Move eth_env_get/set_enetaddr() to env.h
Move these two functions over to the new header file.
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | include/env.h | 18 | ||||
-rw-r--r-- | include/environment.h | 2 |
2 files changed, 18 insertions, 2 deletions
diff --git a/include/env.h b/include/env.h index 297fd7a071..2e9a850284 100644 --- a/include/env.h +++ b/include/env.h @@ -164,4 +164,22 @@ static inline int env_set_addr(const char *varname, const void *addr) int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf, bool dollar_comp); +/** + * eth_env_get_enetaddr() - Get an ethernet address from the environmnet + * + * @name: Environment variable to get (e.g. "ethaddr") + * @enetaddr: Place to put MAC address (6 bytes) + * @return 0 if OK, 1 on error + */ +int eth_env_get_enetaddr(const char *name, uint8_t *enetaddr); + +/** + * eth_env_set_enetaddr() - Set an ethernet address in the environmnet + * + * @name: Environment variable to set (e.g. "ethaddr") + * @enetaddr: Pointer to MAC address to put into the variable (6 bytes) + * @return 0 if OK, 1 on error + */ +int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr); + #endif diff --git a/include/environment.h b/include/environment.h index de67cf4f0e..77915f459e 100644 --- a/include/environment.h +++ b/include/environment.h @@ -326,8 +326,6 @@ int env_erase(void); void env_fix_drivers(void); void eth_parse_enetaddr(const char *addr, uint8_t *enetaddr); -int eth_env_get_enetaddr(const char *name, uint8_t *enetaddr); -int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr); #endif /* DO_DEPS_ONLY */ |