]> git.sur5r.net Git - u-boot/commitdiff
net/bootp.c: fix tftp load if autoload environment var isn't set
authorPeter Korsgaard <jacmet@sunsite.dk>
Sun, 18 Sep 2011 21:54:46 +0000 (21:54 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 19 Sep 2011 21:25:08 +0000 (23:25 +0200)
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@sunsite.dk>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Simon Glass <sjg@chromium.org>
net/bootp.c

index 3db08ea2f31583443ee11581763bac4d1fccb2a8..a003c422bd9a4a3f33e01307fb7d33acb293ec03 100644 (file)
@@ -164,8 +164,8 @@ static void auto_load(void)
                        return;
                }
 #endif
-       TftpStart();
        }
+       TftpStart();
 }
 
 #if !defined(CONFIG_CMD_DHCP)