]> git.sur5r.net Git - u-boot/blobdiff - net/ping.c
x86: Enable the queensbay cpu directory build
[u-boot] / net / ping.c
index 068aa96a74f27aa1e5f76ed2ac8863b4c5557bb7..2be56ed929575c25c1cfa78c7c89e7da31d32be7 100644 (file)
@@ -6,6 +6,7 @@
  *     Copyright 2000 Roland Borde
  *     Copyright 2000 Paolo Scaffardi
  *     Copyright 2000-2002 Wolfgang Denk, wd@denx.de
+ *     SPDX-License-Identifier:        GPL-2.0
  */
 
 #include "ping.h"
@@ -45,13 +46,12 @@ static int ping_send(void)
 
        /* XXX always send arp request */
 
-       debug("sending ARP for %pI4\n", &NetPingIP);
+       debug_cond(DEBUG_DEV_PKT, "sending ARP for %pI4\n", &NetPingIP);
 
        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);
 
@@ -94,7 +94,7 @@ void ping_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
        case ICMP_ECHO_REQUEST:
                eth_hdr_size = net_update_ether(et, et->et_src, PROT_IP);
 
-               debug("Got ICMP ECHO REQUEST, return "
+               debug_cond(DEBUG_DEV_PKT, "Got ICMP ECHO REQUEST, return "
                        "%d bytes\n", eth_hdr_size + len);
 
                ip->ip_sum = 0;