diff options
author | Mike Maslenkin <mike.maslenkin@gmail.com> | 2023-11-29 00:59:38 +0300 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-12-27 00:09:49 +0000 |
commit | 24de462a9d931de89426ead8524952e3a2816633 (patch) | |
tree | 04cc8ad3b2b7f33c5c41bb7aac7806e9be53efb5 | |
parent | 8b59cb79fa4fe704671d1bea70abd89847a1e33f (diff) | |
download | edk2-24de462a9d931de89426ead8524952e3a2816633.zip edk2-24de462a9d931de89426ead8524952e3a2816633.tar.gz edk2-24de462a9d931de89426ead8524952e3a2816633.tar.bz2 |
RedfishPkg: add proper initialization of IPMI request
All fields of IPMI_CHANNEL_INFO_CHANNEL_NUMBER union must be
initialized to avoid error condition on BMC side.
Cc: Nickle Wang <nicklew@nvidia.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
Reviewed-by: Abner Chang <abner.chang@amd.com>
-rw-r--r-- | RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c b/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c index 7f295fe..c73e76d 100644 --- a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c +++ b/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c @@ -616,9 +616,10 @@ HostInterfaceIpmiCheckMacAddress ( }
// Initial the get MAC address request.
- GetLanConfigReq.SetSelector = 0;
- GetLanConfigReq.BlockSelector = 0;
- GetLanConfigReq.ParameterSelector = IpmiLanMacAddress;
+ GetLanConfigReq.ChannelNumber.Uint8 = 0;
+ GetLanConfigReq.SetSelector = 0;
+ GetLanConfigReq.BlockSelector = 0;
+ GetLanConfigReq.ParameterSelector = IpmiLanMacAddress;
ExitStatus = EFI_NOT_FOUND;
for (ChannelNum = IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_1;
@@ -640,6 +641,7 @@ HostInterfaceIpmiCheckMacAddress ( } else {
DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " No cached IPMI LAN info\n"));
DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " Send NetFn = App, Command = 0x42 to channel %d\n", ChannelNum));
+ GetChanelInfoRequest.ChannelNumber.Uint8 = 0;
GetChanelInfoRequest.ChannelNumber.Bits.ChannelNo = (UINT8)ChannelNum;
Status = IpmiGetChannelInfo (
&GetChanelInfoRequest,
|