diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-23 07:59:24 +0000 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-23 17:53:07 -0500 |
commit | e94070c443bdc9c0231abeca920d9f9362701aec (patch) | |
tree | 070a846a4e5ec79753f6267ada3ac09c31ed1320 /net/ping.c | |
parent | d7310c7e63ca9ffd42527dc9735cb505cbe908b7 (diff) | |
download | u-boot-e94070c443bdc9c0231abeca920d9f9362701aec.tar.gz u-boot-e94070c443bdc9c0231abeca920d9f9362701aec.tar.bz2 u-boot-e94070c443bdc9c0231abeca920d9f9362701aec.zip |
net: Don't copy every packet that waits for an ARP
Use the NetArpTxPacket for the ARP packet, not to hold what used to
be in NetTxPacket.
This saves a copy and makes the code easier to understand.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/ping.c')
-rw-r--r-- | net/ping.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ping.c b/net/ping.c index 068aa96a74..2ba9f76e5a 100644 --- a/net/ping.c +++ b/net/ping.c @@ -49,9 +49,8 @@ static int ping_send(void) NetArpWaitPacketIP = NetPingIP; - eth_hdr_size = NetSetEther(NetArpWaitTxPacket, NetEtherNullAddr, - PROT_IP); - pkt = NetArpWaitTxPacket + eth_hdr_size; + eth_hdr_size = NetSetEther(NetTxPacket, NetEtherNullAddr, PROT_IP); + pkt = (uchar *)NetTxPacket + eth_hdr_size; set_icmp_header(pkt, NetPingIP); |