diff --git a/user_channel/channel_layer.cpp b/user_channel/channel_layer.cpp
index 122b3ea..c6866c2 100644
--- a/user_channel/channel_layer.cpp
+++ b/user_channel/channel_layer.cpp
@@ -58,11 +58,6 @@
     return getChannelConfigObject().isValidChannel(chNum);
 }
 
-uint8_t convertCurrentChannelNum(const uint8_t chNum)
-{
-    return getChannelConfigObject().convertToChannelIndexNumber(chNum);
-}
-
 bool isValidAuthType(const uint8_t chNum, const EAuthType& authType)
 {
     return getChannelConfigObject().isValidAuthType(chNum, authType);
diff --git a/user_channel/channel_layer.hpp b/user_channel/channel_layer.hpp
index 580c4ee..4eb51b7 100644
--- a/user_channel/channel_layer.hpp
+++ b/user_channel/channel_layer.hpp
@@ -295,15 +295,6 @@
     return chNum;
 }
 
-/** @brief provides function to convert current channel number (0xE)
- *
- *  @param[in] chNum - channel number as requested in commands.
- *
- *  @return same channel number or proper channel number for current channel
- * number (0xE).
- */
-uint8_t convertCurrentChannelNum(const uint8_t chNum);
-
 /** @brief to set channel access data
  *
  *  @param[in] chNum - channel number
diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp
index 6559a43..008ffd9 100644
--- a/user_channel/channel_mgmt.cpp
+++ b/user_channel/channel_mgmt.cpp
@@ -786,39 +786,6 @@
     return static_cast<EChannelProtocolType>(it->second);
 }
 
-uint8_t ChannelConfig::convertToChannelIndexNumber(const uint8_t chNum)
-{
-
-    // TODO: There is limitation in current design. we cannot detect exact
-    // LAN interface(eth0 or eth1) so Implementation may be updated
-    // when there is any design update to figure out all the interfaces
-    // independently based on the message.
-
-    static uint8_t curChannel = 0xFF;
-
-    if (curChannel == 0xFF)
-    {
-        auto it = interfaceMap.find(getInterfaceIndex());
-        if (it == interfaceMap.end())
-        {
-            log<level::ERR>("Invalid Interface type ",
-                            entry("InterfaceIndex: %d", getInterfaceIndex()));
-            throw std::invalid_argument("Invalid interface type.");
-        }
-
-        for (auto& channel : channelData)
-        {
-            std::string& interfaceName = it->second;
-            if (channel.chName == interfaceName)
-            {
-                curChannel = channel.chID;
-                break;
-            }
-        }
-    }
-    return ((chNum == currentChNum) ? curChannel : chNum);
-}
-
 Json ChannelConfig::readJsonFile(const std::string& configFile)
 {
     std::ifstream jsonFile(configFile);
diff --git a/user_channel/channel_mgmt.hpp b/user_channel/channel_mgmt.hpp
index b044f66..80bd6d9 100644
--- a/user_channel/channel_mgmt.hpp
+++ b/user_channel/channel_mgmt.hpp
@@ -224,14 +224,6 @@
      */
     CommandPrivilege convertToPrivLimitIndex(const std::string& value);
 
-    /** @brief function to convert channel number to channel index
-     *
-     *  @param[in] chNum - channel number
-     *
-     *  @return channel index
-     */
-    uint8_t convertToChannelIndexNumber(const uint8_t chNum);
-
     /** @brief function to write persistent channel configuration to config file
      *
      *  @return 0 for success, -errno for failure.
