mirror of https://github.com/acidanthera/audk.git
Consume the UNDI_CONFIG_TABLE defined in MdePkg and remove the local definition of NII_TABLE.
Signed-off-by: vanjeff Reviewed-by: mdkinney git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12561 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
cb55fa3862
commit
c1ff10ec05
|
@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
|
||||
PXE_SW_UNDI *pxe_31 = NULL; // 3.1 entry
|
||||
UNDI32_DEV *UNDI32DeviceList[MAX_NIC_INTERFACES];
|
||||
NII_TABLE *UndiDataPointer = NULL;
|
||||
UNDI_CONFIG_TABLE *UndiDataPointer = NULL;
|
||||
|
||||
//
|
||||
// UNDI Class Driver Global Variables
|
||||
|
@ -470,7 +470,7 @@ UndiDriverStart (
|
|||
goto UndiErrorDeleteDevicePath;
|
||||
}
|
||||
|
||||
Len = (pxe_31->IFcnt * sizeof (NII_ENTRY)) + sizeof (UndiDataPointer);
|
||||
Len = (pxe_31->IFcnt * sizeof (UndiDataPointer->NII_entry)) + sizeof (UndiDataPointer);
|
||||
Status = gBS->AllocatePool (EfiRuntimeServicesData, Len, (VOID **) &UndiDataPointer);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
|
@ -935,9 +935,9 @@ InstallConfigTable (
|
|||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_CONFIGURATION_TABLE *CfgPtr;
|
||||
NII_TABLE *TmpData;
|
||||
UNDI_CONFIG_TABLE *TmpData;
|
||||
UINT16 Index;
|
||||
NII_TABLE *UndiData;
|
||||
UNDI_CONFIG_TABLE *UndiData;
|
||||
|
||||
if (pxe_31 == NULL) {
|
||||
return EFI_SUCCESS;
|
||||
|
@ -947,14 +947,14 @@ InstallConfigTable (
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
UndiData = (NII_TABLE *)UndiDataPointer;
|
||||
UndiData = (UNDI_CONFIG_TABLE *)UndiDataPointer;
|
||||
|
||||
UndiData->NumEntries = pxe_31->IFcnt;
|
||||
UndiData->NextLink = NULL;
|
||||
UndiData->NumberOfInterfaces = pxe_31->IFcnt;
|
||||
UndiData->nextlink = NULL;
|
||||
|
||||
for (Index = 0; Index < pxe_31->IFcnt; Index++) {
|
||||
UndiData->NiiEntry[Index].InterfacePointer = &UNDI32DeviceList[Index]->NIIProtocol_31;
|
||||
UndiData->NiiEntry[Index].DevicePathPointer = UNDI32DeviceList[Index]->Undi32DevPath;
|
||||
UndiData->NII_entry[Index].NII_InterfacePointer = &UNDI32DeviceList[Index]->NIIProtocol_31;
|
||||
UndiData->NII_entry[Index].DevicePathPointer = UNDI32DeviceList[Index]->Undi32DevPath;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -975,21 +975,21 @@ InstallConfigTable (
|
|||
}
|
||||
|
||||
if (Index < gST->NumberOfTableEntries) {
|
||||
TmpData = (NII_TABLE *) CfgPtr->VendorTable;
|
||||
TmpData = (UNDI_CONFIG_TABLE *) CfgPtr->VendorTable;
|
||||
|
||||
//
|
||||
// go to the last link
|
||||
//
|
||||
while (TmpData->NextLink != NULL) {
|
||||
TmpData = TmpData->NextLink;
|
||||
while (TmpData->nextlink != NULL) {
|
||||
TmpData = TmpData->nextlink;
|
||||
}
|
||||
|
||||
TmpData->NextLink = UndiData;
|
||||
TmpData->nextlink = UndiData;
|
||||
|
||||
//
|
||||
// 1st one in chain
|
||||
//
|
||||
UndiData = (NII_TABLE *) CfgPtr->VendorTable;
|
||||
UndiData = (UNDI_CONFIG_TABLE *) CfgPtr->VendorTable;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @file
|
||||
EFI internal structures for the EFI UNDI driver.
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2011, 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
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@ -71,18 +71,6 @@ typedef struct {
|
|||
VOID (*api_ptr)();
|
||||
} UNDI_CALL_TABLE;
|
||||
|
||||
typedef struct {
|
||||
EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL *InterfacePointer;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePathPointer;
|
||||
} NII_ENTRY;
|
||||
|
||||
typedef struct NII_CONFIG_ENTRY {
|
||||
UINT32 NumEntries;
|
||||
UINT32 Reserved; // padding for alignment
|
||||
struct NII_CONFIG_ENTRY *NextLink;
|
||||
NII_ENTRY NiiEntry[1];
|
||||
} NII_TABLE;
|
||||
|
||||
typedef VOID (*ptr)(VOID);
|
||||
typedef VOID (*bsptr_30)(UINTN);
|
||||
typedef VOID (*virtphys_30)(UINT64, UINT64);
|
||||
|
|
Loading…
Reference in New Issue