]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - net/bootp.c
powerpc/85xx: Enable HWCONFIG on MPC8572DS
[karo-tx-uboot.git] / net / bootp.c
index 309385278f35c93f89b3f28a9104e243544944ee..1a717867d48885b479050909b43d1cba0b372fe7 100644 (file)
@@ -20,8 +20,6 @@
 
 #define BOOTP_VENDOR_MAGIC     0x63825363      /* RFC1048 Magic Cookie         */
 
-#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  */
@@ -458,6 +456,10 @@ static int DhcpExtended (u8 * e, int message_type, IPaddr_t ServerID, IPaddr_t R
        *e++  = 42;
        *cnt += 1;
 #endif
+       /* no options, so back up to avoid sending an empty request list */
+       if (*cnt == 0)
+               e -= 2;
+
        *e++  = 255;            /* End of the list */
 
        /* Pad to minimal length */
@@ -948,5 +950,3 @@ void DhcpRequest(void)
        BootpRequest();
 }
 #endif /* CONFIG_CMD_DHCP */
-
-#endif /* CONFIG_CMD_NET */