From 2c00e099fe77b014dd094a49113e2c6ce8a24a16 Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Wed, 23 May 2012 07:59:19 +0000 Subject: net: Add option CONFIG_BOOTP_MAY_FAIL This is useful if you want to look for a DHCP server, but try some other settings if not available. Signed-off-by: Joe Hershberger Acked-by: Simon Glass --- net/bootp.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'net') diff --git a/net/bootp.c b/net/bootp.c index 7e24b66..0f0867b 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -326,8 +326,13 @@ static void BootpTimeout(void) { if (BootpTry >= TIMEOUT_COUNT) { +#ifdef CONFIG_BOOTP_MAY_FAIL + puts("\nRetry count exceeded\n"); + NetSetState(NETLOOP_FAIL); +#else puts("\nRetry count exceeded; starting again\n"); NetStartAgain(); +#endif } else { NetSetTimeout(TIMEOUT, BootpTimeout); BootpRequest(); -- cgit v1.1