summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-04-08 01:41:04 -0500
committerSimon Glass <sjg@chromium.org>2015-04-18 11:11:32 -0600
commit0adb5b761f4c789ae47d8abb015f5e017263d3f2 (patch)
tree84f951f300ae9d8d0a48c9ab14f11c9c1ecef477 /board
parent586cbe51ab8ef357bcf3a52c6885ab00bc7293dd (diff)
downloadu-boot-0adb5b761f4c789ae47d8abb015f5e017263d3f2.tar.gz
u-boot-0adb5b761f4c789ae47d8abb015f5e017263d3f2.tar.xz
u-boot-0adb5b761f4c789ae47d8abb015f5e017263d3f2.zip
net: cosmetic: Name ethaddr variables consistently
Use "_ethaddr" at the end of variables and drop CamelCase. Make constant values actually 'const'. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/BuR/common/common.c4
-rw-r--r--board/ait/cam_enc_4xx/cam_enc_4xx.c2
-rw-r--r--board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c2
-rw-r--r--board/bct-brettl2/bct-brettl2.c2
-rw-r--r--board/bf518f-ezbrd/bf518f-ezbrd.c4
-rw-r--r--board/bf526-ezbrd/bf526-ezbrd.c4
-rw-r--r--board/bf527-ezkit/bf527-ezkit.c4
-rw-r--r--board/bf537-minotaur/bf537-minotaur.c2
-rw-r--r--board/bf537-pnav/bf537-pnav.c2
-rw-r--r--board/bf537-srv1/bf537-srv1.c2
-rw-r--r--board/bf537-stamp/bf537-stamp.c4
-rw-r--r--board/birdland/bav335x/board.c4
-rw-r--r--board/buffalo/lsxl/lsxl.c2
-rw-r--r--board/cm-bf527/cm-bf527.c4
-rw-r--r--board/cm-bf537e/cm-bf537e.c2
-rw-r--r--board/cm-bf537u/cm-bf537u.c2
-rw-r--r--board/compulab/cm_fx6/cm_fx6.c2
-rw-r--r--board/compulab/cm_t335/cm_t335.c2
-rw-r--r--board/compulab/cm_t35/cm_t35.c2
-rw-r--r--board/compulab/cm_t3517/cm_t3517.c4
-rw-r--r--board/compulab/cm_t54/cm_t54.c4
-rw-r--r--board/davinci/da8xxevm/da850evm.c6
-rw-r--r--board/dnp5370/dnp5370.c4
-rw-r--r--board/gumstix/pepper/board.c2
-rw-r--r--board/ifm/ac14xx/ac14xx.c2
-rw-r--r--board/ip04/ip04.c2
-rw-r--r--board/isee/igep0033/board.c2
-rw-r--r--board/phytec/pcm051/board.c2
-rw-r--r--board/renesas/r0p7734/r0p7734.c2
-rw-r--r--board/siemens/common/factoryset.c4
-rw-r--r--board/siemens/pxm2/board.c2
-rw-r--r--board/silica/pengwyn/board.c2
-rw-r--r--board/tcm-bf518/tcm-bf518.c4
-rw-r--r--board/tcm-bf537/tcm-bf537.c2
-rw-r--r--board/ti/am335x/board.c6
-rw-r--r--board/ti/am43xx/board.c4
-rw-r--r--board/ti/beagle_x15/board.c4
-rw-r--r--board/ti/dra7xx/evm.c4
-rw-r--r--board/ti/ti814x/evm.c2
39 files changed, 58 insertions, 58 deletions
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index ccaa9c6845..13f23fd7ce 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -216,7 +216,7 @@ static const char *dtbmacaddr(u32 ifno)
node = fdt_path_offset((void *)dtbaddr, path);
mac = fdt_getprop((void *)dtbaddr, node, "mac-address", &len);
- if (mac && is_valid_ether_addr((u8 *)mac))
+ if (mac && is_valid_ethaddr((u8 *)mac))
return mac;
return NULL;
@@ -595,7 +595,7 @@ int board_eth_init(bd_t *bis)
#endif
if (!mac) {
printf("<ethaddr> not set. validating E-fuse MAC ... ");
- if (is_valid_ether_addr((const u8 *)mac_addr))
+ if (is_valid_ethaddr((const u8 *)mac_addr))
mac = (const char *)mac_addr;
}
diff --git a/board/ait/cam_enc_4xx/cam_enc_4xx.c b/board/ait/cam_enc_4xx/cam_enc_4xx.c
index 290dc1984a..c5687bab7d 100644
--- a/board/ait/cam_enc_4xx/cam_enc_4xx.c
+++ b/board/ait/cam_enc_4xx/cam_enc_4xx.c
@@ -70,7 +70,7 @@ static int cam_enc_4xx_check_network(void)
if (!s)
return -EINVAL;
- if (!is_valid_ether_addr((const u8 *)s))
+ if (!is_valid_ethaddr((const u8 *)s))
return -EINVAL;
s = getenv("ipaddr");
diff --git a/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c b/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c
index b81a68d63d..e65befc3ba 100644
--- a/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c
+++ b/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c
@@ -167,7 +167,7 @@ int board_late_init(void)
/* Read MAC address */
i2c_read(0x50, 0x0, 0, mac, 6);
- if (is_valid_ether_addr(mac))
+ if (is_valid_ethaddr(mac))
eth_setenv_enetaddr("ethaddr", mac);
return 0;
diff --git a/board/bct-brettl2/bct-brettl2.c b/board/bct-brettl2/bct-brettl2.c
index 6be9b18015..1f0dfb4d40 100644
--- a/board/bct-brettl2/bct-brettl2.c
+++ b/board/bct-brettl2/bct-brettl2.c
@@ -32,7 +32,7 @@ int checkboard(void)
static void board_init_enetaddr(uchar *mac_addr)
{
puts("Warning: Generating 'random' MAC address\n");
- eth_random_addr(mac_addr);
+ net_random_ethaddr(mac_addr);
eth_setenv_enetaddr("ethaddr", mac_addr);
}
diff --git a/board/bf518f-ezbrd/bf518f-ezbrd.c b/board/bf518f-ezbrd/bf518f-ezbrd.c
index 3a94a572eb..8ecfbb28c9 100644
--- a/board/bf518f-ezbrd/bf518f-ezbrd.c
+++ b/board/bf518f-ezbrd/bf518f-ezbrd.c
@@ -39,7 +39,7 @@ static void board_init_enetaddr(uchar *mac_addr)
if (USE_MAC_IN_FLASH) {
/* we cram the MAC in the last flash sector */
uchar *board_mac_addr = (uchar *)0x203F0096;
- if (is_valid_ether_addr(board_mac_addr)) {
+ if (is_valid_ethaddr(board_mac_addr)) {
memcpy(mac_addr, board_mac_addr, 6);
valid_mac = true;
}
@@ -47,7 +47,7 @@ static void board_init_enetaddr(uchar *mac_addr)
if (!valid_mac) {
puts("Warning: Generating 'random' MAC address\n");
- eth_random_addr(mac_addr);
+ net_random_ethaddr(mac_addr);
}
eth_setenv_enetaddr("ethaddr", mac_addr);
diff --git a/board/bf526-ezbrd/bf526-ezbrd.c b/board/bf526-ezbrd/bf526-ezbrd.c
index 368d6be25f..0a88491e90 100644
--- a/board/bf526-ezbrd/bf526-ezbrd.c
+++ b/board/bf526-ezbrd/bf526-ezbrd.c
@@ -36,7 +36,7 @@ static void board_init_enetaddr(uchar *mac_addr)
if (USE_MAC_IN_FLASH) {
/* we cram the MAC in the last flash sector */
uchar *board_mac_addr = (uchar *)0x203F0096;
- if (is_valid_ether_addr(board_mac_addr)) {
+ if (is_valid_ethaddr(board_mac_addr)) {
memcpy(mac_addr, board_mac_addr, 6);
valid_mac = true;
}
@@ -44,7 +44,7 @@ static void board_init_enetaddr(uchar *mac_addr)
if (!valid_mac) {
puts("Warning: Generating 'random' MAC address\n");
- eth_random_addr(mac_addr);
+ net_random_ethaddr(mac_addr);
}
eth_setenv_enetaddr("ethaddr", mac_addr);
diff --git a/board/bf527-ezkit/bf527-ezkit.c b/board/bf527-ezkit/bf527-ezkit.c
index 88e18690e0..257775f3c8 100644
--- a/board/bf527-ezkit/bf527-ezkit.c
+++ b/board/bf527-ezkit/bf527-ezkit.c
@@ -40,13 +40,13 @@ static void board_init_enetaddr(uchar *mac_addr)
for (ret = 0; ret < 6; ++ret)
mac_addr[ret] = otp_mac_p[5 - ret];
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
valid_mac = true;
}
if (!valid_mac) {
puts("Warning: Generating 'random' MAC address\n");
- eth_random_addr(mac_addr);
+ net_random_ethaddr(mac_addr);
}
eth_setenv_enetaddr("ethaddr", mac_addr);
diff --git a/board/bf537-minotaur/bf537-minotaur.c b/board/bf537-minotaur/bf537-minotaur.c
index ca61ef97b8..71b4293ad6 100644
--- a/board/bf537-minotaur/bf537-minotaur.c
+++ b/board/bf537-minotaur/bf537-minotaur.c
@@ -26,7 +26,7 @@ int checkboard(void)
static void board_init_enetaddr(uchar *mac_addr)
{
puts("Warning: Generating 'random' MAC address\n");
- eth_random_addr(mac_addr);
+ net_random_ethaddr(mac_addr);
eth_setenv_enetaddr("ethaddr", mac_addr);
}
diff --git a/board/bf537-pnav/bf537-pnav.c b/board/bf537-pnav/bf537-pnav.c
index df0011026a..93522df56c 100644
--- a/board/bf537-pnav/bf537-pnav.c
+++ b/board/bf537-pnav/bf537-pnav.c
@@ -26,7 +26,7 @@ int checkboard(void)
static void board_init_enetaddr(uchar *mac_addr)
{
puts("Warning: Generating 'random' MAC address\n");
- eth_random_addr(mac_addr);
+ net_random_ethaddr(mac_addr);
eth_setenv_enetaddr("ethaddr", mac_addr);
}
diff --git a/board/bf537-srv1/bf537-srv1.c b/board/bf537-srv1/bf537-srv1.c
index 725296a416..6581028294 100644
--- a/board/bf537-srv1/bf537-srv1.c
+++ b/board/bf537-srv1/bf537-srv1.c
@@ -26,7 +26,7 @@ int checkboard(void)
static void board_init_enetaddr(uchar *mac_addr)
{
puts("Warning: Generating 'random' MAC address\n");
- eth_random_addr(mac_addr);
+ net_random_ethaddr(mac_addr);
eth_setenv_enetaddr("ethaddr", mac_addr);
}
diff --git a/board/bf537-stamp/bf537-stamp.c b/board/bf537-stamp/bf537-stamp.c
index 32045a9e47..66e54925da 100644
--- a/board/bf537-stamp/bf537-stamp.c
+++ b/board/bf537-stamp/bf537-stamp.c
@@ -39,7 +39,7 @@ static void board_init_enetaddr(uchar *mac_addr)
if (USE_MAC_IN_FLASH) {
/* we cram the MAC in the last flash sector */
uchar *board_mac_addr = (uchar *)0x203F0000;
- if (is_valid_ether_addr(board_mac_addr)) {
+ if (is_valid_ethaddr(board_mac_addr)) {
memcpy(mac_addr, board_mac_addr, 6);
valid_mac = true;
}
@@ -47,7 +47,7 @@ static void board_init_enetaddr(uchar *mac_addr)
if (!valid_mac) {
puts("Warning: Generating 'random' MAC address\n");
- eth_random_addr(mac_addr);
+ net_random_ethaddr(mac_addr);
}
eth_setenv_enetaddr("ethaddr", mac_addr);
diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c
index d1e1c8cbd3..32ff7a4f9e 100644
--- a/board/birdland/bav335x/board.c
+++ b/board/birdland/bav335x/board.c
@@ -384,7 +384,7 @@ int board_eth_init(bd_t *bis)
ecode = read_eeprom(&header);
/* if we have a valid EE, get mac address from there */
if ((ecode == 0) &&
- is_valid_ether_addr((const u8 *)&header.mac_addr[0][0])) {
+ is_valid_ethaddr((const u8 *)&header.mac_addr[0][0])) {
memcpy(mac_addr, (const void *)&header.mac_addr[0][0], 6);
}
@@ -395,7 +395,7 @@ int board_eth_init(bd_t *bis)
if (!getenv("ethaddr")) {
printf("<ethaddr> not set. Validating first E-fuse MAC\n");
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("ethaddr", mac_addr);
}
diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c
index b0d49c4ee6..487875c23a 100644
--- a/board/buffalo/lsxl/lsxl.c
+++ b/board/buffalo/lsxl/lsxl.c
@@ -232,7 +232,7 @@ static void rescue_mode(void)
printf("Entering rescue mode..\n");
#ifdef CONFIG_RANDOM_MACADDR
if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
- eth_random_addr(enetaddr);
+ net_random_ethaddr(enetaddr);
if (eth_setenv_enetaddr("ethaddr", enetaddr)) {
printf("Failed to set ethernet address\n");
set_led(LED_ALARM_BLINKING);
diff --git a/board/cm-bf527/cm-bf527.c b/board/cm-bf527/cm-bf527.c
index 1533eb9c7a..2871fa2d6a 100644
--- a/board/cm-bf527/cm-bf527.c
+++ b/board/cm-bf527/cm-bf527.c
@@ -39,13 +39,13 @@ static void board_init_enetaddr(uchar *mac_addr)
for (ret = 0; ret < 6; ++ret)
mac_addr[ret] = otp_mac_p[5 - ret];
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
valid_mac = true;
}
if (!valid_mac) {
puts("Warning: Generating 'random' MAC address\n");
- eth_random_addr(mac_addr);
+ net_random_ethaddr(mac_addr);
}
eth_setenv_enetaddr("ethaddr", mac_addr);
diff --git a/board/cm-bf537e/cm-bf537e.c b/board/cm-bf537e/cm-bf537e.c
index e79f90f95b..902611ec01 100644
--- a/board/cm-bf537e/cm-bf537e.c
+++ b/board/cm-bf537e/cm-bf537e.c
@@ -31,7 +31,7 @@ static void board_init_enetaddr(char *var)
return;
printf("Warning: %s: generating 'random' MAC address\n", var);
- eth_random_addr(enetaddr);
+ net_random_ethaddr(enetaddr);
eth_setenv_enetaddr(var, enetaddr);
}
diff --git a/board/cm-bf537u/cm-bf537u.c b/board/cm-bf537u/cm-bf537u.c
index 632cbda5c0..69bffd76de 100644
--- a/board/cm-bf537u/cm-bf537u.c
+++ b/board/cm-bf537u/cm-bf537u.c
@@ -31,7 +31,7 @@ static void board_init_enetaddr(char *var)
return;
printf("Warning: %s: generating 'random' MAC address\n", var);
- eth_random_addr(enetaddr);
+ net_random_ethaddr(enetaddr);
eth_setenv_enetaddr(var, enetaddr);
}
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index ae6945ba9c..7a1bbafaa5 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -425,7 +425,7 @@ static int handle_mac_address(char *env_var, uint eeprom_bus)
if (rc)
return rc;
- if (!is_valid_ether_addr(enetaddr))
+ if (!is_valid_ethaddr(enetaddr))
return -1;
return eth_setenv_enetaddr(env_var, enetaddr);
diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c
index 592ef3d30f..428aee6d24 100644
--- a/board/compulab/cm_t335/cm_t335.c
+++ b/board/compulab/cm_t335/cm_t335.c
@@ -114,7 +114,7 @@ static int handle_mac_address(void)
if (rv)
get_efuse_mac_addr(enetaddr);
- if (!is_valid_ether_addr(enetaddr))
+ if (!is_valid_ethaddr(enetaddr))
return -1;
return eth_setenv_enetaddr("ethaddr", enetaddr);
diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c
index c4ea8ea875..374edbcffc 100644
--- a/board/compulab/cm_t35/cm_t35.c
+++ b/board/compulab/cm_t35/cm_t35.c
@@ -441,7 +441,7 @@ static int handle_mac_address(void)
if (rc)
return rc;
- if (!is_valid_ether_addr(enetaddr))
+ if (!is_valid_ethaddr(enetaddr))
return -1;
return eth_setenv_enetaddr("ethaddr", enetaddr);
diff --git a/board/compulab/cm_t3517/cm_t3517.c b/board/compulab/cm_t3517/cm_t3517.c
index 624cf4c034..03b2badd02 100644
--- a/board/compulab/cm_t3517/cm_t3517.c
+++ b/board/compulab/cm_t3517/cm_t3517.c
@@ -132,7 +132,7 @@ static int am3517_get_efuse_enetaddr(u8 *enetaddr)
enetaddr[4] = (u8)((lsb >> 8) & 0xff);
enetaddr[5] = (u8)(lsb & 0xff);
- return is_valid_ether_addr(enetaddr);
+ return is_valid_ethaddr(enetaddr);
}
static inline int cm_t3517_init_emac(bd_t *bis)
@@ -170,7 +170,7 @@ static int cm_t3517_handle_mac_address(void)
return ret;
}
- if (!is_valid_ether_addr(enetaddr))
+ if (!is_valid_ethaddr(enetaddr))
return -1;
return eth_setenv_enetaddr("ethaddr", enetaddr);
diff --git a/board/compulab/cm_t54/cm_t54.c b/board/compulab/cm_t54/cm_t54.c
index fdea909ff7..fad0551498 100644
--- a/board/compulab/cm_t54/cm_t54.c
+++ b/board/compulab/cm_t54/cm_t54.c
@@ -166,10 +166,10 @@ static int handle_mac_address(void)
return 0;
ret = cl_eeprom_read_mac_addr(enetaddr, CONFIG_SYS_I2C_EEPROM_BUS);
- if (ret || !is_valid_ether_addr(enetaddr))
+ if (ret || !is_valid_ethaddr(enetaddr))
generate_mac_addr(enetaddr);
- if (!is_valid_ether_addr(enetaddr))
+ if (!is_valid_ethaddr(enetaddr))
return -1;
return eth_setenv_enetaddr("usbethaddr", enetaddr);
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index b9ca38e929..b82385a918 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -145,7 +145,7 @@ int misc_init_r(void)
*/
if (!enetaddr_found) {
if (!spi_mac_read) {
- if (is_valid_ether_addr(buff)) {
+ if (is_valid_ethaddr(buff)) {
if (eth_setenv_enetaddr("ethaddr", buff)) {
printf("Warning: Failed to "
"set MAC address from SPI flash\n");
@@ -160,8 +160,8 @@ int misc_init_r(void)
* MAC address present in environment compare it with
* the MAC address in SPI flash and warn on mismatch
*/
- if (!spi_mac_read && is_valid_ether_addr(buff) &&
- memcmp(env_enetaddr, buff, 6))
+ if (!spi_mac_read && is_valid_ethaddr(buff) &&
+ memcmp(env_enetaddr, buff, 6))
printf("Warning: MAC address in SPI flash don't match "
"with the MAC address in the environment\n");
printf("Default using MAC address from environment\n");
diff --git a/board/dnp5370/dnp5370.c b/board/dnp5370/dnp5370.c
index df721c9944..655fcace2b 100644
--- a/board/dnp5370/dnp5370.c
+++ b/board/dnp5370/dnp5370.c
@@ -46,7 +46,7 @@ static void board_init_enetaddr(uchar *mac_addr)
if (USE_MAC_IN_FLASH) {
/* we cram the MAC in the last flash sector */
uchar *board_mac_addr = (uchar *)0x202F0000;
- if (is_valid_ether_addr(board_mac_addr)) {
+ if (is_valid_ethaddr(board_mac_addr)) {
memcpy(mac_addr, board_mac_addr, 6);
valid_mac = true;
}
@@ -54,7 +54,7 @@ static void board_init_enetaddr(uchar *mac_addr)
if (!valid_mac) {
puts("Warning: Generating 'random' MAC address\n");
- eth_random_addr(mac_addr);
+ net_random_ethaddr(mac_addr);
}
eth_setenv_enetaddr("ethaddr", mac_addr);
diff --git a/board/gumstix/pepper/board.c b/board/gumstix/pepper/board.c
index f644f8188b..beb2fac374 100644
--- a/board/gumstix/pepper/board.c
+++ b/board/gumstix/pepper/board.c
@@ -165,7 +165,7 @@ int board_eth_init(bd_t *bis)
mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
mac_addr[4] = mac_lo & 0xFF;
mac_addr[5] = (mac_lo & 0xFF00) >> 8;
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("ethaddr", mac_addr);
}
diff --git a/board/ifm/ac14xx/ac14xx.c b/board/ifm/ac14xx/ac14xx.c
index 5d2ab2fad3..72932ca69f 100644
--- a/board/ifm/ac14xx/ac14xx.c
+++ b/board/ifm/ac14xx/ac14xx.c
@@ -225,7 +225,7 @@ int mac_read_from_eeprom(void)
break;
}
- if (mac && is_valid_ether_addr(mac)) {
+ if (mac && is_valid_ethaddr(mac)) {
eth_setenv_enetaddr("ethaddr", mac);
if (mac_diag) {
mac_txt = getenv("ethaddr");
diff --git a/board/ip04/ip04.c b/board/ip04/ip04.c
index ae52633426..d20500f4df 100644
--- a/board/ip04/ip04.c
+++ b/board/ip04/ip04.c
@@ -32,7 +32,7 @@ int misc_init_r(void)
uchar enetaddr[6];
if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
puts("Warning: Generating 'random' MAC address\n");
- eth_random_addr(enetaddr);
+ net_random_ethaddr(enetaddr);
eth_setenv_enetaddr("ethaddr", enetaddr);
}
diff --git a/board/isee/igep0033/board.c b/board/isee/igep0033/board.c
index 9f8fcf2c1c..5fea7ffaef 100644
--- a/board/isee/igep0033/board.c
+++ b/board/isee/igep0033/board.c
@@ -156,7 +156,7 @@ int board_eth_init(bd_t *bis)
mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
mac_addr[4] = mac_lo & 0xFF;
mac_addr[5] = (mac_lo & 0xFF00) >> 8;
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("ethaddr", mac_addr);
}
diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c
index 1071662ea9..1bf9d730e5 100644
--- a/board/phytec/pcm051/board.c
+++ b/board/phytec/pcm051/board.c
@@ -228,7 +228,7 @@ int board_eth_init(bd_t *bis)
mac_addr[4] = mac_lo & 0xFF;
mac_addr[5] = (mac_lo & 0xFF00) >> 8;
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("ethaddr", mac_addr);
else
goto try_usbether;
diff --git a/board/renesas/r0p7734/r0p7734.c b/board/renesas/r0p7734/r0p7734.c
index 5687ad4766..2e31ba6731 100644
--- a/board/renesas/r0p7734/r0p7734.c
+++ b/board/renesas/r0p7734/r0p7734.c
@@ -55,7 +55,7 @@ int board_late_init(void)
/* Read MAC address */
i2c_read(0x50, 0x10, 0, mac, 6);
- if (is_valid_ether_addr(mac))
+ if (is_valid_ethaddr(mac))
eth_setenv_enetaddr("ethaddr", mac);
return 0;
diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c
index 7baac3dda6..d81f5481a7 100644
--- a/board/siemens/common/factoryset.c
+++ b/board/siemens/common/factoryset.c
@@ -271,7 +271,7 @@ static int factoryset_mac_setenv(void)
uint8_t mac_addr[6];
debug("FactorySet: Set mac address\n");
- if (is_valid_ether_addr(factory_dat.mac)) {
+ if (is_valid_ethaddr(factory_dat.mac)) {
memcpy(mac_addr, factory_dat.mac, 6);
} else {
uint32_t mac_hi, mac_lo;
@@ -286,7 +286,7 @@ static int factoryset_mac_setenv(void)
mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
mac_addr[4] = mac_lo & 0xFF;
mac_addr[5] = (mac_lo & 0xFF00) >> 8;
- if (!is_valid_ether_addr(mac_addr)) {
+ if (!is_valid_ethaddr(mac_addr)) {
printf("Warning: ethaddr not set by FactorySet or E-fuse. Set <ethaddr> variable to overcome this.\n");
return -1;
}
diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c
index 264ba025b7..4d8ba3cd80 100644
--- a/board/siemens/pxm2/board.c
+++ b/board/siemens/pxm2/board.c
@@ -222,7 +222,7 @@ int board_eth_init(bd_t *bis)
struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
#ifdef CONFIG_FACTORYSET
int rv;
- if (!is_valid_ether_addr(factory_dat.mac))
+ if (!is_valid_ethaddr(factory_dat.mac))
printf("Error: no valid mac address\n");
else
eth_setenv_enetaddr("ethaddr", factory_dat.mac);
diff --git a/board/silica/pengwyn/board.c b/board/silica/pengwyn/board.c
index ee88b6f399..815c9a7d15 100644
--- a/board/silica/pengwyn/board.c
+++ b/board/silica/pengwyn/board.c
@@ -189,7 +189,7 @@ int board_eth_init(bd_t *bis)
mac_addr[4] = mac_lo & 0xFF;
mac_addr[5] = (mac_lo & 0xFF00) >> 8;
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("ethaddr", mac_addr);
else
return n;
diff --git a/board/tcm-bf518/tcm-bf518.c b/board/tcm-bf518/tcm-bf518.c
index 5d25fcd0a9..3fa7d972ea 100644
--- a/board/tcm-bf518/tcm-bf518.c
+++ b/board/tcm-bf518/tcm-bf518.c
@@ -39,14 +39,14 @@ static void board_init_enetaddr(uchar *mac_addr)
for (ret = 0; ret < 6; ++ret)
mac_addr[ret] = otp_mac_p[5 - ret];
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
valid_mac = true;
}
#endif
if (!valid_mac) {
puts("Warning: Generating 'random' MAC address\n");
- eth_random_addr(mac_addr);
+ net_random_ethaddr(mac_addr);
}
eth_setenv_enetaddr("ethaddr", mac_addr);
diff --git a/board/tcm-bf537/tcm-bf537.c b/board/tcm-bf537/tcm-bf537.c
index a4f0f7121b..2531a44336 100644
--- a/board/tcm-bf537/tcm-bf537.c
+++ b/board/tcm-bf537/tcm-bf537.c
@@ -31,7 +31,7 @@ static void board_init_enetaddr(char *var)
return;
printf("Warning: %s: generating 'random' MAC address\n", var);
- eth_random_addr(enetaddr);
+ net_random_ethaddr(enetaddr);
eth_setenv_enetaddr(var, enetaddr);
}
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 0739e6021a..96245a3306 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -593,7 +593,7 @@ int board_eth_init(bd_t *bis)
if (!getenv("ethaddr")) {
printf("<ethaddr> not set. Validating first E-fuse MAC\n");
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("ethaddr", mac_addr);
}
@@ -609,7 +609,7 @@ int board_eth_init(bd_t *bis)
mac_addr[5] = (mac_lo & 0xFF00) >> 8;
if (!getenv("eth1addr")) {
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("eth1addr", mac_addr);
}
@@ -658,7 +658,7 @@ int board_eth_init(bd_t *bis)
#endif
#if defined(CONFIG_USB_ETHER) && \
(!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT))
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("usbnet_devaddr", mac_addr);
rv = usb_eth_initialize(bis);
diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c
index ddf4c5fc13..4aae230608 100644
--- a/board/ti/am43xx/board.c
+++ b/board/ti/am43xx/board.c
@@ -802,7 +802,7 @@ int board_eth_init(bd_t *bis)
if (!getenv("ethaddr")) {
puts("<ethaddr> not set. Validating first E-fuse MAC\n");
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("ethaddr", mac_addr);
}
@@ -816,7 +816,7 @@ int board_eth_init(bd_t *bis)
mac_addr[5] = (mac_lo & 0xFF00) >> 8;
if (!getenv("eth1addr")) {
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("eth1addr", mac_addr);
}
diff --git a/board/ti/beagle_x15/board.c b/board/ti/beagle_x15/board.c
index ac0d22c9ed..ffcd53185b 100644
--- a/board/ti/beagle_x15/board.c
+++ b/board/ti/beagle_x15/board.c
@@ -356,7 +356,7 @@ int board_eth_init(bd_t *bis)
if (!getenv("ethaddr")) {
printf("<ethaddr> not set. Validating first E-fuse MAC\n");
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("ethaddr", mac_addr);
}
@@ -370,7 +370,7 @@ int board_eth_init(bd_t *bis)
mac_addr[5] = mac_lo & 0xFF;
if (!getenv("eth1addr")) {
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("eth1addr", mac_addr);
}
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 3089fa2334..c1019289ba 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -341,7 +341,7 @@ int board_eth_init(bd_t *bis)
if (!getenv("ethaddr")) {
printf("<ethaddr> not set. Validating first E-fuse MAC\n");
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("ethaddr", mac_addr);
}
@@ -355,7 +355,7 @@ int board_eth_init(bd_t *bis)
mac_addr[5] = mac_lo & 0xFF;
if (!getenv("eth1addr")) {
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("eth1addr", mac_addr);
}
diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c
index 54b3dfb82c..e406dabfc0 100644
--- a/board/ti/ti814x/evm.c
+++ b/board/ti/ti814x/evm.c
@@ -178,7 +178,7 @@ int board_eth_init(bd_t *bis)
mac_addr[4] = mac_lo & 0xFF;
mac_addr[5] = (mac_lo & 0xFF00) >> 8;
- if (is_valid_ether_addr(mac_addr))
+ if (is_valid_ethaddr(mac_addr))
eth_setenv_enetaddr("ethaddr", mac_addr);
else
printf("Unable to read MAC address. Set <ethaddr>\n");