mirror of https://github.com/acidanthera/audk.git
1.fixed some issue to pass HII sct
2.supported more route table accessed by HII service. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8338 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
6e3f5b2aa9
commit
391a0724f2
|
@ -345,6 +345,13 @@ Ip4DeviceExtractConfig (
|
|||
|
||||
*Progress = Request;
|
||||
|
||||
//
|
||||
// Check Request data in <ConfigHdr>.
|
||||
//
|
||||
if (!HiiIsConfigHdrMatch (Request, &gEfiNicIp4ConfigVariableGuid, EFI_NIC_IP4_CONFIG_VARIABLE)) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
Private = IP4CONFIG_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK (This);
|
||||
Ip4ConfigInstance = IP4_CONFIG_INSTANCE_FROM_IP4FORM_CALLBACK_INFO (Private);
|
||||
|
||||
|
@ -372,7 +379,6 @@ Ip4DeviceExtractConfig (
|
|||
Progress
|
||||
);
|
||||
|
||||
*Progress = Request + StrLen (Request);
|
||||
FreePool (IfrDeviceNvData);
|
||||
|
||||
return Status;
|
||||
|
@ -422,6 +428,7 @@ Ip4DeviceRouteConfig (
|
|||
EFI_STATUS Status;
|
||||
UINTN BufferSize;
|
||||
NIC_IP4_CONFIG_INFO *IfrDeviceNvData;
|
||||
NIC_IP4_CONFIG_INFO *NicInfo;
|
||||
IP4_FORM_CALLBACK_INFO *Private;
|
||||
EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;
|
||||
IP4_CONFIG_INSTANCE *Ip4ConfigInstance;
|
||||
|
@ -433,6 +440,13 @@ Ip4DeviceRouteConfig (
|
|||
|
||||
*Progress = Configuration;
|
||||
|
||||
//
|
||||
// Check Routing data in <ConfigHdr>.
|
||||
//
|
||||
if (!HiiIsConfigHdrMatch (Configuration, &gEfiNicIp4ConfigVariableGuid, EFI_NIC_IP4_CONFIG_VARIABLE)) {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
Private = IP4CONFIG_FORM_CALLBACK_INFO_FROM_FORM_CALLBACK (This);
|
||||
Ip4ConfigInstance = IP4_CONFIG_INSTANCE_FROM_IP4FORM_CALLBACK_INFO (Private);
|
||||
|
||||
|
@ -456,13 +470,14 @@ Ip4DeviceRouteConfig (
|
|||
if (!EFI_ERROR (Status)) {
|
||||
ZeroMem (&ZeroMac, sizeof (EFI_MAC_ADDRESS));
|
||||
if (CompareMem (&IfrDeviceNvData->NicAddr.MacAddr, &ZeroMac, IfrDeviceNvData->NicAddr.Len) != 0) {
|
||||
Status = EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, IfrDeviceNvData, TRUE);
|
||||
BufferSize = sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * IfrDeviceNvData->Ip4Info.RouteTableSize;
|
||||
NicInfo = AllocateCopyPool (BufferSize, IfrDeviceNvData);
|
||||
Status = EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, NicInfo, TRUE);
|
||||
} else {
|
||||
Status = EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, NULL, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
*Progress = Configuration + StrLen (Configuration);
|
||||
FreePool (IfrDeviceNvData);
|
||||
return Status;
|
||||
|
||||
|
@ -539,6 +554,7 @@ Ip4FormExtractConfig (
|
|||
OUT EFI_STRING *Results
|
||||
)
|
||||
{
|
||||
*Progress = Request;
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
extern UINT8 Ip4ConfigDxeBin[];
|
||||
extern UINT8 Ip4ConfigDxeStrings[];
|
||||
|
||||
#define NIC_ITEM_CONFIG_SIZE sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * 2
|
||||
#define NIC_ITEM_CONFIG_SIZE sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * MAX_IP4_CONFIG_IN_VARIABLE
|
||||
|
||||
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue