]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OptionRomPkg/UndiRuntimeDxe/Init.c
Update the structure of EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL, PXE_HW_UNDI, PXE_S...
[mirror_edk2.git] / OptionRomPkg / UndiRuntimeDxe / Init.c
index 3d0a3de5cb3fe14577dbcc8239306d7737a0a090..9410fe167a48dcb508157452144e8a71f6392056 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Initialization functions for EFI UNDI32 driver.\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -64,7 +64,7 @@ UndiNotifyVirtual (
     //\r
     // UNDI32DeviceList is an array of pointers\r
     //\r
-    for (Index = 0; Index < pxe_31->IFcnt; Index++) {\r
+    for (Index = 0; Index < (pxe_31->IFcnt | pxe_31->IFcntExt << 8); Index++) {\r
       UNDI32DeviceList[Index]->NIIProtocol_31.Id = (UINT64) (UINTN) Pxe31Pointer;\r
       EfiConvertPointer (\r
         EFI_OPTIONAL_PTR,\r
@@ -409,7 +409,7 @@ UndiDriverStart (
   // the IfNum index for the current interface will be the total number\r
   // of interfaces initialized so far\r
   //\r
-  UNDI32Device->NIIProtocol_31.IfNum  = pxe_31->IFcnt;\r
+  UNDI32Device->NIIProtocol_31.IfNum  = pxe_31->IFcnt | pxe_31->IFcntExt << 8;\r
 \r
   PxeUpdate (&UNDI32Device->NicInfo, pxe_31);\r
 \r
@@ -470,7 +470,7 @@ UndiDriverStart (
     goto UndiErrorDeleteDevicePath;\r
   }\r
 \r
-  Len = (pxe_31->IFcnt * sizeof (UndiDataPointer->NII_entry)) + sizeof (UndiDataPointer);\r
+  Len = ((pxe_31->IFcnt|pxe_31->IFcntExt << 8)* sizeof (UndiDataPointer->NII_entry)) + sizeof (UndiDataPointer);\r
   Status = gBS->AllocatePool (EfiRuntimeServicesData, Len, (VOID **) &UndiDataPointer);\r
 \r
   if (EFI_ERROR (Status)) {\r
@@ -949,10 +949,10 @@ InstallConfigTable (
 \r
   UndiData = (UNDI_CONFIG_TABLE *)UndiDataPointer;\r
 \r
-  UndiData->NumberOfInterfaces  = pxe_31->IFcnt;\r
+  UndiData->NumberOfInterfaces  = (pxe_31->IFcnt | pxe_31->IFcntExt << 8);\r
   UndiData->nextlink            = NULL;\r
 \r
-  for (Index = 0; Index < pxe_31->IFcnt; Index++) {\r
+  for (Index = 0; Index < (pxe_31->IFcnt | pxe_31->IFcntExt << 8); Index++) {\r
     UndiData->NII_entry[Index].NII_InterfacePointer = &UNDI32DeviceList[Index]->NIIProtocol_31;\r
     UndiData->NII_entry[Index].DevicePathPointer    = UNDI32DeviceList[Index]->Undi32DevPath;\r
   }\r