X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=net%2Fbootp.c;h=9d7cb5d30c140e0aadedc6371304ba955b85944f;hb=2c3f9261c80e8171ba813f8baef958c1edac3f0d;hp=6c869ef8560b45a83bdf0c7e0932567b6122b708;hpb=00caae6d47645e68d6e5277aceb69592b49381a6;p=u-boot diff --git a/net/bootp.c b/net/bootp.c index 6c869ef856..9d7cb5d30c 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 @@ -334,7 +333,7 @@ static void bootp_process_vendor(u8 *ext, int size) debug("net_nis_domain : %s\n", net_nis_domain); #if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER) - if (net_ntp_server) + if (net_ntp_server.s_addr) debug("net_ntp_server : %pI4\n", &net_ntp_server); #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) @@ -504,7 +510,7 @@ static int dhcp_extended(u8 *e, int message_type, struct in_addr server_ip, #endif if (env_get("bootp_arch")) - clientarch = getenv_ulong("bootp_arch", 16, clientarch); + clientarch = env_get_ulong("bootp_arch", 16, clientarch); if (clientarch > 0) { *e++ = 93; /* Client System Architecture */