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 --- transporthandler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'transporthandler.cpp') diff --git a/transporthandler.cpp b/transporthandler.cpp index 88938b1..72beebc 100644 --- a/transporthandler.cpp +++ b/transporthandler.cpp @@ -2,7 +2,7 @@ #include "app/channel.hpp" #include "ipmid.hpp" -#include "net.hpp" +#include "user_channel/channel_layer.hpp" #include "utils.hpp" #include @@ -70,7 +70,7 @@ ipmi_ret_t getNetworkData(uint8_t lan_param, uint8_t* data, int channel) ipmi_ret_t rc = IPMI_CC_OK; sdbusplus::bus::bus bus(ipmid_get_sd_bus_connection()); - auto ethdevice = ipmi::network::ChanneltoEthernet(channel); + auto ethdevice = ipmi::getChannelName(channel); // if ethdevice is an empty string they weren't expecting this channel. if (ethdevice.empty()) { @@ -416,7 +416,7 @@ ipmi_ret_t ipmi_transport_set_lan(ipmi_netfn_t netfn, ipmi_cmd_t cmd, // channel number is the lower nibble int channel = reqptr->channel & CHANNEL_MASK; - auto ethdevice = ipmi::network::ChanneltoEthernet(channel); + auto ethdevice = ipmi::getChannelName(channel); if (ethdevice.empty()) { return IPMI_CC_INVALID_FIELD_REQUEST; @@ -578,7 +578,7 @@ ipmi_ret_t ipmi_transport_get_lan(ipmi_netfn_t netfn, ipmi_cmd_t cmd, } } - auto ethdevice = ipmi::network::ChanneltoEthernet(channel); + auto ethdevice = ipmi::getChannelName(channel); if (ethdevice.empty()) { return IPMI_CC_INVALID_FIELD_REQUEST; @@ -706,7 +706,7 @@ void applyChanges(int channel) ipmi::DbusObjectInfo ipObject; ipmi::DbusObjectInfo systemObject; - auto ethdevice = ipmi::network::ChanneltoEthernet(channel); + auto ethdevice = ipmi::getChannelName(channel); if (ethdevice.empty()) { log("Unable to get the interface name", -- cgit v1.2.1