ShellPkg: Update Api from NetLibDetectMedia to NetLibDetectMediaWaitTimeout.
Since new Api NetLibDetectMediaWaitTimeout was involved to support connecting state handling, and it is forward compatible. So apply this Api in ShellPkg. V2: *Define time period in a macro instead of hard code. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Signed-off-by: fanwang2 <fan.wang@intel.com>
This commit is contained in:
@ -966,7 +966,7 @@ PingCreateIpInstance (
|
||||
UINTN HandleNum;
|
||||
EFI_HANDLE *HandleBuffer;
|
||||
BOOLEAN UnspecifiedSrc;
|
||||
BOOLEAN MediaPresent;
|
||||
EFI_STATUS MediaStatus;
|
||||
EFI_SERVICE_BINDING_PROTOCOL *EfiSb;
|
||||
VOID *IpXCfg;
|
||||
EFI_IP6_CONFIG_DATA Ip6Config;
|
||||
@ -978,7 +978,7 @@ PingCreateIpInstance (
|
||||
|
||||
HandleBuffer = NULL;
|
||||
UnspecifiedSrc = FALSE;
|
||||
MediaPresent = TRUE;
|
||||
MediaStatus = EFI_SUCCESS;
|
||||
EfiSb = NULL;
|
||||
IpXInterfaceInfo = NULL;
|
||||
IfInfoSize = 0;
|
||||
@ -1035,8 +1035,8 @@ PingCreateIpInstance (
|
||||
//
|
||||
// Check media.
|
||||
//
|
||||
NetLibDetectMedia (HandleBuffer[HandleIndex], &MediaPresent);
|
||||
if (!MediaPresent) {
|
||||
NetLibDetectMediaWaitTimeout (HandleBuffer[HandleIndex], 0, &MediaStatus);
|
||||
if (MediaStatus != EFI_SUCCESS) {
|
||||
//
|
||||
// Skip this one.
|
||||
//
|
||||
|
Reference in New Issue
Block a user