prima: WLAN Driver Release 3.2.0.2

Integrate the following CLs from Perforce:

636735: Insure PMK candidate notify event only sent up to supplicant for RSN
Insure that PMK candidate notify even only sent up to supplicant for
RSN associations (CR 362782)

636761,
636770,
636789: Feature for supporting roaming to an AP with better RSSI
This feature takes care of the station to roam to a new AP only if the
roamable/new AP has a better RSSI than current AP.  A new ini item has
been added named RoamRssiDiff using which we can configure how better
in terms of Rssi, the new AP that we want to roam should be. On
providing a value of Zero, the feature is disabled and the check for
an AP with better RSSI does not happen while roaming. (CR 366355)

636834: Set rssi filter period to FT value
if CCX is disable and LFR is enabled, rssi filter period was set to 20
(default value) because of which RSSI monitoring was not effective,
changes added to set rssi filter period to FT rssi value (5) even for
LFR enabled case also. (CR 372303)

636843: isFastRoamingEnabled passed during reassoc (CR 372303)

636970: Implemented getwlandbg for SoftAP
SoftAP does not have an ioctl to print the log levels and log
info. Implemented getwlandbg for SoftAP.  (CR 374467)

636989 & 636992: Remove hard tabs and DOS line endings

637100: Fix of WDA Stop timeout kernel panic issue.
WDA stop timeout should never happen. Increasing WDA stop timeout
after considering 1 pending request and cleaning up WDI pending queues
once driver unload is trigerred.  (CR 367261)

637246: Fixed WLAN_BAPReset() to avoid sending Disassoc on STA interface.
Due to some reason(Seen just after driver load and whenever
hdd_netdev_notifier_call get called with netdevice state
NETDEV_GOING_DOWN where we call WLANBAP_DeregisterFromHCI())
WLAN_BAPReset was getting called through BSL_Write -> bslWriteFinish.
Even If the BT-AMP session is not opened(in this case
btampHandle->sessionId will be zero(default value) and if
WLAN_BAPReset is called, BAP was issueing sme_RoamDisconnect with
sessionId 0 which is station interface which results in Disassoc of
STA with AP.  Fixed the issue by checking BT-AMP session is opened or
not. (btampContext->isBapSessionOpen). If its opened then only call
sme_RoamDisconnect.

637340: SAP does not beacon on Country code to which STA is associated
(CR 368474)

637497: completed tx statistic reporting functionality
(CR 370923)

637687: Support for MC/BC & hostARPOffload with ini to work instead of ioctl
Fixes MC frames are still passed to host driver although
McastBcastFilter=1, hostArpOffload=0 (CR 363707)

637850: Fix for SAP Auto Channel Selection feature
For SAP auto channel selection, WLAN host driver do scan to find less
noise channel. While performaing scan do not check for Active session
in CSR module and change CSR roam state to eCSR_ROAMING_STATE_SCANNING
state for scan command irrespective of session is active or not.  (CR
375829)

638022: Fix for CCX-STA to connect to CCKM-RSN AP
because of the incorrect if-else-if authentication type overwritten to
255 (CR 376930)

638142-638147: Fix compilation warnings caused by GCC -Wenum-compare
Recent versions of the GCC compiler include an "enum-compare" warning
which will emit a warning when an enum of one type is compared with an
enum of a different type.  The compiler has found occurrences of this
issue in the WLAN code.  Fix those issues such that enum comparisons
are restricted to enums of the same enumerated type.

638253: Implemented getAutoChannel ioctl for SoftAP
SoftAP does not have an ioctl to get auto channel. Implemented
getAutoChannel for SoftAP and fixed getchannel ioctl for softap (CR
369147)

638267: Fix GCC 4.6 compile failure in WDI due to inlining failure
WDI_GET_PAL_CTX() was defined to be an inline function, but the
function body was not available to the compilation units that refer to
it.  Other versions of the compiler have silently ignored this, but
GCC-4.6 is emitting an error "sorry, unimplemented: inlining failed in
call to 'WDI_GET_PAL_CTX': function body not available".  So we remove
the unnecessary "inline" directive from the definition of
WDI_GET_PAL_CTX().

638291: Fix WLAN suspended flag
If WLAN driver suspend fails becuase of a TX, RX or MC thread suspend
timeout, the suspended flag is not reset. So set the suspended flag
only after all three threads are suspended successfully.  (CR 375230)

638703: Disabling AMP flag
Disabling AMP flag from config file, so that we don't register with
HCI any more as BT AMP is not PORed (CR 375826)
diff --git a/CORE/MAC/src/pe/include/limSession.h b/CORE/MAC/src/pe/include/limSession.h
index 681e79d..5f72af4 100644
--- a/CORE/MAC/src/pe/include/limSession.h
+++ b/CORE/MAC/src/pe/include/limSession.h
@@ -260,6 +260,9 @@
 #if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
     tAniBool            isFastTransitionEnabled;
 #endif
+#ifdef FEATURE_WLAN_LFR
+    tAniBool            isFastRoamIniFeatureEnabled;
+#endif
 #ifdef WLAN_FEATURE_P2P
     tSirNoAParam p2pNoA;
     tSirP2PNoaAttr p2pGoPsUpdate;
diff --git a/CORE/MAC/src/pe/lim/limFT.c b/CORE/MAC/src/pe/lim/limFT.c
index aa0c239..26d04f4 100644
--- a/CORE/MAC/src/pe/lim/limFT.c
+++ b/CORE/MAC/src/pe/lim/limFT.c
@@ -712,6 +712,10 @@
 #if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
         pftSessionEntry->isFastTransitionEnabled = psessionEntry->isFastTransitionEnabled;
 #endif
+
+#ifdef FEATURE_WLAN_LFR
+        pftSessionEntry->isFastRoamIniFeatureEnabled = psessionEntry->isFastRoamIniFeatureEnabled; 
+#endif
         limFTPrepareAddBssReq( pMac, FALSE, pftSessionEntry, 
             pMac->ft.ftPEContext.pFTPreAuthReq->pbssDescription );
         pMac->ft.ftPEContext.pftSessionEntry = pftSessionEntry;
@@ -1409,6 +1413,9 @@
 #ifdef FEATURE_WLAN_CCX
            || (pMac->lim.gpSession[sessionId].isCCXconnection)
 #endif
+#ifdef FEATURE_WLAN_LFR
+           || (pMac->lim.gpSession[sessionId].isFastRoamIniFeatureEnabled)
+#endif
            )&& 
             pMac->lim.gpSession[sessionId].isFastTransitionEnabled))
         {
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
index 3a87a02..b76995a 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
@@ -418,7 +418,7 @@
         palFreeMemory(pMac->hHdd, psessionEntry->assocRsp);
         psessionEntry->assocRsp = NULL;
     }
