From 0adb5b761f4c789ae47d8abb015f5e017263d3f2 Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Wed, 8 Apr 2015 01:41:04 -0500 Subject: 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 Acked-by: Simon Glass --- arch/arm/mach-davinci/misc.c | 2 +- arch/powerpc/cpu/mpc8260/ether_fcc.c | 14 ++++++-------- arch/powerpc/cpu/mpc8xx/fec.c | 6 +++--- 3 files changed, 10 insertions(+), 12 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-davinci/misc.c b/arch/arm/mach-davinci/misc.c index e18bdfc729..e699d61874 100644 --- a/arch/arm/mach-davinci/misc.c +++ b/arch/arm/mach-davinci/misc.c @@ -49,7 +49,7 @@ int dvevm_read_mac_address(uint8_t *buf) goto i2cerr; /* Check that MAC address is valid. */ - if (!is_valid_ether_addr(buf)) + if (!is_valid_ethaddr(buf)) goto err; return 1; /* Found */ diff --git a/arch/powerpc/cpu/mpc8260/ether_fcc.c b/arch/powerpc/cpu/mpc8260/ether_fcc.c index f777ba14cc..240e7aedf3 100644 --- a/arch/powerpc/cpu/mpc8260/ether_fcc.c +++ b/arch/powerpc/cpu/mpc8260/ether_fcc.c @@ -637,7 +637,7 @@ eth_loopback_test (void) puts ("FCC Ethernet External loopback test\n"); - eth_getenv_enetaddr("ethaddr", NetOurEther); + eth_getenv_enetaddr("ethaddr", net_ethaddr); /* * global initialisations for all FCC channels @@ -721,7 +721,7 @@ eth_loopback_test (void) BD_ENET_TX_LAST | BD_ENET_TX_TC; memset ((void *)bp, patbytes[i], ELBT_BUFSZ); - NetSetEther (bp, NetBcastAddr, 0x8000); + NetSetEther(bp, net_bcast_ethaddr, 0x8000); } ecp->txbd[ELBT_NTXBD - 1].cbd_sc |= BD_ENET_TX_WRAP; @@ -799,11 +799,9 @@ eth_loopback_test (void) * So, far we have only been given one Ethernet address. We use * the same address for all channels */ -#define ea NetOurEther - fpp->fen_paddrh = (ea[5] << 8) + ea[4]; - fpp->fen_paddrm = (ea[3] << 8) + ea[2]; - fpp->fen_paddrl = (ea[1] << 8) + ea[0]; -#undef ea + fpp->fen_paddrh = (net_ethaddr[5] << 8) + net_ethaddr[4]; + fpp->fen_paddrm = (net_ethaddr[3] << 8) + net_ethaddr[2]; + fpp->fen_paddrl = (net_ethaddr[1] << 8) + net_ethaddr[0]; fpp->fen_minflr = PKT_MINBUF_SIZE; /* min frame len register */ /* @@ -1016,7 +1014,7 @@ eth_loopback_test (void) &ecp->rxbufs[i][0]; ours = memcmp (ehp->et_src, \ - NetOurEther, 6); + net_ethaddr, 6); prot = swap16 (ehp->et_protlen); tb = prot & 0x8000; diff --git a/arch/powerpc/cpu/mpc8xx/fec.c b/arch/powerpc/cpu/mpc8xx/fec.c index 22b8ec752b..454e77af99 100644 --- a/arch/powerpc/cpu/mpc8xx/fec.c +++ b/arch/powerpc/cpu/mpc8xx/fec.c @@ -252,9 +252,9 @@ static int fec_recv (struct eth_device *dev) length -= 4; #if defined(CONFIG_CMD_CDP) - if ((rx[0] & 1) != 0 - && memcmp ((uchar *) rx, NetBcastAddr, 6) != 0 - && !is_cdp_packet((uchar *)rx)) + if ((rx[0] & 1) != 0 && + memcmp((uchar *)rx, net_bcast_ethaddr, 6) != 0 && + !is_cdp_packet((uchar *)rx)) rx = NULL; #endif /* -- cgit v1.2.1