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>
diff --git a/net/ping.c b/net/ping.c
index 068aa96..2ba9f76 100644
--- a/net/ping.c
+++ b/net/ping.c
@@ -49,9 +49,8 @@
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);