aboutsummaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2019-09-13 19:21:16 -0500
committerJoe Hershberger <joe.hershberger@ni.com>2019-12-09 09:47:41 -0600
commitfb8977c5be93f8e967df224fe0a44721d60e34dc (patch)
tree49a2f694f9ba5eee2302570311ec21b00bb659aa /net/net.c
parentb38c3a641fc01fcd4eda5fa107ae3c247baa0196 (diff)
downloadu-boot-fb8977c5be93f8e967df224fe0a44721d60e34dc.zip
u-boot-fb8977c5be93f8e967df224fe0a44721d60e34dc.tar.gz
u-boot-fb8977c5be93f8e967df224fe0a44721d60e34dc.tar.bz2
net: Always build the string_to_enetaddr() helper
Part of the env cleanup moved this out of the environment code and into the net code. However, this helper is sometimes needed even when the net stack isn't included. Move the helper to lib/net_utils.c like it's similarly-purposed string_to_ip(). Also rename the moved function to similar naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reported-by: Ondrej Jirman <megous@megous.com>
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/net/net.c b/net/net.c
index 0513444..284ae1b 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1625,15 +1625,3 @@ ushort env_get_vlan(char *var)
{
return string_to_vlan(env_get(var));
}
-
-void eth_parse_enetaddr(const char *addr, uint8_t *enetaddr)
-{
- char *end;
- int i;
-
- for (i = 0; i < 6; ++i) {
- enetaddr[i] = addr ? simple_strtoul(addr, &end, 16) : 0;
- if (addr)
- addr = (*end) ? end + 1 : end;
- }
-}