diff --git a/user_channel/channelcommands.cpp b/user_channel/channelcommands.cpp
index a0caeb6..fd46837 100644
--- a/user_channel/channelcommands.cpp
+++ b/user_channel/channelcommands.cpp
@@ -27,11 +27,11 @@
 namespace ipmi
 {
 
-/** @struct setChannelAccessReq
+/** @struct SetChannelAccessReq
  *
  *  Structure for set channel access request command (refer spec sec 22.22)
  */
-struct setChannelAccessReq
+struct SetChannelAccessReq
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
     uint8_t chNum : 4;
@@ -60,11 +60,11 @@
 
 } __attribute__((packed));
 
-/** @struct getChannelAccessReq
+/** @struct GetChannelAccessReq
  *
  *  Structure for get channel access request command (refer spec sec 22.23)
  */
-struct getChannelAccessReq
+struct GetChannelAccessReq
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
     uint8_t chNum : 4;
@@ -80,11 +80,11 @@
 #endif
 } __attribute__((packed));
 
-/** @struct getChannelAccessResp
+/** @struct GetChannelAccessResp
  *
  *  Structure for get channel access response command (refer spec sec 22.23)
  */
-struct getChannelAccessResp
+struct GetChannelAccessResp
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
     uint8_t accessMode : 3;
@@ -106,11 +106,11 @@
 #endif
 } __attribute__((packed));
 
-/** @struct getChannelInfoReq
+/** @struct GetChannelInfoReq
  *
  *  Structure for get channel info request command (refer spec sec 22.24)
  */
-struct getChannelInfoReq
+struct GetChannelInfoReq
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
     uint8_t chNum : 4;
@@ -122,11 +122,11 @@
 #endif
 } __attribute__((packed));
 
-/** @struct getChannelInfoResp
+/** @struct GetChannelInfoResp
  *
  *  Structure for get channel info response command (refer spec sec 22.24)
  */
-struct getChannelInfoResp
+struct GetChannelInfoResp
 {
 #if BYTE_ORDER == LITTLE_ENDIAN
     uint8_t chNum : 4;
@@ -158,7 +158,7 @@
                                 ipmi_data_len_t data_len,
                                 ipmi_context_t context)
 {
-    const setChannelAccessReq* req = static_cast<setChannelAccessReq*>(request);
+    const SetChannelAccessReq* req = static_cast<SetChannelAccessReq*>(request);
     size_t reqLength = *data_len;
 
     *data_len = 0;
@@ -263,7 +263,7 @@
                                 ipmi_data_len_t data_len,
                                 ipmi_context_t context)
 {
-    const getChannelAccessReq* req = static_cast<getChannelAccessReq*>(request);
+    const GetChannelAccessReq* req = static_cast<GetChannelAccessReq*>(request);
     size_t reqLength = *data_len;
 
     *data_len = 0;
@@ -293,7 +293,7 @@
         return IPMI_CC_ACTION_NOT_SUPPORTED_FOR_CHANNEL;
     }
 
-    getChannelAccessResp* resp = static_cast<getChannelAccessResp*>(response);
+    GetChannelAccessResp* resp = static_cast<GetChannelAccessResp*>(response);
 
     std::fill(reinterpret_cast<uint8_t*>(resp),
               reinterpret_cast<uint8_t*>(resp) + sizeof(*resp), 0);
@@ -329,7 +329,7 @@
                               ipmi_request_t request, ipmi_response_t response,
                               ipmi_data_len_t data_len, ipmi_context_t context)
 {
-    const getChannelInfoReq* req = static_cast<getChannelInfoReq*>(request);
+    const GetChannelInfoReq* req = static_cast<GetChannelInfoReq*>(request);
     size_t reqLength = *data_len;
 
     *data_len = 0;
@@ -355,7 +355,7 @@
         return IPMI_CC_PARM_OUT_OF_RANGE;
     }
 
-    getChannelInfoResp* resp = static_cast<getChannelInfoResp*>(response);
+    GetChannelInfoResp* resp = static_cast<GetChannelInfoResp*>(response);
 
     std::fill(reinterpret_cast<uint8_t*>(resp),
               reinterpret_cast<uint8_t*>(resp) + sizeof(*resp), 0);
diff --git a/user_channel/passwd_mgr.cpp b/user_channel/passwd_mgr.cpp
index c47bc6d..d4ff39f 100644
--- a/user_channel/passwd_mgr.cpp
+++ b/user_channel/passwd_mgr.cpp
@@ -49,7 +49,7 @@
 /*
  * Meta data struct for encrypted password file
  */
-struct metaPassStruct
+struct MetaPassStruct
 {
     char signature[10];
     unsigned char reseved[2];
@@ -278,7 +278,7 @@
     }
 
     // verify the signature first
-    metaPassStruct* metaData = reinterpret_cast<metaPassStruct*>(input.data());
+    MetaPassStruct* metaData = reinterpret_cast<MetaPassStruct*>(input.data());
     if (std::strncmp(metaData->signature, META_PASSWD_SIG,
                      sizeof(metaData->signature)))
     {
@@ -508,7 +508,7 @@
     OPENSSL_cleanse(key.data(), keyLen);
 
     // Update the meta password structure.
-    metaPassStruct metaData = {META_PASSWD_SIG, {0, 0}, 0, 0, 0, 0, 0};
+    MetaPassStruct metaData = {META_PASSWD_SIG, {0, 0}, 0, 0, 0, 0, 0};
     metaData.hashSize = hashLen;
     metaData.ivSize = ivLen;
     metaData.dataSize = bytesWritten;
