Revision: 18030
          http://sourceforge.net/p/edk2/code/18030
Author:   jljusten
Date:     2015-07-26 07:38:06 +0000 (Sun, 26 Jul 2015)
Log Message:
-----------
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 <[email protected]>
Cc: Leif Lindholm <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <[email protected]>
Reviewed-by: Olivier Martin <[email protected]>

Modified Paths:
--------------
    trunk/edk2/ArmPlatformPkg/Bds/BootOptionSupport.c

Modified: trunk/edk2/ArmPlatformPkg/Bds/BootOptionSupport.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/Bds/BootOptionSupport.c   2015-07-26 07:38:01 UTC 
(rev 18029)
+++ trunk/edk2/ArmPlatformPkg/Bds/BootOptionSupport.c   2015-07-26 07:38:06 UTC 
(rev 18030)
@@ -667,7 +667,7 @@
       // 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]);


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to