UINT32 ResponseSize;\r
BOOLEAN ReturnBool;\r
\r
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));\r
\r
//\r
// IPMI callout to NetFn 2C, command 02\r
(ResponseData.CompletionCode == REDFISH_IPMI_COMP_CODE_BOOTSTRAP_CREDENTIAL_DISABLED)\r
))\r
{\r
- DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " Redfish Credentail Bootstrapping is supported\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " Redfish Credentail Bootstrapping is supported\n", __func__));\r
ReturnBool = TRUE;\r
} else {\r
- DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " Redfish Credentail Bootstrapping is not supported\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " Redfish Credentail Bootstrapping is not supported\n", __func__));\r
ReturnBool = FALSE;\r
}\r
\r
HOST_INTERFACE_BMC_USB_NIC_INFO *ThisInstance;\r
REDFISH_INTERFACE_DATA *InterfaceData;\r
\r
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));\r
\r
if (IsListEmpty (&mBmcUsbNic)) {\r
return EFI_NOT_FOUND;\r
UINT8 HostNameLength;\r
CHAR8 *HostNameString;\r
\r
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));\r
\r
if (IsListEmpty (&mBmcUsbNic) || (IndexOfProtocolData > 0)) {\r
return EFI_NOT_FOUND;\r
IPMI_LAN_VLAN_ID *LanVlanId;\r
EFI_USB_DEVICE_DESCRIPTOR UsbDeviceDescriptor;\r
\r
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));\r
\r
if (IsListEmpty (&mBmcUsbNic)) {\r
return EFI_NOT_FOUND;\r
EFI_MAC_ADDRESS IpmiLanChannelMacAddress;\r
BOOLEAN AlreadyCached;\r
\r
- DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));\r
\r
GetLanConfigReps = NULL;\r
AlreadyCached = FALSE;\r
EFI_DEVICE_PATH_PROTOCOL *ThisUsbDevicePath;\r
EFI_DEVICE_PATH_PROTOCOL *ThisUsbDevicePathEnd;\r
\r
- DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));\r
DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "Device path on the EFI handle which has UsbIo and SNP instaleld on it.\n"));\r
DevicePathStr = ConvertDevicePathToText (UsbDevicePath, FALSE, FALSE);\r
if (DevicePathStr != NULL) {\r
EFI_USB_IO_PROTOCOL *UsbIo;\r
HOST_INTERFACE_BMC_USB_NIC_INFO *BmcUsbNic;\r
\r
- DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));\r
Status = gBS->HandleProtocol (\r
Handle,\r
&gEfiSimpleNetworkProtocolGuid,\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- DEBUG ((DEBUG_INFO, "%a: Entry, #%d SNP handle\n", __FUNCTION__, HandleNumer));\r
+ DEBUG ((DEBUG_INFO, "%a: Entry, #%d SNP handle\n", __func__, HandleNumer));\r
\r
GotOneUsbNIc = FALSE;\r
for (Index = 0; Index < HandleNumer; Index++) {\r
(VOID **)&DevicePath\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, " Failed to locate SNP on %d handle.\n", __FUNCTION__, Index));\r
+ DEBUG ((DEBUG_ERROR, " Failed to locate SNP on %d handle.\n", __func__, Index));\r
continue;\r
}\r
\r
UINTN BufferSize;\r
EFI_HANDLE *HandleBuffer;\r
\r
- DEBUG ((DEBUG_INFO, "%a: Entry, the registration key - 0x%08x.\n", __FUNCTION__, Registration));\r
+ DEBUG ((DEBUG_INFO, "%a: Entry, the registration key - 0x%08x.\n", __func__, Registration));\r
\r
Handle = NULL;\r
Status = EFI_SUCCESS;\r
IN VOID *Context\r
)\r
{\r
- DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));\r
\r
CheckBmcUsbNic (mPlatformHostInterfaceSnpRegistration);\r
return;\r
{\r
EFI_STATUS Status;\r
\r
- DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));\r
\r
*InformationReadinessGuid = NULL;\r
InitializeListHead (&mBmcUsbNic);\r
}\r
\r
if (Status == EFI_NOT_FOUND) {\r
- DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "%a: BMC USB NIC is not found. Register the notification.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "%a: BMC USB NIC is not found. Register the notification.\n", __func__));\r
\r
// Register the notification of SNP installation.\r
Status = gBS->CreateEvent (\r
&mPlatformHostInterfaceSnpEvent\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to create event for the installation of SNP protocol.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to create event for the installation of SNP protocol.", __func__));\r
return Status;\r
}\r
\r
&mPlatformHostInterfaceSnpRegistration\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to register event for the installation of SNP protocol.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to register event for the installation of SNP protocol.", __func__));\r
return Status;\r
}\r
\r
return EFI_SUCCESS;\r
}\r
\r
- DEBUG ((DEBUG_ERROR, "%a: Something wrong when look for BMC USB NIC.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Something wrong when look for BMC USB NIC.\n", __func__));\r
return Status;\r
}\r
//\r
Status = SetBootstrapAccountCredentialsToVariable (NULL, NULL, TRUE);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: fail to remove bootstrap credential: %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: fail to remove bootstrap credential: %r\n", __func__, Status));\r
}\r
\r
- DEBUG ((DEBUG_INFO, "%a: bootstrap credential service stopped\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: bootstrap credential service stopped\n", __func__));\r
\r
return EFI_SUCCESS;\r
}\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- DEBUG ((DEBUG_VERBOSE, "%a: Disable bootstrap control: 0x%x\n", __FUNCTION__, DisableBootstrapControl));\r
+ DEBUG ((DEBUG_VERBOSE, "%a: Disable bootstrap control: 0x%x\n", __func__, DisableBootstrapControl));\r
\r
//\r
// IPMI callout to NetFn 2C, command 02\r
);\r
\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: IPMI transaction failure. Returning\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: IPMI transaction failure. Returning\n", __func__));\r
return Status;\r
} else {\r
if (ResponseData.CompletionCode != IPMI_COMP_CODE_NORMAL) {\r
if (ResponseData.CompletionCode == REDFISH_IPMI_COMP_CODE_BOOTSTRAP_CREDENTIAL_DISABLED) {\r
- DEBUG ((DEBUG_ERROR, "%a: bootstrap credential support was disabled\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: bootstrap credential support was disabled\n", __func__));\r
return EFI_ACCESS_DENIED;\r
}\r
\r
- DEBUG ((DEBUG_ERROR, "%a: Completion code = 0x%x. Returning\n", __FUNCTION__, ResponseData.CompletionCode));\r
+ DEBUG ((DEBUG_ERROR, "%a: Completion code = 0x%x. Returning\n", __func__, ResponseData.CompletionCode));\r
return EFI_PROTOCOL_ERROR;\r
} else if (ResponseData.GroupExtensionId != REDFISH_IPMI_GROUP_EXTENSION) {\r
- DEBUG ((DEBUG_ERROR, "%a: Group Extension Response = 0x%x. Returning\n", __FUNCTION__, ResponseData.GroupExtensionId));\r
+ DEBUG ((DEBUG_ERROR, "%a: Group Extension Response = 0x%x. Returning\n", __func__, ResponseData.GroupExtensionId));\r
return EFI_DEVICE_ERROR;\r
} else {\r
if (BootstrapUsername != NULL) {\r
}\r
}\r
\r
- DEBUG ((DEBUG_INFO, "%a: get bootstrap credential via IPMI: %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_INFO, "%a: get bootstrap credential via IPMI: %r\n", __func__, Status));\r
\r
return Status;\r
}\r
}\r
\r
if (DataSize != sizeof (BOOTSTRAP_CREDENTIALS_VARIABLE)) {\r
- DEBUG ((DEBUG_ERROR, "%a: data corruption. returned size: %d != structure size: %d\n", __FUNCTION__, DataSize, sizeof (BOOTSTRAP_CREDENTIALS_VARIABLE)));\r
+ DEBUG ((DEBUG_ERROR, "%a: data corruption. returned size: %d != structure size: %d\n", __func__, DataSize, sizeof (BOOTSTRAP_CREDENTIALS_VARIABLE)));\r
FreePool (Data);\r
return EFI_NOT_FOUND;\r
}\r
\r
FreePool (Data);\r
\r
- DEBUG ((DEBUG_INFO, "%a: get bootstrap credential from variable\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: get bootstrap credential from variable\n", __func__));\r
\r
return EFI_SUCCESS;\r
}\r
DisableCredentialService = PcdGetBool (PcdRedfishDisableBootstrapCredentialService);\r
\r
if (mRedfishServiceStopped) {\r
- DEBUG ((DEBUG_ERROR, "%a: credential service is stopped due to security reason\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: credential service is stopped due to security reason\n", __func__));\r
return EFI_ACCESS_DENIED;\r
}\r
\r
//\r
Status = GetBootstrapAccountCredentials (DisableCredentialService, *UserId, USERNAME_MAX_SIZE, *Password, PASSWORD_MAX_SIZE);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: fail to get bootstrap credential: %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: fail to get bootstrap credential: %r\n", __func__, Status));\r
return Status;\r
}\r
\r
if (DisableCredentialService) {\r
- DEBUG ((DEBUG_INFO, "%a: credential bootstrapping control disabled\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: credential bootstrapping control disabled\n", __func__));\r
}\r
\r
Status = SetBootstrapAccountCredentialsToVariable (*UserId, *Password, FALSE);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: fail to cache bootstrap credential: %r\n", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: fail to cache bootstrap credential: %r\n", __func__, Status));\r
}\r
\r
return EFI_SUCCESS;\r
}\r
}\r
\r
- DEBUG ((DEBUG_INFO, "%a: This Odata type is not in the list.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: This Odata type is not in the list.\n", __func__));\r
return FALSE;\r
}\r
\r
//\r
Status = DecodeResponseContent (ContentEncodedHeader->FieldValue, &ResponseMsg.Body, &ResponseMsg.BodyLength);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Failed to decompress the response content %r\n.", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: Failed to decompress the response content %r\n.", __func__, Status));\r
ret = NULL;\r
goto ON_EXIT;\r
}\r
//\r
Status = EncodeRequestContent ((CHAR8 *)HTTP_CONTENT_ENCODING_GZIP, (CHAR8 *)content, (VOID **)&EncodedContent, &EncodedContentLen);\r
if (Status == EFI_INVALID_PARAMETER) {\r
- DEBUG ((DEBUG_ERROR, "%a: Error to encode content.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Error to encode content.\n", __func__));\r
ret = NULL;\r
goto ON_EXIT;\r
} else if (Status == EFI_UNSUPPORTED) {\r
//\r
Status = gBS->LocateProtocol (&gEdkIIRedfishCredentialProtocolGuid, NULL, (VOID **)&gCredential);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_INFO, "%a: No Redfish Credential Protocol is installed on system.", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: No Redfish Credential Protocol is installed on system.", __func__));\r
return Status;\r
}\r
\r
&gEndOfDxeEvent\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to register End Of DXE event.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to register End Of DXE event.", __func__));\r
return Status;\r
}\r
\r
if (EFI_ERROR (Status)) {\r
gBS->CloseEvent (gEndOfDxeEvent);\r
gEndOfDxeEvent = NULL;\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to register Exit Boot Service event.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to register Exit Boot Service event.", __func__));\r
return Status;\r
}\r
\r
EFI_REDFISH_DISCOVER_NETWORK_INTERFACE *ThisNetworkInterface;\r
EFI_REDFISH_DISCOVERED_TOKEN *ThisRedfishDiscoveredToken;\r
\r
- DEBUG ((DEBUG_INFO, "%a: New network interface is installed on system by EFI Redfish discover driver.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: New network interface is installed on system by EFI Redfish discover driver.\n", __func__));\r
\r
BufferSize = sizeof (EFI_HANDLE);\r
Status = gBS->LocateHandle (\r
&HandleBuffer\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Can't locate handle with EFI_REDFISH_DISCOVER_PROTOCOL installed.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Can't locate handle with EFI_REDFISH_DISCOVER_PROTOCOL installed.\n", __func__));\r
}\r
\r
gRedfishDiscoverActivated = TRUE;\r
if (EFI_ERROR (Status)) {\r
gEfiRedfishDiscoverProtocol = NULL;\r
gRedfishDiscoverActivated = FALSE;\r
- DEBUG ((DEBUG_ERROR, "%a: Can't locate EFI_REDFISH_DISCOVER_PROTOCOL.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Can't locate EFI_REDFISH_DISCOVER_PROTOCOL.\n", __func__));\r
return;\r
}\r
}\r
&gNetworkInterfaceInstances\r
);\r
if (EFI_ERROR (Status) || (gNumberOfNetworkInterfaces == 0)) {\r
- DEBUG ((DEBUG_ERROR, "%a: No network interfaces found on the handle.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: No network interfaces found on the handle.\n", __func__));\r
return;\r
}\r
\r
gRedfishDiscoveredToken = AllocateZeroPool (gNumberOfNetworkInterfaces * sizeof (EFI_REDFISH_DISCOVERED_TOKEN));\r
if (gRedfishDiscoveredToken == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a: Not enough memory for EFI_REDFISH_DISCOVERED_TOKEN.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Not enough memory for EFI_REDFISH_DISCOVERED_TOKEN.\n", __func__));\r
return;\r
}\r
\r
&ThisRedfishDiscoveredToken->Event\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Failed to create event for Redfish discovered token.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Failed to create event for Redfish discovered token.\n", __func__));\r
goto ErrorReturn;\r
}\r
\r
}\r
\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Acquire Redfish service fail.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Acquire Redfish service fail.\n", __func__));\r
goto ErrorReturn;\r
}\r
\r
&gEfiRedfishDiscoverProtocolEvent\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to create event for the installation of EFI_REDFISH_DISCOVER_PROTOCOL.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to create event for the installation of EFI_REDFISH_DISCOVER_PROTOCOL.", __func__));\r
return Status;\r
}\r
\r
&gEfiRedfishDiscoverRegistration\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to register event for the installation of EFI_REDFISH_DISCOVER_PROTOCOL.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to register event for the installation of EFI_REDFISH_DISCOVER_PROTOCOL.", __func__));\r
return Status;\r
}\r
\r
gExitBootServiceEvent = NULL;\r
gBS->CloseEvent (gEfiRedfishDiscoverProtocolEvent);\r
gEfiRedfishDiscoverProtocolEvent = NULL;\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI Binding Protocol of EFI Redfish Config driver.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI Binding Protocol of EFI Redfish Config driver.", __func__));\r
return Status;\r
}\r
\r
Tcp4Option.EnableNagle = TRUE;\r
Status = Tcp4->Configure (Tcp4, &Tcp4CfgData);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Can't get subnet information\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Can't get subnet information\n", __func__));\r
return Status;\r
}\r
\r
Status = Tcp4->GetModeData (Tcp4, NULL, NULL, &IpModedata, NULL, NULL);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n", __func__));\r
return Status;\r
}\r
\r
ZeroMem ((VOID *)&IpModedata, sizeof (EFI_IP6_MODE_DATA));\r
Status = Tcp6->GetModeData (Tcp6, NULL, NULL, &IpModedata, NULL, NULL);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n", __func__));\r
return Status;\r
}\r
\r
if (IpModedata.AddressCount == 0) {\r
- DEBUG ((DEBUG_INFO, "%a: No IPv6 address configured.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: No IPv6 address configured.\n", __func__));\r
Instance->SubnetAddrInfoIPv6Number = 0;\r
return EFI_SUCCESS;\r
}\r
\r
Instance->SubnetAddrInfoIPv6 = AllocateZeroPool (IpModedata.AddressCount * sizeof (EFI_IP6_ADDRESS_INFO));\r
if (Instance->SubnetAddrInfoIPv6 == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a: Failed to allocate memory for IPv6 subnet address information\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Failed to allocate memory for IPv6 subnet address information\n", __func__));\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
IP4_COPY_ADDRESS ((VOID *)&Instance->HostSubnetMask.v4, (VOID *)Data->HostIpMask);\r
\r
if (EFI_IP4_EQUAL (&Instance->HostIpAddress.v4, &mZeroIp4Addr)) {\r
- DEBUG ((DEBUG_ERROR, "%a: invalid host IP address: zero address\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: invalid host IP address: zero address\n", __func__));\r
//\r
// Invalid IP address detected. Change address format to Unknown and use system default address.\r
//\r
}\r
\r
if (!IP4_IS_VALID_NETMASK (EFI_IP4 (Instance->HostSubnetMask.v4))) {\r
- DEBUG ((DEBUG_ERROR, "%a: invalid subnet mask address\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: invalid subnet mask address\n", __func__));\r
//\r
// Invalid subnet mast address detected. Change address format to Unknown and use system default address.\r
//\r
IP4_COPY_ADDRESS ((VOID *)&Instance->TargetIpAddress.v4, (VOID *)Data->RedfishServiceIpAddress);\r
\r
if (EFI_IP4_EQUAL (&Instance->TargetIpAddress.v4, &mZeroIp4Addr)) {\r
- DEBUG ((DEBUG_ERROR, "%a: invalid service IP address: zero address\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: invalid service IP address: zero address\n", __func__));\r
}\r
} else {\r
IP6_COPY_ADDRESS ((VOID *)&Instance->TargetIpAddress.v6, (VOID *)Data->RedfishServiceIpAddress);\r
}\r
\r
if (Instance->HostIntfValidation) {\r
- DEBUG ((DEBUG_ERROR, "%a:Send UPnP unicast SSDP to validate this Redfish Host Interface is not supported.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a:Send UPnP unicast SSDP to validate this Redfish Host Interface is not supported.\n", __func__));\r
Status = EFI_UNSUPPORTED;\r
} else {\r
//\r
RestExOpened = FALSE;\r
DeleteRestEx = FALSE;\r
\r
- DEBUG ((DEBUG_INFO, "%a:Add this instance to Redfish instance list.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a:Add this instance to Redfish instance list.\n", __func__));\r
\r
if (Uuid != NULL) {\r
Char16Uuid = (CHAR16 *)AllocateZeroPool (AsciiStrSize ((const CHAR8 *)Uuid) * sizeof (CHAR16));\r
if (!InfoRefresh) {\r
Status = CreateRestExInstance (Instance, Instance->DiscoverToken); // Create REST EX child.\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a:Can't create REST EX child instance.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a:Can't create REST EX child instance.\n", __func__));\r
goto ON_EXIT;\r
}\r
\r
(EFI_REST_EX_CONFIG_DATA)(UINT8 *)RestExHttpConfigData\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a:REST EX configured..\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a:REST EX configured..\n", __func__));\r
DeleteRestEx = TRUE;\r
goto EXIT_FREE_ALL;\r
}\r
\r
Status = gBS->SignalEvent (Instance->DiscoverToken->Event);\r
if (!EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a:No event to signal!\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a:No event to signal!\n", __func__));\r
}\r
}\r
\r
Instance\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a:Failed to get Subnet infomation.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a:Failed to get Subnet infomation.\n", __func__));\r
return Status;\r
} else {\r
- DEBUG ((DEBUG_INFO, "%a:MAC address: %s\n", __FUNCTION__, Instance->StrMacAddr));\r
+ DEBUG ((DEBUG_INFO, "%a:MAC address: %s\n", __func__, Instance->StrMacAddr));\r
if (CheckIsIpVersion6 (Instance)) {\r
if (Instance->SubnetAddrInfoIPv6Number == 0) {\r
- DEBUG ((DEBUG_ERROR, "%a: There is no Subnet infomation for IPv6 network interface.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: There is no Subnet infomation for IPv6 network interface.\n", __func__));\r
return EFI_NOT_FOUND;\r
}\r
\r
UINTN NetworkInterfacesIndex;\r
EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL *TargetNetworkInterfaceInternal;\r
\r
- DEBUG ((DEBUG_INFO, "%a:Entry.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a:Entry.\n", __func__));\r
\r
//\r
// Validate parameters.\r
//\r
if ((ImageHandle == NULL) || (Token == NULL) || ((Flags & ~EFI_REDFISH_DISCOVER_VALIDATION) == 0)) {\r
- DEBUG ((DEBUG_ERROR, "%a:Invalid parameters.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a:Invalid parameters.\n", __func__));\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
TargetNetworkInterfaceInternal = (EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL *)GetFirstNode (&mEfiRedfishDiscoverNetworkInterface);\r
NumNetworkInterfaces = NumberOfNetworkInterface ();\r
if (NumNetworkInterfaces == 0) {\r
- DEBUG ((DEBUG_ERROR, "%a:No network interface on platform.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a:No network interface on platform.\n", __func__));\r
return EFI_UNSUPPORTED;\r
}\r
}\r
NewInstance = FALSE;\r
Instance = GetInstanceByOwner (ImageHandle, TargetNetworkInterfaceInternal, Flags & ~EFI_REDFISH_DISCOVER_VALIDATION); // Check if we can re-use previous instance.\r
if (Instance == NULL) {\r
- DEBUG ((DEBUG_INFO, "%a:Create new EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a:Create new EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE.\n", __func__));\r
Instance = (EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE *)AllocateZeroPool (sizeof (EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE));\r
if (Instance == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a:Memory allocation fail.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a:Memory allocation fail.\n", __func__));\r
}\r
\r
InitializeListHead (&Instance->Entry);\r
}\r
\r
if (TargetNetworkInterfaceInternal->StrMacAddr != NULL) {\r
- DEBUG ((DEBUG_INFO, "%a:Acquire Redfish service on network interface MAC address:%s.\n", __FUNCTION__, TargetNetworkInterfaceInternal->StrMacAddr));\r
+ DEBUG ((DEBUG_INFO, "%a:Acquire Redfish service on network interface MAC address:%s.\n", __func__, TargetNetworkInterfaceInternal->StrMacAddr));\r
} else {\r
- DEBUG ((DEBUG_INFO, "%a:WARNING: No MAC address on this network interface.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a:WARNING: No MAC address on this network interface.\n", __func__));\r
}\r
\r
Instance->DiscoverToken = Token; // Always use the latest Token passed by caller.\r
if ((Flags & EFI_REDFISH_DISCOVER_HOST_INTERFACE) != 0) {\r
- DEBUG ((DEBUG_INFO, "%a:Redfish HOST interface discovery.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a:Redfish HOST interface discovery.\n", __func__));\r
Instance->HostIntfValidation = FALSE;\r
if ((Flags & EFI_REDFISH_DISCOVER_VALIDATION) != 0) {\r
Instance->HostIntfValidation = TRUE;\r
}\r
\r
if ((Flags & EFI_REDFISH_DISCOVER_SSDP) != 0) {\r
- DEBUG ((DEBUG_ERROR, "%a:Redfish service discovery through SSDP is not supported\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a:Redfish service discovery through SSDP is not supported\n", __func__));\r
return EFI_UNSUPPORTED;\r
} else {\r
if (EFI_ERROR (Status1) && EFI_ERROR (Status2)) {\r
FreePool ((VOID *)Instance);\r
- DEBUG ((DEBUG_ERROR, "%a:Something wrong on Redfish service discovery Status1=%x, Status2=%x.\n", __FUNCTION__, Status1, Status2));\r
+ DEBUG ((DEBUG_ERROR, "%a:Something wrong on Redfish service discovery Status1=%x, Status2=%x.\n", __func__, Status1, Status2));\r
} else {\r
if (NewInstance) {\r
InsertTailList (&mRedfishDiscoverList, &Instance->Entry);\r
EFI_REDFISH_DISCOVERED_INTERNAL_LIST *DiscoveredRedfishInstance;\r
\r
if (IsListEmpty (&mRedfishInstanceList)) {\r
- DEBUG ((DEBUG_ERROR, "%a:No any discovered Redfish service.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a:No any discovered Redfish service.\n", __func__));\r
return EFI_NOT_FOUND;\r
}\r
\r
);\r
if (EFI_ERROR (Status)) {\r
if (Index == ListCount - 1) {\r
- DEBUG ((DEBUG_ERROR, "%a: all required protocols are found on this controller handle: %p.\n", __FUNCTION__, ControllerHandle));\r
+ DEBUG ((DEBUG_ERROR, "%a: all required protocols are found on this controller handle: %p.\n", __func__, ControllerHandle));\r
return EFI_SUCCESS;\r
}\r
}\r
if (!NewNetworkInterfaceInstalled) {\r
NetworkInterface = GetTargetNetworkInterfaceInternalByController (ControllerHandle);\r
if (NetworkInterface == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a: Can't find network interface by ControllerHandle\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Can't find network interface by ControllerHandle\n", __func__));\r
return Status;\r
}\r
}\r
(VOID *)&mRedfishDiscover\r
);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI_REDFISH_DISCOVER_PROTOCOL\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI_REDFISH_DISCOVER_PROTOCOL\n", __func__));\r
}\r
} else {\r
- DEBUG ((DEBUG_INFO, "%a: Not REST EX, continue with next\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Not REST EX, continue with next\n", __func__));\r
Index++;\r
if (Index == (sizeof (gRequiredProtocol) / sizeof (REDFISH_DISCOVER_REQUIRED_PROTOCOL))) {\r
break;\r
Status = RedfishPlatformHostInterfaceDeviceDescriptor (&DeviceType, &DeviceDescriptor);\r
if (EFI_ERROR (Status)) {\r
if (Status == EFI_NOT_FOUND) {\r
- DEBUG ((DEBUG_ERROR, "%a: No Redfish host interface descriptor is provided on this platform.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: No Redfish host interface descriptor is provided on this platform.", __func__));\r
return EFI_NOT_FOUND;\r
}\r
\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to get device descriptor, %r.", __FUNCTION__, Status));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to get device descriptor, %r.", __func__, Status));\r
return Status;\r
}\r
\r
(DeviceType != REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2)\r
)\r
{\r
- DEBUG ((DEBUG_ERROR, "%a: Only support either protocol type 04h or 05h as Redfish host interface.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Only support either protocol type 04h or 05h as Redfish host interface.", __func__));\r
return EFI_UNSUPPORTED;\r
}\r
\r
}\r
\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to get Redfish host interafce protocol type data.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to get Redfish host interafce protocol type data.", __func__));\r
if (ProtocolRecords != NULL) {\r
FreePool (ProtocolRecords);\r
}\r
} else {\r
NewProtocolRecords = ReallocatePool (CurrentProtocolsDataLength, NewProtocolsDataLength, (VOID *)ProtocolRecords);\r
if (NewProtocolRecords == NULL) {\r
- DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish host interface protocol data.", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish host interface protocol data.", __func__));\r
FreePool (ProtocolRecords);\r
FreePool (ProtocolRecord);\r
return EFI_OUT_OF_RESOURCES;\r
IN VOID *Context\r
)\r
{\r
- DEBUG ((DEBUG_INFO, "%a: Platform Redfish Host Interface informtion is ready\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Platform Redfish Host Interface informtion is ready\n", __func__));\r
\r
RedfishCreateSmbiosTable42 ();\r
\r
EFI_STATUS Status;\r
EFI_GUID *ReadyGuid;\r
\r
- DEBUG ((DEBUG_INFO, "%a: Entry\n.", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: Entry\n.", __func__));\r
\r
//\r
// Check if the Redfish Host Interface depends on\r
{\r
EFI_STATUS Status;\r
\r
- DEBUG ((DEBUG_INFO, "%a: TCP connection is finished. Could be TSL session closure, reset HTTP instance for the new TLS session.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_INFO, "%a: TCP connection is finished. Could be TSL session closure, reset HTTP instance for the new TLS session.\n", __func__));\r
\r
Status = Instance->HttpIo.Http->Configure (Instance->HttpIo.Http, NULL);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Error to reset HTTP instance.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Error to reset HTTP instance.\n", __func__));\r
return Status;\r
}\r
\r
Status = Instance->HttpIo.Http->Configure (Instance->HttpIo.Http, &((EFI_REST_EX_HTTP_CONFIG_DATA *)Instance->ConfigData)->HttpConfigData);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Error to re-initiate HTTP instance.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Error to re-initiate HTTP instance.\n", __func__));\r
}\r
\r
return Status;\r
ReturnStatus = EFI_SUCCESS;\r
} else if (HttpIoReceiveStatus != EFI_CONNECTION_FIN) {\r
if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY) == 0) {\r
- DEBUG ((DEBUG_ERROR, "%a: TCP error, reset HTTP session.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: TCP error, reset HTTP session.\n", __func__));\r
Instance->Flags |= RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY;\r
gBS->Stall (500);\r
Status = ResetHttpTslSession (Instance);\r
return EFI_NOT_READY;\r
}\r
\r
- DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __func__));\r
}\r
\r
ReturnStatus = EFI_DEVICE_ERROR;\r
} else {\r
if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TLS_RETRY) != 0) {\r
- DEBUG ((DEBUG_ERROR, "%a: REST_EX Send and receive fail even with a new TLS session.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: REST_EX Send and receive fail even with a new TLS session.\n", __func__));\r
ReturnStatus = EFI_DEVICE_ERROR;\r
}\r
\r
Instance->Flags |= RESTEX_INSTANCE_FLAGS_TLS_RETRY;\r
Status = ResetHttpTslSession (Instance);\r
if (EFI_ERROR (Status)) {\r
- DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__));\r
+ DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __func__));\r
ReturnStatus = EFI_DEVICE_ERROR;\r
}\r
\r