diff options
author | Johnathan Mantey <johnathanx.mantey@intel.com> | 2018-12-13 13:17:56 -0800 |
---|---|---|
committer | Johnathan Mantey <johnathanx.mantey@intel.com> | 2019-02-04 12:37:45 -0800 |
commit | 74a2102e1fcf15097878449cd2989b5facd9b956 (patch) | |
tree | 1d06bef3cb4d1c7793637647e912779fbc7daf09 /transporthandler.cpp | |
parent | 2dfe7f8da32764d604b3f6bf893afa9b29ff9a7c (diff) | |
download | phosphor-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 'transporthandler.cpp')
-rw-r--r-- | transporthandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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 <arpa/inet.h> @@ -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<level::ERR>("Unable to get the interface name", |