From 74a2102e1fcf15097878449cd2989b5facd9b956 Mon Sep 17 00:00:00 2001 From: Johnathan Mantey Date: Thu, 13 Dec 2018 13:17:56 -0800 Subject: IPMI channel to NIC device mapping modified within JSON config file The IPMI to NIC channel mapping was done using a hard coded scheme. The scheme used generic channel names which were then mapped to specific device names. The hard coded generic to specific naming convention is removed, and the JSON file contains the device name directly. Change-Id: Ibc6821cae5a26f2666467aba5346d364053f2582 Signed-off-by: Johnathan Mantey --- app/channel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/channel.cpp b/app/channel.cpp index e5d6770..93fba24 100644 --- a/app/channel.cpp +++ b/app/channel.cpp @@ -1,8 +1,8 @@ #include "channel.hpp" -#include "net.hpp" #include "transporthandler.hpp" #include "types.hpp" +#include "user_channel/channel_layer.hpp" #include "utils.hpp" #include @@ -56,7 +56,7 @@ ipmi_ret_t ipmi_get_channel_access(ipmi_netfn_t netfn, ipmi_cmd_t cmd, */ constexpr auto channelE = 0x0E; int channel = requestData->channelNumber; - auto ethdevice = ipmi::network::ChanneltoEthernet(channel); + auto ethdevice = ipmi::getChannelName(channel); if (channel != channelE && ethdevice.empty()) { @@ -102,7 +102,7 @@ ipmi_ret_t ipmi_app_channel_info(ipmi_netfn_t netfn, ipmi_cmd_t cmd, ipmi_ret_t rc = IPMI_CC_OK; auto* p = static_cast(request); int channel = (*p) & CHANNEL_MASK; - std::string ethdevice = ipmi::network::ChanneltoEthernet(channel); + std::string ethdevice = ipmi::getChannelName(channel); // The supported channels numbers are those which are configured. // Channel Number E is used as way to identify the current channel @@ -365,7 +365,7 @@ ipmi_ret_t ipmi_set_channel_access(ipmi_netfn_t netfn, ipmi_cmd_t cmd, int channel = requestData->channelNumber; // Validate the channel number corresponds to any of the network channel. - auto ethdevice = ipmi::network::ChanneltoEthernet(channel); + auto ethdevice = ipmi::getChannelName(channel); if (ethdevice.empty()) { *data_len = 0; -- cgit v1.2.1