[PATCH 1/6] net: ping: send PING packets with 1-second interval

Wolfram Sang w.sang at pengutronix.de
Wed Apr 4 12:04:39 EDT 2012


Like standard ping does by default.

Signed-off-by: Wolfram Sang <w.sang at pengutronix.de>
---
 net/ping.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/ping.c b/net/ping.c
index b90e5af..0e8a0dc 100644
--- a/net/ping.c
+++ b/net/ping.c
@@ -88,7 +88,8 @@ static int do_ping(int argc, char *argv[])
 
 		net_poll();
 
-		if (is_timeout(ping_start, 10 * SECOND)) {
+		if (is_timeout(ping_start, SECOND)) {
+			/* No answer, send another packet */
 			ping_start = get_time_ns();
 			ret = ping_send();
 			if (ret)
-- 
1.7.9.1




More information about the barebox mailing list