summaryrefslogtreecommitdiffstats
path: root/user_channel
diff options
context:
space:
mode:
authorRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2018-12-08 17:36:20 +0530
committerRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2018-12-19 01:12:00 +0000
commitf1d0e23b8f133d817896ce1cb2f288aefc61a81f (patch)
tree95d1d90ff0a8bf3e6b717049a83318d4d5cc8f98 /user_channel
parenta39208e0b5cf9b9cab8568f8049ef19b7c8dc100 (diff)
downloadphosphor-host-ipmid-f1d0e23b8f133d817896ce1cb2f288aefc61a81f.tar.gz
phosphor-host-ipmid-f1d0e23b8f133d817896ce1cb2f288aefc61a81f.zip
Channel commands updated to handle self channel
Channel commands are updated to handle self channel number 0xE. When user request 0xE self channel number, it will be converted to proper channel based on the interface the command is requested. Unit-Test: Verified channel commands are working as expected. Change-Id: If542f8e88b609d7b92f4a96acb572611dd883555 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Diffstat (limited to 'user_channel')
-rw-r--r--user_channel/channelcommands.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/user_channel/channelcommands.cpp b/user_channel/channelcommands.cpp
index 865d764..cf2c998 100644
--- a/user_channel/channelcommands.cpp
+++ b/user_channel/channelcommands.cpp
@@ -169,8 +169,7 @@ ipmi_ret_t ipmiSetChannelAccess(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
return IPMI_CC_REQ_DATA_LEN_INVALID;
}
- // TODO: Self channel number (0xE) has to be determined.
- uint8_t chNum = req->chNum;
+ uint8_t chNum = convertCurrentChannelNum(req->chNum);
if (!isValidChannel(chNum))
{
log<level::DEBUG>("Set channel access - Parameter out of range");
@@ -275,8 +274,7 @@ ipmi_ret_t ipmiGetChannelAccess(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
return IPMI_CC_REQ_DATA_LEN_INVALID;
}
- // TODO: Self channel number (0xE) has to be determined.
- uint8_t chNum = req->chNum;
+ uint8_t chNum = convertCurrentChannelNum(req->chNum);
if (!isValidChannel(chNum))
{
log<level::DEBUG>("Get channel access - Parameter out of range");
@@ -342,8 +340,7 @@ ipmi_ret_t ipmiGetChannelInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
return IPMI_CC_REQ_DATA_LEN_INVALID;
}
- // TODO: Self channel number (0xE) has to be determined.
- uint8_t chNum = req->chNum;
+ uint8_t chNum = convertCurrentChannelNum(req->chNum);
if (!isValidChannel(chNum))
{
log<level::DEBUG>("Get channel info - Parameter out of range");
OpenPOWER on IntegriCloud