summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJohnathan Mantey <johnathanx.mantey@intel.com>2018-12-13 13:17:56 -0800
committerJohnathan Mantey <johnathanx.mantey@intel.com>2019-02-04 12:37:45 -0800
commit74a2102e1fcf15097878449cd2989b5facd9b956 (patch)
tree1d06bef3cb4d1c7793637647e912779fbc7daf09 /app
parent2dfe7f8da32764d604b3f6bf893afa9b29ff9a7c (diff)
downloadphosphor-host-ipmid-74a2102e1fcf15097878449cd2989b5facd9b956.tar.gz
phosphor-host-ipmid-74a2102e1fcf15097878449cd2989b5facd9b956.zip
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 <johnathanx.mantey@intel.com>
Diffstat (limited to 'app')
-rw-r--r--app/channel.cpp8
1 files changed, 4 insertions, 4 deletions
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 <arpa/inet.h>
@@ -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<uint8_t*>(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;
OpenPOWER on IntegriCloud