mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 23:54:02 +02:00
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>
This commit is contained in:
parent
5d34573df9
commit
8a5ef41ebb
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
This EFI_DHCP6_PROTOCOL interface implementation.
|
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
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -76,6 +76,7 @@ EfiDhcp6Start (
|
|||||||
EFI_TPL OldTpl;
|
EFI_TPL OldTpl;
|
||||||
DHCP6_INSTANCE *Instance;
|
DHCP6_INSTANCE *Instance;
|
||||||
DHCP6_SERVICE *Service;
|
DHCP6_SERVICE *Service;
|
||||||
|
BOOLEAN MediaPresent;
|
||||||
|
|
||||||
if (This == NULL) {
|
if (This == NULL) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
@ -101,6 +102,17 @@ EfiDhcp6Start (
|
|||||||
}
|
}
|
||||||
|
|
||||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
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;
|
Instance->UdpSts = EFI_ALREADY_STARTED;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user