X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=net%2Fbootp.c;h=efa959971c279fe4e74d04ec0007d0cb1ef52e34;hb=4b37928d3577e1b540b12d709e9b551fee3ccbd6;hp=73370a13fe7de813f9bb6ec7ff9daad7982b9047;hpb=5619295995e3262bb5770e8b5e945ffdc5442145;p=u-boot diff --git a/net/bootp.c b/net/bootp.c index 73370a13fe..efa959971c 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -14,7 +14,6 @@ #include #include #include "bootp.h" -#include "nfs.h" #ifdef CONFIG_LED_STATUS #include #endif @@ -387,12 +386,19 @@ static void bootp_timeout_handler(void) if (time_taken >= time_taken_max) { #ifdef CONFIG_BOOTP_MAY_FAIL - puts("\nRetry time exceeded\n"); - net_set_state(NETLOOP_FAIL); -#else - puts("\nRetry time exceeded; starting again\n"); - net_start_again(); + char *ethrotate; + + ethrotate = env_get("ethrotate"); + if ((ethrotate && strcmp(ethrotate, "no") == 0) || + net_restart_wrap) { + puts("\nRetry time exceeded\n"); + net_set_state(NETLOOP_FAIL); + } else #endif + { + puts("\nRetry time exceeded; starting again\n"); + net_start_again(); + } } else { bootp_timeout *= 2; if (bootp_timeout > 2000)