Patch: "Put common autoload code into auto_load() function"
(sha1: 093498669e77597635a24f326f11efeab213d394) is not simple code
cleanup but code change which introduce new bug.

If autoload variable is not setup it worked as autoload=yes.

Currently if autoload is not setup dhcp sends request in
forever loop.

There are two options how to fix it:
1. Move TftpStart() which is in this patch
2. Change functionality if autoload is not setup, set NetSate and ends.

@@ -165,7 +165,8 @@ static void auto_load(void)
                }
 #endif
        TftpStart();
-       }
+       } else
+               NetState = NETLOOP_SUCCESS;
 }

CC: Eric BĂ©nard <e...@eukrea.com>
CC: Simon Glass <s...@chromium.org>
Signed-off-by: Michal Simek <mon...@monstr.eu>
---
 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.5.5.6

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to