UINTN mNumberOfIScsiDevices = 0;\r
ISCSI_FORM_CALLBACK_INFO *mCallbackInfo;\r
\r
-NET_LIST_ENTRY mIScsiConfigFormList = {\r
+LIST_ENTRY mIScsiConfigFormList = {\r
&mIScsiConfigFormList,\r
&mIScsiConfigFormList\r
};\r
NULL\r
);\r
if (Status == EFI_BUFFER_TOO_SMALL) {\r
- DeviceList = (ISCSI_DEVICE_LIST *) NetAllocatePool (DataSize);\r
+ DeviceList = (ISCSI_DEVICE_LIST *) AllocatePool (DataSize);\r
\r
gRT->GetVariable (\r
L"iSCSIDeviceList",\r
// Swap the current MAC address entry with the one indexed by\r
// LastDeviceIndex.\r
//\r
- NetCopyMem (&TempMacInfo, CurMacInfo, sizeof (ISCSI_MAC_INFO));\r
- NetCopyMem (CurMacInfo, &DeviceList->MacInfo[LastDeviceIndex], sizeof (ISCSI_MAC_INFO));\r
- NetCopyMem (&DeviceList->MacInfo[LastDeviceIndex], &TempMacInfo, sizeof (ISCSI_MAC_INFO));\r
+ CopyMem (&TempMacInfo, CurMacInfo, sizeof (ISCSI_MAC_INFO));\r
+ CopyMem (CurMacInfo, &DeviceList->MacInfo[LastDeviceIndex], sizeof (ISCSI_MAC_INFO));\r
+ CopyMem (&DeviceList->MacInfo[LastDeviceIndex], &TempMacInfo, sizeof (ISCSI_MAC_INFO));\r
}\r
\r
LastDeviceIndex++;\r
gRT->SetVariable (MacString, &mIScsiCHAPAuthInfoGuid, 0, 0, NULL);\r
}\r
\r
- NetFreePool (DeviceList);\r
+ gBS->FreePool (DeviceList);\r
} else if (Status != EFI_NOT_FOUND) {\r
- NetFreePool (Handles);\r
+ gBS->FreePool (Handles);\r
return Status;\r
}\r
//\r
// Construct the new iSCSI device list.\r
//\r
DeviceListSize = sizeof (ISCSI_DEVICE_LIST) + (NumHandles - 1) * sizeof (ISCSI_MAC_INFO);\r
- DeviceList = (ISCSI_DEVICE_LIST *) NetAllocatePool (DeviceListSize);\r
+ DeviceList = (ISCSI_DEVICE_LIST *) AllocatePool (DeviceListSize);\r
DeviceList->NumDevice = (UINT8) NumHandles;\r
\r
for (Index = 0; Index < NumHandles; Index++) {\r
Mode = Snp->Mode;\r
\r
CurMacInfo = &DeviceList->MacInfo[Index];\r
- NetCopyMem (&CurMacInfo->Mac, &Mode->PermanentAddress, Mode->HwAddressSize);\r
+ CopyMem (&CurMacInfo->Mac, &Mode->PermanentAddress, Mode->HwAddressSize);\r
CurMacInfo->Len = (UINT8) Mode->HwAddressSize;\r
}\r
\r
DeviceList\r
);\r
\r
- NetFreePool (DeviceList);\r
+ gBS->FreePool (DeviceList);\r
\r
return Status;\r
}\r
--*/\r
{\r
UINT32 CurrentIndex;\r
- NET_LIST_ENTRY *Entry;\r
+ LIST_ENTRY *Entry;\r
ISCSI_CONFIG_FORM_ENTRY *ConfigFormEntry;\r
\r
CurrentIndex = 0;\r
Results,\r
Progress\r
);\r
- NetFreePool (IfrNvData);\r
+ gBS->FreePool (IfrNvData);\r
return Status;\r
}\r
\r
PopUpInvalidNotify (L"Invalid IP address!");\r
Status = EFI_INVALID_PARAMETER;\r
} else {\r
- NetCopyMem (&Private->Current->SessionConfigData.LocalIp, &HostIp.v4, sizeof (HostIp.v4));\r
+ CopyMem (&Private->Current->SessionConfigData.LocalIp, &HostIp.v4, sizeof (HostIp.v4));\r
}\r
\r
break;\r
PopUpInvalidNotify (L"Invalid Subnet Mask!");\r
Status = EFI_INVALID_PARAMETER;\r
} else {\r
- NetCopyMem (&Private->Current->SessionConfigData.SubnetMask, &SubnetMask.v4, sizeof (SubnetMask.v4));\r
+ CopyMem (&Private->Current->SessionConfigData.SubnetMask, &SubnetMask.v4, sizeof (SubnetMask.v4));\r
}\r
\r
break;\r
PopUpInvalidNotify (L"Invalid Gateway!");\r
Status = EFI_INVALID_PARAMETER;\r
} else {\r
- NetCopyMem (&Private->Current->SessionConfigData.Gateway, &Gateway.v4, sizeof (Gateway.v4));\r
+ CopyMem (&Private->Current->SessionConfigData.Gateway, &Gateway.v4, sizeof (Gateway.v4));\r
}\r
\r
break;\r
PopUpInvalidNotify (L"Invalid IP address!");\r
Status = EFI_INVALID_PARAMETER;\r
} else {\r
- NetCopyMem (&Private->Current->SessionConfigData.TargetIp, &HostIp.v4, sizeof (HostIp.v4));\r
+ CopyMem (&Private->Current->SessionConfigData.TargetIp, &HostIp.v4, sizeof (HostIp.v4));\r
}\r
\r
break;\r
if (EFI_ERROR (Status)) {\r
PopUpInvalidNotify (L"Invalid LUN string!");\r
} else {\r
- NetCopyMem (Private->Current->SessionConfigData.BootLun, &Lun, sizeof (Lun));\r
+ CopyMem (Private->Current->SessionConfigData.BootLun, &Lun, sizeof (Lun));\r
}\r
\r
break;\r
// deployed.\r
//\r
if (!Private->Current->SessionConfigData.InitiatorInfoFromDhcp) {\r
- NetCopyMem (&HostIp.v4, &Private->Current->SessionConfigData.LocalIp, sizeof (HostIp.v4));\r
- NetCopyMem (&SubnetMask.v4, &Private->Current->SessionConfigData.SubnetMask, sizeof (SubnetMask.v4));\r
- NetCopyMem (&Gateway.v4, &Private->Current->SessionConfigData.Gateway, sizeof (Gateway.v4));\r
+ CopyMem (&HostIp.v4, &Private->Current->SessionConfigData.LocalIp, sizeof (HostIp.v4));\r
+ CopyMem (&SubnetMask.v4, &Private->Current->SessionConfigData.SubnetMask, sizeof (SubnetMask.v4));\r
+ CopyMem (&Gateway.v4, &Private->Current->SessionConfigData.Gateway, sizeof (Gateway.v4));\r
\r
if ((Gateway.Addr[0] != 0)) {\r
if (SubnetMask.Addr[0] == 0) {\r
// Validate target configuration if DHCP isn't deployed.\r
//\r
if (!Private->Current->SessionConfigData.TargetInfoFromDhcp) {\r
- NetCopyMem (&HostIp.v4, &Private->Current->SessionConfigData.TargetIp, sizeof (HostIp.v4));\r
+ CopyMem (&HostIp.v4, &Private->Current->SessionConfigData.TargetIp, sizeof (HostIp.v4));\r
if (!Ip4IsUnicast (NTOHL (HostIp.Addr[0]), 0)) {\r
PopUpInvalidNotify (L"Target IP is invalid!");\r
Status = EFI_INVALID_PARAMETER;\r
Status = SetBrowserData (NULL, NULL, BufferSize, (UINT8 *) IfrNvData, NULL);\r
}\r
\r
- NetFreePool (IfrNvData);\r
+ gBS->FreePool (IfrNvData);\r
return Status;\r
}\r
\r
\r
--*/\r
{\r
- NET_LIST_ENTRY *Entry;\r
+ LIST_ENTRY *Entry;\r
ISCSI_CONFIG_FORM_ENTRY *ConfigFormEntry;\r
BOOLEAN EntryExisted;\r
EFI_STATUS Status;\r
//\r
// Add a new form.\r
//\r
- ConfigFormEntry = (ISCSI_CONFIG_FORM_ENTRY *) NetAllocateZeroPool (sizeof (ISCSI_CONFIG_FORM_ENTRY));\r
+ ConfigFormEntry = (ISCSI_CONFIG_FORM_ENTRY *) AllocateZeroPool (sizeof (ISCSI_CONFIG_FORM_ENTRY));\r
if (ConfigFormEntry == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
- NetListInit (&ConfigFormEntry->Link);\r
+ InitializeListHead (&ConfigFormEntry->Link);\r
ConfigFormEntry->Controller = Controller;\r
\r
//\r
&ConfigFormEntry->SessionConfigData\r
);\r
if (EFI_ERROR (Status)) {\r
- NetZeroMem (&ConfigFormEntry->SessionConfigData, sizeof (ConfigFormEntry->SessionConfigData));\r
+ ZeroMem (&ConfigFormEntry->SessionConfigData, sizeof (ConfigFormEntry->SessionConfigData));\r
}\r
//\r
// Get the CHAP authentication configuration data.\r
&ConfigFormEntry->AuthConfigData\r
);\r
if (EFI_ERROR (Status)) {\r
- NetZeroMem (&ConfigFormEntry->AuthConfigData, sizeof (ConfigFormEntry->AuthConfigData));\r
+ ZeroMem (&ConfigFormEntry->AuthConfigData, sizeof (ConfigFormEntry->AuthConfigData));\r
}\r
//\r
// Compose the Port string and create a new STRING_REF.\r
UnicodeSPrint (PortString, 128, L"Set the iSCSI parameters on port %s", ConfigFormEntry->MacString);\r
HiiLibNewString (mCallbackInfo->RegisteredHandle, &ConfigFormEntry->PortTitleHelpToken, PortString);\r
\r
- NetListInsertTail (&mIScsiConfigFormList, &ConfigFormEntry->Link);\r
+ InsertTailList (&mIScsiConfigFormList, &ConfigFormEntry->Link);\r
mNumberOfIScsiDevices++;\r
}\r
} else {\r
ASSERT (EntryExisted);\r
\r
mNumberOfIScsiDevices--;\r
- NetListRemoveEntry (&ConfigFormEntry->Link);\r
- NetFreePool (ConfigFormEntry);\r
+ RemoveEntryList (&ConfigFormEntry->Link);\r
+ gBS->FreePool (ConfigFormEntry);\r
}\r
//\r
// Allocate space for creation of Buffer\r
//\r
UpdateData.BufferSize = 0x1000;\r
- UpdateData.Data = NetAllocateZeroPool (0x1000);\r
+ UpdateData.Data = AllocateZeroPool (0x1000);\r
UpdateData.Offset = 0;\r
\r
FormIndex = 0;\r
&UpdateData\r
);\r
\r
- NetFreePool (UpdateData.Data);\r
+ gBS->FreePool (UpdateData.Data);\r
\r
return EFI_SUCCESS;\r
}\r
return Status;\r
}\r
\r
- CallbackInfo = (ISCSI_FORM_CALLBACK_INFO *) NetAllocatePool (sizeof (ISCSI_FORM_CALLBACK_INFO));\r
+ CallbackInfo = (ISCSI_FORM_CALLBACK_INFO *) AllocatePool (sizeof (ISCSI_FORM_CALLBACK_INFO));\r
if (CallbackInfo == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
CallbackInfo->DriverHandle,\r
&CallbackInfo->RegisteredHandle\r
);\r
- NetFreePool (PackageList);\r
+ gBS->FreePool (PackageList);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
{\r
ISCSI_CONFIG_FORM_ENTRY *ConfigFormEntry;\r
\r
- while (!NetListIsEmpty (&mIScsiConfigFormList)) {\r
+ while (!IsListEmpty (&mIScsiConfigFormList)) {\r
//\r
// Uninstall the device forms as the iSCSI driver instance may fail to\r
// control the controller but still install the device configuration form.\r
);\r
HiiLibDestroyHiiDriverHandle (mCallbackInfo->DriverHandle);\r
\r
- NetFreePool (mCallbackInfo);\r
+ gBS->FreePool (mCallbackInfo);\r
\r
return EFI_SUCCESS;\r
}\r