]> git.sur5r.net Git - u-boot/blobdiff - net/bootp.c
efi_loader: Always use EFIAPI instead of asmlinkage
[u-boot] / net / bootp.c
index 6c869ef8560b45a83bdf0c7e0932567b6122b708..efa959971c279fe4e74d04ec0007d0cb1ef52e34 100644 (file)
@@ -14,7 +14,6 @@
 #include <net.h>
 #include <net/tftp.h>
 #include "bootp.h"
-#include "nfs.h"
 #ifdef CONFIG_LED_STATUS
 #include <status_led.h>
 #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 */