]> git.sur5r.net Git - u-boot/commitdiff
net: bootp fix vci string on SPL-Boot
authorHannes Petermaier <oe5hpm@oevsv.at>
Tue, 25 Aug 2015 10:17:59 +0000 (12:17 +0200)
committerJoe Hershberger <joe.hershberger@ni.com>
Wed, 28 Oct 2015 19:44:04 +0000 (14:44 -0500)
If CONFIG_CMD_DHCP is enabled, the vci (vendor-class-identifier) string
isn't inserted into the bootp-packet during SPL stage because the

CONFIG_BOOTP_VCI_STRING
instead
CONFIG_SPL_NET_VCI_STRING

We fix this with testing for CONFIG_SPL_BUILD and testing for existing
CONFIG_SPL_NET_VCI_STRING.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
net/bootp.c

index b2f8ad4ded932ddfdb2aefc86f803e2d4f0d894f..defad73d1aa8a8b762d05c0cd1f9e6c4a628406d 100644 (file)
@@ -498,7 +498,9 @@ static int dhcp_extended(u8 *e, int message_type, struct in_addr server_ip,
        }
 #endif
 
-#ifdef CONFIG_BOOTP_VCI_STRING
+#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_NET_VCI_STRING)
+       put_vci(e, CONFIG_SPL_NET_VCI_STRING);
+#elif defined(CONFIG_BOOTP_VCI_STRING)
        put_vci(e, CONFIG_BOOTP_VCI_STRING);
 #endif