channelcmds:fix set chnl access sessionless chnl

Return proper error code 0x82 for session-less channel

Tested
1.verified with ipmitool raw commands

ipmitool raw 0x06 0x40 0x00 0x40 0x04
Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x40
rsp=0x82): Unknown (0x82)

ipmitool raw 0x06 0x41 0x00 0x40
Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x41
rsp=0x82): Unknown (0x82)

Signed-off-by: anil kumar appana <anil.kumarx.appana@intel.com>
Change-Id: I9ada001427a6c3dcaaf6de026f8831faa54c182d
diff --git a/user_channel/channelcommands.cpp b/user_channel/channelcommands.cpp
index 9d3b4d2..adf19d5 100644
--- a/user_channel/channelcommands.cpp
+++ b/user_channel/channelcommands.cpp
@@ -26,6 +26,8 @@
 namespace ipmi
 {
 
+static constexpr const uint8_t ccActionNotSupportedForChannel = 0x82;
+
 /** @brief implements the set channel access command
  *  @ param ctx - context pointer
  *  @ param channel - channel number
@@ -59,7 +61,7 @@
     if (getChannelSessionSupport(chNum) == EChannelSessSupported::none)
     {
         log<level::DEBUG>("Set channel access - No support on channel");
-        return responseInvalidFieldRequest();
+        return response(ccActionNotSupportedForChannel);
     }
 
     ChannelAccess chActData;
@@ -188,7 +190,7 @@
     if (getChannelSessionSupport(chNum) == EChannelSessSupported::none)
     {
         log<level::DEBUG>("Get channel access - No support on channel");
-        return response(IPMI_CC_ACTION_NOT_SUPPORTED_FOR_CHANNEL);
+        return response(ccActionNotSupportedForChannel);
     }
 
     ChannelAccess chAccess;