diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:11 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-16 08:23:56 -0400 |
commit | fd1e959e91d2b0b2e853d09dd9167dfff18a616c (patch) | |
tree | 1d59086cd330cd9c061521f9564edfb9d75e1dc9 /net | |
parent | 018f530323b2cc41be05be5b12375d3648f06554 (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.c | 2 | ||||
-rw-r--r-- | net/eth_common.c | 6 | ||||
-rw-r--r-- | net/eth_internal.h | 4 | ||||
-rw-r--r-- | net/eth_legacy.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/net/eth-uclass.c b/net/eth-uclass.c index b659961a5dd..d3565762100 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 ef97da72679..7b36532ee1b 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 a14b20844f8..4b0e716b732 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 e4bd0f4c1ac..2608302648f 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); |