NetworkPkg/Dhcp6Dxe: Check Media status before starting DHCP process.
This patch is to resolve the issue reported @
https://bugzilla.tianocore.org/show_bug.cgi?id=804.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Karunakar P <karunakarp@amiindia.co.in>
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
(cherry picked from commit 8a5ef41ebb
)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
This EFI_DHCP6_PROTOCOL interface implementation.
|
||||
|
||||
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -76,6 +76,7 @@ EfiDhcp6Start (
|
||||
EFI_TPL OldTpl;
|
||||
DHCP6_INSTANCE *Instance;
|
||||
DHCP6_SERVICE *Service;
|
||||
BOOLEAN MediaPresent;
|
||||
|
||||
if (This == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
@@ -101,6 +102,17 @@ EfiDhcp6Start (
|
||||
}
|
||||
|
||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||
|
||||
//
|
||||
// Check Media Satus.
|
||||
//
|
||||
MediaPresent = TRUE;
|
||||
NetLibDetectMedia (Service->Controller, &MediaPresent);
|
||||
if (!MediaPresent) {
|
||||
Status = EFI_NO_MEDIA;
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
Instance->UdpSts = EFI_ALREADY_STARTED;
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user