/* This function checks if the IPMI channel already identified previously. */
EFI_STATUS CheckCachedIpmiLanMac(IN UINT8 ChannelNum, OUT BMC_IPMI_LAN_CHANNEL_INFO **CachedIpmiLanChannel)
/* This function checks if the IPMI channel already identified previously. */
EFI_STATUS CheckCachedIpmiLanMac(IN UINT8 ChannelNum, OUT BMC_IPMI_LAN_CHANNEL_INFO **CachedIpmiLanChannel)
{
  BMC_IPMI_LAN_CHANNEL_INFO  *ThisInstance;
  if (IsListEmpty (&mBmcIpmiLan)) {
    return EFI_NOT_FOUND;
  }
  ThisInstance = (BMC_IPMI_LAN_CHANNEL_INFO *)GetFirstNode (&mBmcIpmiLan);
  while (TRUE) {
    if (ThisInstance->Channel == ChannelNum) {
      *CachedIpmiLanChannel = ThisInstance;
      return EFI_SUCCESS;
    }
    if (IsNodeAtEnd (&mBmcIpmiLan, &ThisInstance->NextInstance)) {
      break;
    }
    ThisInstance = (BMC_IPMI_LAN_CHANNEL_INFO *)
                   GetNextNode (&mBmcIpmiLan, &ThisInstance->NextInstance);
  }
  return EFI_NOT_FOUND;
}