summaryrefslogtreecommitdiffstats
path: root/net/bootp.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/bootp.c
parent586cbe51ab8ef357bcf3a52c6885ab00bc7293dd (diff)
downloadtalos-obmc-uboot-0adb5b761f4c789ae47d8abb015f5e017263d3f2.tar.gz
talos-obmc-uboot-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 'net/bootp.c')
-rw-r--r--net/bootp.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/net/bootp.c b/net/bootp.c
index 9251e91bf6..9b27d4cb53 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -147,7 +147,8 @@ static void BootpCopyNetParams(struct Bootp_t *bp)
net_copy_ip(&tmp_ip, &bp->bp_siaddr);
if (tmp_ip.s_addr != 0)
net_copy_ip(&net_server_ip, &bp->bp_siaddr);
- memcpy(NetServerEther, ((struct ethernet_hdr *)NetRxPacket)->et_src, 6);
+ memcpy(net_server_ethaddr, ((struct ethernet_hdr *)NetRxPacket)->et_src,
+ 6);
if (strlen(bp->bp_file) > 0)
copy_filename(net_boot_file_name, bp->bp_file,
sizeof(net_boot_file_name));
@@ -693,7 +694,7 @@ BootpRequest(void)
pkt = NetTxPacket;
memset((void *)pkt, 0, PKTSIZE);
- eth_hdr_size = NetSetEther(pkt, NetBcastAddr, PROT_IP);
+ eth_hdr_size = NetSetEther(pkt, net_bcast_ethaddr, PROT_IP);
pkt += eth_hdr_size;
/*
@@ -719,7 +720,7 @@ BootpRequest(void)
net_write_ip(&bp->bp_yiaddr, zero_ip);
net_write_ip(&bp->bp_siaddr, zero_ip);
net_write_ip(&bp->bp_giaddr, zero_ip);
- memcpy(bp->bp_chaddr, NetOurEther, 6);
+ memcpy(bp->bp_chaddr, net_ethaddr, 6);
copy_filename(bp->bp_file, net_boot_file_name, sizeof(bp->bp_file));
/* Request additional information from the BOOTP/DHCP server */
@@ -734,10 +735,10 @@ BootpRequest(void)
* Bootp ID is the lower 4 bytes of our ethernet address
* plus the current time in ms.
*/
- BootpID = ((ulong)NetOurEther[2] << 24)
- | ((ulong)NetOurEther[3] << 16)
- | ((ulong)NetOurEther[4] << 8)
- | (ulong)NetOurEther[5];
+ BootpID = ((ulong)net_ethaddr[2] << 24)
+ | ((ulong)net_ethaddr[3] << 16)
+ | ((ulong)net_ethaddr[4] << 8)
+ | (ulong)net_ethaddr[5];
BootpID += get_timer(0);
BootpID = htonl(BootpID);
bootp_add_id(BootpID);
@@ -896,7 +897,7 @@ static void DhcpSendRequestPkt(struct Bootp_t *bp_offer)
pkt = NetTxPacket;
memset((void *)pkt, 0, PKTSIZE);
- eth_hdr_size = NetSetEther(pkt, NetBcastAddr, PROT_IP);
+ eth_hdr_size = NetSetEther(pkt, net_bcast_ethaddr, PROT_IP);
pkt += eth_hdr_size;
iphdr = pkt; /* We'll need this later to set proper pkt size */
@@ -918,7 +919,7 @@ static void DhcpSendRequestPkt(struct Bootp_t *bp_offer)
zero_ip.s_addr = 0;
net_write_ip(&bp->bp_giaddr, zero_ip);
- memcpy(bp->bp_chaddr, NetOurEther, 6);
+ memcpy(bp->bp_chaddr, net_ethaddr, 6);
/*
* ID is the id of the OFFER packet
OpenPOWER on IntegriCloud