X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=net%2Fping.c;h=3e5461a36a02b2d1f41c857dc8d39aaabf440823;hb=16cf145fd659a01c5db7f286e8c9a4700f736920;hp=87da5556239ff813ee7710662c187d0f37672eb3;hpb=331db5a90f0431465c36189672b2096b9b1e37d0;p=oweals%2Fu-boot.git diff --git a/net/ping.c b/net/ping.c index 87da555623..3e5461a36a 100644 --- a/net/ping.c +++ b/net/ping.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copied from Linux Monitor (LiMon) - Networking. * @@ -6,7 +7,6 @@ * 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" @@ -74,7 +74,7 @@ static void ping_timeout_handler(void) void ping_start(void) { printf("Using %s device\n", eth_get_name()); - NetSetTimeout(10000UL, ping_timeout_handler); + net_set_timeout_handler(10000UL, ping_timeout_handler); ping_send(); } @@ -107,7 +107,8 @@ void ping_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len) icmph->type = ICMP_ECHO_REPLY; icmph->checksum = 0; icmph->checksum = compute_ip_checksum(icmph, len - IP_HDR_SIZE); - net_send_packet((uchar *)et, eth_hdr_size + len); + memcpy(net_tx_packet, et, eth_hdr_size + len); + net_send_packet(net_tx_packet, eth_hdr_size + len); return; /* default: return;*/