diff options
author | Heyi Guo <heyi.guo@linaro.org> | 2015-07-16 11:27:05 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@Edk2> | 2015-07-16 11:27:05 +0000 |
commit | 387e7c15f5e3a047de0a7a5edb5700e90a1c6c78 (patch) | |
tree | d386af04c9df5c1e0473e3afd6a1f3912f3db9a8 /ArmPlatformPkg/Bds/BootOptionSupport.c | |
parent | ce65ab53d23211da6857191190cc09b08062dadd (diff) | |
download | edk2-platforms-387e7c15f5e3a047de0a7a5edb5700e90a1c6c78.tar.xz |
ArmPlatformPkg/Bds: Use HandleProtocol to get SNP instance
LocateProtocol only gets the 1st SNP instance and this will be wrong
in a system with multiple SNP instances installed. Use HandleProtocol
instead.
Cc: Olivier Martin <olivier.martin@arm.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18030 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds/BootOptionSupport.c')
-rw-r--r-- | ArmPlatformPkg/Bds/BootOptionSupport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Bds/BootOptionSupport.c b/ArmPlatformPkg/Bds/BootOptionSupport.c index f50f13f71d..27faf003c6 100644 --- a/ArmPlatformPkg/Bds/BootOptionSupport.c +++ b/ArmPlatformPkg/Bds/BootOptionSupport.c @@ -667,7 +667,7 @@ BdsLoadOptionPxeList ( // Allocate BDS Supported Device structure
SupportedDevice = (BDS_SUPPORTED_DEVICE*)AllocatePool(sizeof(BDS_SUPPORTED_DEVICE));
- Status = gBS->LocateProtocol (&gEfiSimpleNetworkProtocolGuid, NULL, (VOID **)&SimpleNet);
+ Status = gBS->HandleProtocol (HandleBuffer[Index], &gEfiSimpleNetworkProtocolGuid, (VOID **)&SimpleNet);
if (!EFI_ERROR(Status)) {
Mac = &SimpleNet->Mode->CurrentAddress;
UnicodeSPrint (DeviceDescription,BOOT_DEVICE_DESCRIPTION_MAX,L"MAC Address: %02x:%02x:%02x:%02x:%02x:%02x", Mac->Addr[0], Mac->Addr[1], Mac->Addr[2], Mac->Addr[3], Mac->Addr[4], Mac->Addr[5]);
|