mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
efi_selftest: Use EFI_SIMPLE_NETWORK_PROTOCOL::GetStatus() for media check
According to the UEF specification v2.9, the main purpose of the EFI_SIMPLE_NETWORK_PROTOCOL::GetStatus() is for checking the link status via EFI_SIMPLE_NETWORK_MODE::MediaPresent. So this uses net->get_status() for checking the link status before running network test. Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
committed by
Heinrich Schuchardt
parent
6b7b9ff14d
commit
39a37adf51
@@ -309,6 +309,18 @@ static int execute(void)
|
||||
return EFI_ST_FAILURE;
|
||||
}
|
||||
|
||||
/* Check media connected */
|
||||
ret = net->get_status(net, NULL, NULL);
|
||||
if (ret != EFI_SUCCESS) {
|
||||
efi_st_error("Failed to get status");
|
||||
return EFI_ST_FAILURE;
|
||||
}
|
||||
if (net->mode && net->mode->media_present_supported &&
|
||||
!net->mode->media_present) {
|
||||
efi_st_error("Network media is not connected");
|
||||
return EFI_ST_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Send DHCP discover message
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user