Return the maximum privilege in open session command

This commit does the following:

- Set the maximum privilege role in the session instead of current privilege
  in the implementation of the open session request/response.

- In open session response, return the maximum privilege of the session
  instead of the current privilege level.

- Update RAKP12 and RAKP34 implementation

Tested: Checked the session setup works fine with ipmitool and freeipmi
utility ipmipower.

Change-Id: I41b63b91f08c2ed96856c4db41eedaa878c663e3
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/command/session_cmds.cpp b/command/session_cmds.cpp
index 3312c92..a6b4adb 100644
--- a/command/session_cmds.cpp
+++ b/command/session_cmds.cpp
@@ -32,8 +32,8 @@
         response->newPrivLevel = static_cast<uint8_t>(session->curPrivLevel);
         return outPayload;
     }
-    if (reqPrivilegeLevel >
-        (session->reqMaxPrivLevel & session::reqMaxPrivMask))
+    if (reqPrivilegeLevel > (static_cast<uint8_t>(session->reqMaxPrivLevel) &
+                             session::reqMaxPrivMask))
     {
         // Requested level exceeds Channel and/or User Privilege Limit
         response->completionCode = IPMI_CC_EXCEEDS_USER_PRIV;