From faa61661cf6373dd606a34af9c082c0bb521126a Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 19 Aug 2009 15:41:47 +0200 Subject: [PATCH] only the ping code is interested in the ping ip Signed-off-by: Sascha Hauer --- include/net.h | 2 -- net/net.c | 14 -------------- net/ping.c | 2 ++ 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/include/net.h b/include/net.h index b055730fc..c09868cd4 100644 --- a/include/net.h +++ b/include/net.h @@ -305,8 +305,6 @@ typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP /* from net/net.c */ extern char BootFile[128]; /* Boot File name */ -extern IPaddr_t NetPingIP; /* the ip address to ping */ - /* when CDP completes these hold the return values */ extern ushort CDPNativeVLAN; extern ushort CDPApplianceVLAN; diff --git a/net/net.c b/net/net.c index 57f4044ba..3ab1db166 100644 --- a/net/net.c +++ b/net/net.c @@ -135,12 +135,6 @@ ushort NetOurNativeVLAN = 0xFFFF; /* ditto */ char BootFile[128]; /* Boot File name */ -#ifdef CONFIG_NET_PING -IPaddr_t NetPingIP; /* the ip address to ping */ - -extern void PingStart(void); -#endif - #ifdef CONFIG_NET_SNTP IPaddr_t NetNtpServerIP; /* NTP server IP address */ int NetTimeOffset=0; /* offset time from UTC */ @@ -790,14 +784,6 @@ static int net_check_prereq (proto_t protocol) switch (protocol) { /* Fall through */ -#ifdef CONFIG_NET_PING - case PING: - if (NetPingIP == 0) { - puts ("*** ERROR: ping address not given\n"); - return -1; - } - goto common; -#endif #ifdef CONFIG_NET_SNTP case SNTP: if (NetNtpServerIP == 0) { diff --git a/net/ping.c b/net/ping.c index 315457ada..5909c31fe 100644 --- a/net/ping.c +++ b/net/ping.c @@ -5,6 +5,8 @@ static ushort PingSeqNo; +static IPaddr_t NetPingIP; /* the ip address to ping */ + static int PingSend(void) { static uchar mac[6];