diff options
author | Krebs, Olaf <Olaf.Krebs@emh-metering.com> | 2020-03-09 14:27:55 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-06-12 13:17:23 -0400 |
commit | 808f13d8fc38959dc90de7243029141e758a5c0a (patch) | |
tree | 07a17db6b106875a0e031d637b3d33ec913562ee /net | |
parent | f3767bcb31d0ce5c6381d5f6c33a951774ee6d41 (diff) |
net: Fix error if some network features are disabled
If 'CONFIG_CMD_TFTPBOOT' or 'CONFIG_CMD_BOOTP' are disabled, the usage must be disabled, too!
Signed-off-by: Olaf Krebs <olaf.krebs@emh-metering.com>
CC: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -456,6 +456,7 @@ restart: net_dev_exists = 1; net_boot_file_size = 0; switch (protocol) { +#ifdef CONFIG_CMD_TFTPBOOT case TFTPGET: #ifdef CONFIG_CMD_TFTPPUT case TFTPPUT: @@ -463,6 +464,7 @@ restart: /* always use ARP to get server ethernet address */ tftp_start(protocol); break; +#endif #ifdef CONFIG_CMD_TFTPSRV case TFTPSRV: tftp_start_server(); @@ -480,13 +482,13 @@ restart: dhcp_request(); /* Basically same as BOOTP */ break; #endif - +#if defined(CONFIG_CMD_BOOTP) case BOOTP: bootp_reset(); net_ip.s_addr = 0; bootp_request(); break; - +#endif #if defined(CONFIG_CMD_RARP) case RARP: rarp_try = 0; |