summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-03 12:22:11 -0600
committerTom Rini <trini@konsulko.com>2017-08-16 08:23:56 -0400
commitfd1e959e91d2b0b2e853d09dd9167dfff18a616c (patch)
tree1d59086cd330cd9c061521f9564edfb9d75e1dc9 /net
parent018f530323b2cc41be05be5b12375d3648f06554 (diff)
env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()
Rename this function for consistency with env_set(). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net')
-rw-r--r--net/eth-uclass.c2
-rw-r--r--net/eth_common.c6
-rw-r--r--net/eth_internal.h4
-rw-r--r--net/eth_legacy.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index b659961a5d..d356576210 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -510,7 +510,7 @@ static int eth_post_probe(struct udevice *dev)
/* Override the ROM MAC address */
memcpy(pdata->enetaddr, env_enetaddr, ARP_HLEN);
} else if (is_valid_ethaddr(pdata->enetaddr)) {
- eth_setenv_enetaddr_by_index("eth", dev->seq, pdata->enetaddr);
+ eth_env_set_enetaddr_by_index("eth", dev->seq, pdata->enetaddr);
printf("\nWarning: %s using MAC address from ROM\n",
dev->name);
} else if (is_zero_ethaddr(pdata->enetaddr) ||
diff --git a/net/eth_common.c b/net/eth_common.c
index ef97da7267..7b36532ee1 100644
--- a/net/eth_common.c
+++ b/net/eth_common.c
@@ -30,7 +30,7 @@ int eth_getenv_enetaddr(const char *name, uchar *enetaddr)
return is_valid_ethaddr(enetaddr);
}
-int eth_setenv_enetaddr(const char *name, const uchar *enetaddr)
+int eth_env_set_enetaddr(const char *name, const uchar *enetaddr)
{
char buf[ARP_HLEN_ASCII + 1];
@@ -50,12 +50,12 @@ int eth_getenv_enetaddr_by_index(const char *base_name, int index,
return eth_getenv_enetaddr(enetvar, enetaddr);
}
-int eth_setenv_enetaddr_by_index(const char *base_name, int index,
+int eth_env_set_enetaddr_by_index(const char *base_name, int index,
uchar *enetaddr)
{
char enetvar[32];
sprintf(enetvar, index ? "%s%daddr" : "%saddr", base_name, index);
- return eth_setenv_enetaddr(enetvar, enetaddr);
+ return eth_env_set_enetaddr(enetvar, enetaddr);
}
void eth_common_init(void)
diff --git a/net/eth_internal.h b/net/eth_internal.h
index a14b20844f..4b0e716b73 100644
--- a/net/eth_internal.h
+++ b/net/eth_internal.h
@@ -13,7 +13,7 @@
void eth_common_init(void);
/**
- * eth_setenv_enetaddr_by_index() - set the MAC address environment variable
+ * eth_env_set_enetaddr_by_index() - set the MAC address environment 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.
@@ -25,7 +25,7 @@ void eth_common_init(void);
* @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,
+int eth_env_set_enetaddr_by_index(const char *base_name, int index,
uchar *enetaddr);
int eth_mac_skip(int index);
diff --git a/net/eth_legacy.c b/net/eth_legacy.c
index e4bd0f4c1a..2608302648 100644
--- a/net/eth_legacy.c
+++ b/net/eth_legacy.c
@@ -152,8 +152,8 @@ int eth_write_hwaddr(struct eth_device *dev, const char *base_name,
memcpy(dev->enetaddr, env_enetaddr, ARP_HLEN);
} else if (is_valid_ethaddr(dev->enetaddr)) {
- eth_setenv_enetaddr_by_index(base_name, eth_number,
- dev->enetaddr);
+ eth_env_set_enetaddr_by_index(base_name, eth_number,
+ dev->enetaddr);
} else if (is_zero_ethaddr(dev->enetaddr)) {
#ifdef CONFIG_NET_RANDOM_ETHADDR
net_random_ethaddr(dev->enetaddr);