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:
@ -755,7 +755,7 @@ Ping6CreateIpInstance (
|
||||
UINTN HandleNum;
|
||||
EFI_HANDLE *HandleBuffer;
|
||||
BOOLEAN UnspecifiedSrc;
|
||||
BOOLEAN MediaPresent;
|
||||
EFI_STATUS MediaStatus;
|
||||
EFI_SERVICE_BINDING_PROTOCOL *Ip6Sb;
|
||||
EFI_IP6_CONFIG_PROTOCOL *Ip6Cfg;
|
||||
EFI_IP6_CONFIG_DATA Ip6Config;
|
||||
@ -766,7 +766,7 @@ Ping6CreateIpInstance (
|
||||
|
||||
HandleBuffer = NULL;
|
||||
UnspecifiedSrc = FALSE;
|
||||
MediaPresent = TRUE;
|
||||
MediaStatus = EFI_SUCCESS
|
||||
Ip6Sb = NULL;
|
||||
IfInfo = NULL;
|
||||
IfInfoSize = 0;
|
||||
@ -814,8 +814,8 @@ Ping6CreateIpInstance (
|
||||
//
|
||||
// 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