[U-Boot] [PATCH] net/bootp.c: fix tftp load if autoload environment var isn't set

Peter Korsgaard jacmet at sunsite.dk
Mon Sep 19 09:54:46 CEST 2011


Commit 093498669 (Put common autoload code into auto_load() function)
broke handling of autoload environment variable not being set.
The bootp/dhcp code will just keep on requesting IP address forever
and never start TFTP download.

Fix it by moving TftpStart() outside the conditional like it was before.

Signed-off-by: Peter Korsgaard <jacmet at sunsite.dk>
---
 net/bootp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bootp.c b/net/bootp.c
index 3db08ea..a003c42 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -164,8 +164,8 @@ static void auto_load(void)
 			return;
 		}
 #endif
-	TftpStart();
 	}
+	TftpStart();
 }
 
 #if !defined(CONFIG_CMD_DHCP)
-- 
1.7.5.4



More information about the U-Boot mailing list