]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - net/rarp.c
menu.c: use puts() instead of printf() where possible
[karo-tx-uboot.git] / net / rarp.c
index d37981bfc809dc01829379ee6e5bab10cd648aa5..097f970f442770153cc3f36209c5db26f0737380 100644 (file)
@@ -29,8 +29,6 @@
 #include "rarp.h"
 #include "tftp.h"
 
-#if defined(CONFIG_CMD_NET)
-
 #define TIMEOUT                5000UL  /* Milliseconds before trying BOOTP again */
 #ifndef        CONFIG_NET_RETRY_COUNT
 # define TIMEOUT_COUNT 5               /* # of timeouts before giving up  */
@@ -45,26 +43,11 @@ int         RarpTry;
  *     Handle a RARP received packet.
  */
 static void
-RarpHandler(uchar * dummi0, unsigned dummi1, unsigned dummi2, unsigned dummi3)
+RarpHandler(uchar *dummi0, unsigned dummi1, IPaddr_t sip, unsigned dummi2,
+           unsigned dummi3)
 {
-       char *s;
        debug("Got good RARP\n");
-       if ((s = getenv("autoload")) != NULL) {
-               if (*s == 'n') {
-                       /*
-                        * Just use RARP to configure system;
-                        * Do not use TFTP/NFS to to load the bootfile.
-                        */
-                       NetState = NETLOOP_SUCCESS;
-                       return;
-#if defined(CONFIG_CMD_NFS)
-               } else if ((s != NULL) && !strcmp(s, "NFS")) {
-                       NfsStart();
-                       return;
-#endif
-               }
-       }
-       TftpStart ();
+       net_auto_load();
 }
 
 
@@ -116,5 +99,3 @@ RarpRequest (void)
        NetSetTimeout(TIMEOUT, RarpTimeout);
        NetSetHandler(RarpHandler);
 }
-
-#endif