diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-23 07:58:10 +0000 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-23 17:46:15 -0500 |
commit | 206d07fd7cbe69c8086a9b68f28b36e7b5ab9f08 (patch) | |
tree | 53e0e7a006f072738ed34245263137975b54bfc2 /net | |
parent | e0a630795b35f3137a3204e0d8e5fea928f8962b (diff) | |
download | u-boot-imx-206d07fd7cbe69c8086a9b68f28b36e7b5ab9f08.zip u-boot-imx-206d07fd7cbe69c8086a9b68f28b36e7b5ab9f08.tar.gz u-boot-imx-206d07fd7cbe69c8086a9b68f28b36e7b5ab9f08.tar.bz2 |
net: cosmetic: Rename parameter len to payload_len
This name more explicitly claims that it does not include the
header size
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -591,8 +591,8 @@ NetSendPacket(uchar *pkt, int len) (void) eth_send(pkt, len); } -int -NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, int len) +int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, + int payload_len) { uchar *pkt; @@ -618,14 +618,14 @@ NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, int len) pkt = NetArpWaitTxPacket; pkt += NetSetEther(pkt, NetArpWaitPacketMAC, PROT_IP); - NetSetIP(pkt, dest, dport, sport, len); + NetSetIP(pkt, dest, dport, sport, payload_len); memcpy(pkt + IP_UDP_HDR_SIZE, (uchar *)NetTxPacket + (pkt - (uchar *)NetArpWaitTxPacket) + - IP_UDP_HDR_SIZE, len); + IP_UDP_HDR_SIZE, payload_len); /* size of the waiting packet */ NetArpWaitTxPacketSize = (pkt - NetArpWaitTxPacket) + - IP_UDP_HDR_SIZE + len; + IP_UDP_HDR_SIZE + payload_len; /* and do the ARP request */ NetArpWaitTry = 1; @@ -638,8 +638,9 @@ NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, int len) pkt = (uchar *)NetTxPacket; pkt += NetSetEther(pkt, ether, PROT_IP); - NetSetIP(pkt, dest, dport, sport, len); - eth_send(NetTxPacket, (pkt - NetTxPacket) + IP_UDP_HDR_SIZE + len); + NetSetIP(pkt, dest, dport, sport, payload_len); + eth_send(NetTxPacket, (pkt - NetTxPacket) + IP_UDP_HDR_SIZE + + payload_len); return 0; /* transmitted */ } |