-    if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->assocRsp, frameLen)) != eSIR_SUCCESS)
+    if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->assocRsp, frameLen)) != eHAL_STATUS_SUCCESS)
     {
         PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store assoc response, len = %d"), frameLen);)
     }
@@ -438,7 +438,7 @@
     if(pAssocRsp->ricPresent)
     {
         psessionEntry->RICDataLen = pAssocRsp->num_RICData * sizeof(tDot11fIERICDataDesc);
-        if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->ricData, psessionEntry->RICDataLen)) != eSIR_SUCCESS)
+        if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->ricData, psessionEntry->RICDataLen)) != eHAL_STATUS_SUCCESS)
         {
             PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store assoc response"));)
             psessionEntry->RICDataLen = 0; 
@@ -464,7 +464,7 @@
     if(pAssocRsp->tspecPresent)
     {
         psessionEntry->tspecLen = pAssocRsp->num_tspecs * sizeof(tDot11fIEWMMTSPEC);
-        if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->tspecIes, psessionEntry->tspecLen)) != eSIR_SUCCESS)
+        if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->tspecIes, psessionEntry->tspecLen)) != eHAL_STATUS_SUCCESS)
         {
             PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store assoc response"));)
             psessionEntry->tspecLen = 0; 
diff --git a/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c b/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c
index 0fdd30d..e797901 100644
--- a/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c
@@ -159,7 +159,7 @@
                 psessionEntry->beacon = NULL;
              }
              psessionEntry->bcnLen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
-             if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->beacon, psessionEntry->bcnLen)) != eSIR_SUCCESS)
+             if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->beacon, psessionEntry->bcnLen)) != eHAL_STATUS_SUCCESS)
              {
                 PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store beacon"));)
               }
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
index ade531d..10c27f1 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
@@ -1401,7 +1401,7 @@
     }
 
 #ifdef WLAN_SOFTAP_FEATURE  
