summaryrefslogtreecommitdiff
path: root/net/rarp.c
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 /net/rarp.c
parent586cbe51ab8ef357bcf3a52c6885ab00bc7293dd (diff)
downloadu-boot-0adb5b761f4c789ae47d8abb015f5e017263d3f2.tar.gz
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 'net/rarp.c')
-rw-r--r--net/rarp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/rarp.c b/net/rarp.c
index 3e1c74cdcc..2f5c104d11 100644
--- a/net/rarp.c
+++ b/net/rarp.c
@@ -46,7 +46,7 @@ void rarp_receive(struct ip_udp_hdr *ip, unsigned len)
net_copy_ip(&net_ip, &arp->ar_data[16]);
if (net_server_ip.s_addr == 0)
net_copy_ip(&net_server_ip, &arp->ar_data[6]);
- memcpy(NetServerEther, &arp->ar_data[0], 6);
+ memcpy(net_server_ethaddr, &arp->ar_data[0], 6);
debug_cond(DEBUG_DEV_PKT, "Got good RARP\n");
net_auto_load();
}
@@ -77,7 +77,7 @@ void RarpRequest(void)
printf("RARP broadcast %d\n", ++RarpTry);
pkt = NetTxPacket;
- eth_hdr_size = NetSetEther(pkt, NetBcastAddr, PROT_RARP);
+ eth_hdr_size = NetSetEther(pkt, net_bcast_ethaddr, PROT_RARP);
pkt += eth_hdr_size;
rarp = (struct arp_hdr *)pkt;
@@ -87,10 +87,10 @@ void RarpRequest(void)
rarp->ar_hln = 6;
rarp->ar_pln = 4;
rarp->ar_op = htons(RARPOP_REQUEST);
- memcpy(&rarp->ar_data[0], NetOurEther, 6); /* source ET addr */
+ memcpy(&rarp->ar_data[0], net_ethaddr, 6); /* source ET addr */
memcpy(&rarp->ar_data[6], &net_ip, 4); /* source IP addr */
/* dest ET addr = source ET addr ??*/
- memcpy(&rarp->ar_data[10], NetOurEther, 6);
+ memcpy(&rarp->ar_data[10], net_ethaddr, 6);
/* dest IP addr set to broadcast */
memset(&rarp->ar_data[16], 0xff, 4);