mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-25 06:46:00 +00:00
net: guard call to tftp_start() with IS_ENABLED(CONFIG_CMD_TFTPBOOT)
net_auto_load() cannot call tftp_start() if CONFIG_CMD_TFTPBOOT is disabled. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
This commit is contained in:
parent
ca55cf8104
commit
278e9ac8aa
1 changed files with 14 additions and 9 deletions
23
net/net.c
23
net/net.c
|
@ -334,17 +334,22 @@ void net_auto_load(void)
|
|||
net_set_state(NETLOOP_SUCCESS);
|
||||
return;
|
||||
}
|
||||
if (net_check_prereq(TFTPGET)) {
|
||||
/* We aren't expecting to get a serverip, so just accept the assigned IP */
|
||||
if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) {
|
||||
net_set_state(NETLOOP_SUCCESS);
|
||||
} else {
|
||||
printf("Cannot autoload with TFTPGET\n");
|
||||
net_set_state(NETLOOP_FAIL);
|
||||
if (IS_ENABLED(CONFIG_CMD_TFTPBOOT)) {
|
||||
if (net_check_prereq(TFTPGET)) {
|
||||
/*
|
||||
* We aren't expecting to get a serverip, so just
|
||||
* accept the assigned IP
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) {
|
||||
net_set_state(NETLOOP_SUCCESS);
|
||||
} else {
|
||||
printf("Cannot autoload with TFTPGET\n");
|
||||
net_set_state(NETLOOP_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
return;
|
||||
tftp_start(TFTPGET);
|
||||
}
|
||||
tftp_start(TFTPGET);
|
||||
}
|
||||
|
||||
static int net_init_loop(void)
|
||||
|
|
Loading…
Add table
Reference in a new issue