-    if( wlan_cfgGetInt ( pMac, WNI_CFG_SHORT_SLOT_TIME, &val ) != eSIR_SME_SUCCESS)
+    if( wlan_cfgGetInt ( pMac, WNI_CFG_SHORT_SLOT_TIME, &val ) != eSIR_SUCCESS)
     {
         limLog ( pMac, LOGP, FL(" Error : unable to fetch the WNI_CFG_SHORT_SLOT_TIME\n"));
         palFreeMemory(pMac->hHdd,(void *)pAddBssParams);
@@ -1656,7 +1656,7 @@
 {
     int i;
 
-    if(pMac->lim.gLimMlmState != eLIM_SME_IDLE_STATE)
+    if(pMac->lim.gLimMlmState != eLIM_MLM_IDLE_STATE)
     {
         return FALSE;
     }
@@ -2890,7 +2890,7 @@
     limSendDeauthMgmtFrame(pMac, pMlmDeauthReq->reasonCode,
                            pMlmDeauthReq->peerMacAddr,psessionEntry);
 
-    if( (psessionEntry->limSystemRole == eSYSTEM_AP_ROLE))
+    if( (psessionEntry->limSystemRole == eLIM_AP_ROLE))
     {
       // Delay DEL STA for 300ms such that unicast deauth is 
       // delivered at TIM(100 for normal or 300ms for dynamic) 
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
index 6793ced..8bd6a01 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
@@ -2083,6 +2083,7 @@
 void limProcessBtAmpApMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry)
 {
     tSirResultCodes rc = eSIR_SME_SUCCESS;
+    tSirRetStatus status;
     tpDeleteBssParams pDelBss = (tpDeleteBssParams) limMsgQ->bodyptr;
     tSirMacAddr             nullBssid = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
@@ -2101,10 +2102,11 @@
     pMac->lim.gLimMlmState = eLIM_MLM_IDLE_STATE;
     if( eLIM_MLM_WT_DEL_BSS_RSP_STATE != psessionEntry->limMlmState)
     {
-            limLog( pMac, LOGE,
-                        FL( "Received unexpected WDA_DEL_BSS_RSP in state %X\n" ),psessionEntry->limMlmState);
-            rc = eSIR_SME_REFUSED;
-           goto end;
+        limLog(pMac, LOGE,
+               FL( "Received unexpected WDA_DEL_BSS_RSP in state %X" ),
+               psessionEntry->limMlmState);
+        rc = eSIR_SME_REFUSED;
+        goto end;
     }
     if (pDelBss->status != eHAL_STATUS_SUCCESS)
     {
@@ -2113,10 +2115,13 @@
         rc = eSIR_SME_STOP_BSS_FAILURE;
         goto end;
     }
-    rc = limSetLinkState(pMac, eSIR_LINK_IDLE_STATE, nullBssid,
+    status = limSetLinkState(pMac, eSIR_LINK_IDLE_STATE, nullBssid,
            psessionEntry->selfMacAddr, NULL, NULL);
-    if( rc != eSIR_SUCCESS )
+    if (status != eSIR_SUCCESS)
+    {
+        rc = eSIR_SME_REFUSED;
         goto end;
+    }
     /** Softmac may send all the buffered packets right after resuming the transmission hence
      * to occupy the medium during non channel occupancy period. So resume the transmission after
      * HAL gives back the response.
@@ -4296,12 +4301,12 @@
     PELOGE(limLog( pMac, LOGE,
         FL( "Received unexpected ADDBA CNF when STA BA state is %d\n" ),
         curBaState );)
-      palFreeMemory( pMac->hHdd, (void *) pMsgBuf );
+    palFreeMemory( pMac->hHdd, (void *) pMsgBuf );
     return;
   }
   // Restore STA BA state
   LIM_SET_STA_BA_STATE(pSta, pMlmAddBACnf->baTID, eLIM_BA_STATE_IDLE);
-  if( eSIR_SUCCESS == pMlmAddBACnf->addBAResultCode )
+  if( eSIR_MAC_SUCCESS_STATUS == pMlmAddBACnf->addBAResultCode )
   {
     // Update LIM internal cache...
     if( eBA_RECIPIENT == pMlmAddBACnf->baDirection )
diff --git a/CORE/MAC/src/pe/lim/limProcessProbeRspFrame.c b/CORE/MAC/src/pe/lim/limProcessProbeRspFrame.c
index f7949ea..6df50de 100644
--- a/CORE/MAC/src/pe/lim/limProcessProbeRspFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessProbeRspFrame.c
@@ -171,23 +171,27 @@
         else if (psessionEntry->limMlmState ==
                                      eLIM_MLM_WT_JOIN_BEACON_STATE)
         {
-            if( psessionEntry->beacon != NULL ) //Either Beacon/probe response is required. Hence store it in same buffer.
+            if( psessionEntry->beacon != NULL )//Either Beacon/probe response is required. Hence store it in same buffer.
             {
                 palFreeMemory(pMac->hHdd, psessionEntry->beacon);
                 psessionEntry->beacon = NULL;
-             }
-             psessionEntry->bcnLen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
-             if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->beacon, psessionEntry->bcnLen)) != eSIR_SUCCESS)
-             {
-                PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store beacon"));)
-              }
-              else
-              {
+            }
+            psessionEntry->bcnLen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
+            if ((palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->beacon,
+                                   psessionEntry->bcnLen))
+                != eHAL_STATUS_SUCCESS)
+            {
+                PELOGE(limLog(pMac, LOGE,
+                              FL("Unable to allocate memory to store beacon"));)
+            }
+            else
+            {
                 //Store the Beacon/ProbeRsp. This is sent to csr/hdd in join cnf response. 
-                palCopyMemory(pMac->hHdd, psessionEntry->beacon, WDA_GET_RX_MPDU_DATA(pRxPacketInfo), psessionEntry->bcnLen);
-               }
-             
-        
+                palCopyMemory(pMac->hHdd, psessionEntry->beacon,
+                              WDA_GET_RX_MPDU_DATA(pRxPacketInfo),
+                              psessionEntry->bcnLen);
+            }
+
             // STA in WT_JOIN_BEACON_STATE
             limCheckAndAnnounceJoinSuccess(pMac, &probeRsp, pHdr,psessionEntry);
         }
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 47993f4..9f1a1bf 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -1462,6 +1462,9 @@
             psessionEntry->isFastTransitionEnabled = pSmeJoinReq->isFastTransitionEnabled;
 #endif
             
+#ifdef FEATURE_WLAN_LFR
+            psessionEntry->isFastRoamIniFeatureEnabled = pSmeJoinReq->isFastRoamIniFeatureEnabled;
+#endif
             if(psessionEntry->bssType == eSIR_INFRASTRUCTURE_MODE)
             {
                 psessionEntry->limSystemRole = eLIM_STA_ROLE;
@@ -2202,6 +2205,7 @@
     tANI_U16                disassocTrigger, reasonCode;
     tLimMlmDisassocReq      *pMlmDisassocReq;
     tSirResultCodes         retCode = eSIR_SME_SUCCESS;
+    tSirRetStatus           status;
     tSirSmeDisassocReq      smeDisassocReq;
     tpPESession             psessionEntry = NULL; 
     tANI_U8                 sessionId;
@@ -2210,17 +2214,18 @@
 
     PELOG1(limLog(pMac, LOG1,FL("received DISASSOC_REQ message\n"));)
     
-    if(pMsgBuf == NULL)
+    if (pMsgBuf == NULL)
     {
-        limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n"));
+        limLog(pMac, LOGE, FL("Buffer is Pointing to NULL\n"));
         return;
     }
 
-    limGetSessionInfo(pMac,(tANI_U8 *)pMsgBuf,&smesessionId,&smetransactionId);
+    limGetSessionInfo(pMac, (tANI_U8 *)pMsgBuf,&smesessionId, &smetransactionId);
 
-    retCode = limDisassocReqSerDes(pMac, &smeDisassocReq, (tANI_U8 *) pMsgBuf);
+    status = limDisassocReqSerDes(pMac, &smeDisassocReq, (tANI_U8 *) pMsgBuf);
     
-    if ( (retCode == eSIR_FAILURE) ||(!limIsSmeDisassocReqValid(pMac, &smeDisassocReq, psessionEntry)) )
+    if ( (eSIR_FAILURE == status) ||
+         (!limIsSmeDisassocReqValid(pMac, &smeDisassocReq, psessionEntry)) )
     {
         PELOGE(limLog(pMac, LOGE,
                FL("received invalid SME_DISASSOC_REQ message\n"));)
diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
index b20fc67..131ff49 100644
--- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c
+++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
@@ -411,7 +411,7 @@
         }
 
         if( (palAllocateMemory(pMac->hHdd, (void**)&tempbuf,
-             left)) != eSIR_SUCCESS)
+             left)) != eHAL_STATUS_SUCCESS)
         {
             PELOGE(limLog(pMac, LOGE,
                  FL("Unable to allocate memory to store addn IE"));)
@@ -668,7 +668,7 @@
     if (addnIEPresent)
     {
         if( (palAllocateMemory(pMac->hHdd, (void**)&addIE, 
-             WNI_CFG_PROBE_RSP_ADDNIE_DATA1_LEN*3 )) != eSIR_SUCCESS)
+             WNI_CFG_PROBE_RSP_ADDNIE_DATA1_LEN*3 )) != eHAL_STATUS_SUCCESS)
         {
             PELOGE(limLog(pMac, LOGE,
                  FL("Unable to allocate memory to store addn IE"));)
@@ -845,7 +845,7 @@
     if ( addnIEPresent )
     {
         if (palCopyMemory ( pMac->hHdd, pFrame+sizeof(tSirMacMgmtHdr)+nPayload,
-             &addIE[0], totalAddnIeLen) != eSIR_SUCCESS)
+             &addIE[0], totalAddnIeLen) != eHAL_STATUS_SUCCESS)
         {
             limLog(pMac, LOGP, FL("Additional Probe Rp IE request failed while Appending: %x"),halstatus);
             palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT,
@@ -861,7 +861,7 @@
     if (noaLen != 0)
     {
         if (palCopyMemory ( pMac->hHdd, &pFrame[nBytes - (total_noaLen)],
-                                       &noaIe[0], total_noaLen) != eSIR_SUCCESS)
+                            &noaIe[0], total_noaLen) != eHAL_STATUS_SUCCESS)
         {
             limLog(pMac, LOGE,
                   FL("Not able to insert NoA because of length constraint"));
@@ -1686,7 +1686,7 @@
     if ( addnIEPresent )
     {
         if (palCopyMemory ( pMac->hHdd, pFrame+sizeof(tSirMacMgmtHdr)+nPayload,
-                           &addIE[0], addnIELen ) != eSIR_SUCCESS)
+                           &addIE[0], addnIELen ) != eHAL_STATUS_SUCCESS)
         {
             limLog(pMac, LOGP, FL("Additional Assoc IEs request failed while Appending: %x\n"),halstatus);
             palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT,
@@ -2488,7 +2488,8 @@
         nPayload += nAddIELen;
     }
 
-    if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->assocReq, nPayload)) != eSIR_SUCCESS)
+    if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->assocReq,
+                           nPayload)) != eHAL_STATUS_SUCCESS)
     {
         PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store assoc request"));)
     }
@@ -2863,16 +2864,17 @@
         nPayload += nAddIELen;
     }
 
-    if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->assocReq, nPayload)) != eSIR_SUCCESS)
+    if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->assocReq,
+                           nPayload)) != eHAL_STATUS_SUCCESS)
     {
         PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store assoc request"));)
-     }
-     else
-     {
+    }
+    else
+    {
         //Store the Assoc request. This is sent to csr/hdd in join cnf response. 
         palCopyMemory(pMac->hHdd, psessionEntry->assocReq, pFrame + sizeof(tSirMacMgmtHdr), nPayload);
         psessionEntry->assocReqLen = nPayload;
-     }
+    }
 
     if (psessionEntry->is11Rconnection)
     {
@@ -3176,16 +3178,17 @@
         nPayload += nAddIELen;
     }
 
-    if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->assocReq, nPayload)) != eSIR_SUCCESS)
+    if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->assocReq,
+                           nPayload)) != eHAL_STATUS_SUCCESS)
     {
         PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store assoc request"));)
-     }
-     else
-     {
+    }
+    else
+    {
         //Store the Assoc request. This is sent to csr/hdd in join cnf response. 
         palCopyMemory(pMac->hHdd, psessionEntry->assocReq, pFrame + sizeof(tSirMacMgmtHdr), nPayload);
         psessionEntry->assocReqLen = nPayload;
-     }
+    }
 
     if( ( SIR_BAND_5_GHZ == limGetRFBand(psessionEntry->currentOperChannel))
 #ifdef WLAN_FEATURE_P2P
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
index 15b8c80..1d1ccd0 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
@@ -2225,7 +2225,7 @@
     tSirMsgQ                  mmhMsg;
     tSmeIbssPeerInd *pNewPeerInd;
     
-    if(eSIR_SUCCESS !=
+    if(eHAL_STATUS_SUCCESS !=
         palAllocateMemory(pMac->hHdd,(void * *) &pNewPeerInd,(sizeof(tSmeIbssPeerInd) + beaconLen)))
     {
         PELOGE(limLog(pMac, LOGE, FL("Failed to allocate memory"));)
@@ -2424,7 +2424,7 @@
     tSirMsgQ         mmhMsg;
     tSmeMaxAssocInd *pSmeMaxAssocInd;
 
-    if(eSIR_SUCCESS !=
+    if(eHAL_STATUS_SUCCESS !=
             palAllocateMemory(pMac->hHdd,(void **)&pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd)))
     {
         PELOGE(limLog(pMac, LOGE, FL("Failed to allocate memory"));)
diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c
index ecec71f..456f9d6 100644
--- a/CORE/MAC/src/pe/lim/limSerDesUtils.c
+++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c
@@ -1973,7 +1973,15 @@
         return eSIR_FAILURE;    
 #endif
 
-    
+#ifdef FEATURE_WLAN_LFR
+    //isFastRoamIniFeatureEnabled;
+    pJoinReq->isFastRoamIniFeatureEnabled = (tAniBool)limGetU32(pBuf);
+    pBuf += sizeof(tAniBool);
+    len -= sizeof(tAniBool);
+    if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
+        return eSIR_FAILURE;    
+#endif
+
 #if (WNI_POLARIS_FW_PACKAGE == ADVANCED) && defined(ANI_PRODUCT_TYPE_AP)
     // Extract BP Indicator
     pJoinReq->bpIndicator = (tAniBool) limGetU32(pBuf);
diff --git a/CORE/MAC/src/pe/lim/limSession.c b/CORE/MAC/src/pe/lim/limSession.c
index 36dc4bf..3d3a553 100644
--- a/CORE/MAC/src/pe/lim/limSession.c
+++ b/CORE/MAC/src/pe/lim/limSession.c
@@ -147,6 +147,9 @@
 #if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
             pMac->lim.gpSession[i].isFastTransitionEnabled = FALSE;
 #endif
+#ifdef FEATURE_WLAN_LFR
+            pMac->lim.gpSession[i].isFastRoamIniFeatureEnabled = FALSE;
+#endif
             *sessionId = i;
 
             pMac->lim.gpSession[i].gLimPhyMode = WNI_CFG_PHY_MODE_11G; //TODO :Check with the team what should be default mode 
diff --git a/CORE/MAC/src/pe/pmm/pmmApi.c b/CORE/MAC/src/pe/pmm/pmmApi.c
index f98db2a..2070549 100644
--- a/CORE/MAC/src/pe/pmm/pmmApi.c
+++ b/CORE/MAC/src/pe/pmm/pmmApi.c
@@ -1852,7 +1852,7 @@
         return;
     }
 
-    if(pUapsdRspMsg->status == eSIR_SUCCESS)
+    if(pUapsdRspMsg->status == eHAL_STATUS_SUCCESS)
     {
         PELOGW(pmmLog(pMac, LOGW,
             FL("pmmUapsd: Received successful response from HAL to enter UAPSD mode \n"));)
diff --git a/CORE/MAC/src/pe/sch/schBeaconProcess.c b/CORE/MAC/src/pe/sch/schBeaconProcess.c
index 2a9a1e3..abcfd62 100644
--- a/CORE/MAC/src/pe/sch/schBeaconProcess.c
+++ b/CORE/MAC/src/pe/sch/schBeaconProcess.c
@@ -549,7 +549,7 @@
               limLog( pMac, LOGE, "Regulatory max = %d, local power constraint = %d, max tx = %d", regMax, localConstraint, maxTxPower );
               limLog( pMac, LOGE, "Local power constraint change..updating mew maxTx power to HAL");
 #endif
-              if( rrmSendSetMaxTxPowerReq ( pMac, maxTxPower, psessionEntry ) == eHAL_STATUS_SUCCESS )
+              if( rrmSendSetMaxTxPowerReq ( pMac, maxTxPower, psessionEntry ) == eSIR_SUCCESS )
                  psessionEntry->maxTxPower = maxTxPower;
 
            }