wlan: Missing error and info logs in PE connect path (Part 3)

Added Info and error logs for connect path
in limProcessAssocReqFrame

Change-Id: I99c44e14b4567ade5b3cb1f154a2771019734e12
CRs-Fixed: 608929
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
index aa4a423..1da3177 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
@@ -101,8 +101,8 @@
 
     if(assocReq->supportedChannels.length >= SIR_MAX_SUPPORTED_CHANNEL_LIST)
     {
-        limLog(pMac, LOG1, FL("Number of supported channels:%d is more than MAX"),
-                              assocReq->supportedChannels.length);
+        limLog(pMac, LOG1, FL("Number of supported channels:%d is more than "
+               "MAX"), assocReq->supportedChannels.length);
         pMlmAssocInd->supportedChannels.numChnl = 0;
         return;
     }
@@ -160,7 +160,8 @@
 
     pMlmAssocInd->supportedChannels.numChnl = (tANI_U8) index;
    PELOG2(limLog(pMac, LOG2,
-        FL("Send AssocInd to WSM: spectrum ON, minPwr %d, maxPwr %d, numChnl %d"),
+        FL("Send AssocInd to WSM: spectrum ON, minPwr %d, maxPwr %d, "
+           "numChnl %d"),
         pMlmAssocInd->powerCap.minTxPower,
         pMlmAssocInd->powerCap.maxTxPower,
         pMlmAssocInd->supportedChannels.numChnl);)
@@ -213,11 +214,18 @@
     pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo);
     framelen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
 
+   limLog(pMac, LOG1, FL("Received %s Req Frame on sessionid: %d systemrole %d"
+          " limMlmState %d from: "MAC_ADDRESS_STR),
+          (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc",
+          psessionEntry->peSessionId, psessionEntry->limSystemRole,
+          psessionEntry->limMlmState, MAC_ADDR_ARRAY(pHdr->sa));
+
    if (psessionEntry->limSystemRole == eLIM_STA_ROLE || psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE )
    {
-        limLog(pMac, LOGE, FL("received unexpected ASSOC REQ subType=%d for role=%d"),
-               subType, psessionEntry->limSystemRole);
-        limPrintMacAddr(pMac, pHdr->sa, LOGE);
+        limLog(pMac, LOGE, FL("received unexpected ASSOC REQ on sessionid: %d "
+              "sys subType=%d for role=%d from: "MAC_ADDRESS_STR),
+              psessionEntry->peSessionId,
+              subType, psessionEntry->limSystemRole, MAC_ADDR_ARRAY(pHdr->sa));
         sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG3,
         WDA_GET_RX_MPDU_DATA(pRxPacketInfo), framelen);
         return;
@@ -230,33 +238,33 @@
     {
         // Received Re/Assoc Req frame from a BC/MC address
         // Log error and ignore it
-        if (subType == LIM_ASSOC)
-            limLog(pMac, LOGW, FL("received Assoc frame from a BC/MC address "MAC_ADDRESS_STR),
-                   MAC_ADDR_ARRAY(pHdr->sa));
-        else
-            limLog(pMac, LOGW, FL("received ReAssoc frame from a BC/MC address "MAC_ADDRESS_STR),
-                   MAC_ADDR_ARRAY(pHdr->sa));
+        limLog(pMac, LOGE, FL("Received %s Req on sessionid: %d frame from a "
+        "BC/MC address"MAC_ADDRESS_STR),
+        (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc",
+        psessionEntry->peSessionId,
+        MAC_ADDR_ARRAY(pHdr->sa));
         return;
     }
-    limLog(pMac, LOGW, FL("Received AssocReq Frame: "MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));
 
     sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG2, (tANI_U8 *) pBody, framelen);
 
     if (vos_mem_compare((tANI_U8* ) pHdr->sa, (tANI_U8 *) pHdr->da,
                         (tANI_U8) (sizeof(tSirMacAddr))))
     {
+        limLog(pMac, LOGE, FL("Rejected Assoc Req frame Since same mac as"
+                              " SAP/GO"));
         limSendAssocRspMgmtFrame(pMac,
                     eSIR_MAC_UNSPEC_FAILURE_STATUS,
                     1,
                     pHdr->sa,
                     subType, 0,psessionEntry);
-        limLog(pMac, LOGE, FL("Rejected Assoc Req frame Since same mac as SAP/GO"));
         return ;
     }
 
     // If TKIP counter measures active send Assoc Rsp frame to station with eSIR_MAC_MIC_FAILURE_REASON
     if ((psessionEntry->bTkipCntrMeasActive) && (psessionEntry->limSystemRole == eLIM_AP_ROLE))
     {
+        limLog(pMac, LOGE, FL("TKIP counter measure is active"));
         limSendAssocRspMgmtFrame(pMac,
                                     eSIR_MAC_MIC_FAILURE_REASON,
                                     1,
@@ -282,8 +290,8 @@
 
     if (status != eSIR_SUCCESS)
     {
-        limLog(pMac, LOGW, FL("Parse error AssocRequest, length=%d from "),framelen);
-        limPrintMacAddr(pMac, pHdr->sa, LOGW);
+        limLog(pMac, LOGW, FL("Parse error AssocRequest, length=%d from "MAC_ADDRESS_STR),
+                             framelen, MAC_ADDR_ARRAY(pHdr->sa));
         limSendAssocRspMgmtFrame(pMac, eSIR_MAC_UNSPEC_FAILURE_STATUS, 1, pHdr->sa, subType, 0, psessionEntry);
         goto error;
     }
@@ -291,7 +299,8 @@
     pAssocReq->assocReqFrame = vos_mem_malloc(framelen);
     if ( NULL == pAssocReq->assocReqFrame )
     {
-        limLog(pMac, LOGE, FL("Unable to allocate memory for the assoc req, length=%d from "),framelen);
+        limLog(pMac, LOGE, FL("Unable to allocate memory for the assoc req, "
+                              "length=%d from "),framelen);
         goto error;
     }
     
@@ -310,6 +319,11 @@
                                pAssocReq,
                                &localCapabilities,psessionEntry) == false)
     {
+        limLog(pMac, LOGW, FL("local caps mismatch received caps"));
+        limLog(pMac, LOGW, FL("Received %s Req with unsupported "
+        "capabilities from"MAC_ADDRESS_STR),
+        (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc",
+        MAC_ADDR_ARRAY(pHdr->sa));
         /**
          * Capabilities of requesting STA does not match with
          * local capabilities. Respond with 'unsupported capabilities'
@@ -322,17 +336,6 @@
                         pHdr->sa,
                         subType, 0,psessionEntry);
 
-        limLog(pMac, LOGW, FL("local caps mismatch received caps"));
-
-        // Log error
-        if (subType == LIM_ASSOC)
-            limLog(pMac, LOGW,
-               FL("received Assoc req with unsupported capabilities "MAC_ADDRESS_STR),
-                  MAC_ADDR_ARRAY(pHdr->sa));
-        else
-            limLog(pMac, LOGW,
-                   FL("received ReAssoc req with unsupported capabilities "MAC_ADDRESS_STR),
-                   MAC_ADDR_ARRAY(pHdr->sa));
         goto error;
     }
 
@@ -340,6 +343,12 @@
 
     if (limCmpSSid(pMac, &pAssocReq->ssId, psessionEntry) == false)
     {
+        limLog(pMac, LOGW, FL("Received %s Req with unmatched ssid ( Received"
+        " SSID: %.*s current SSID: %.*s ) from "MAC_ADDRESS_STR),
+        (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", pAssocReq->ssId.length,
+        pAssocReq->ssId.ssId, psessionEntry->ssId.length,
+        psessionEntry->ssId.ssId, MAC_ADDR_ARRAY(pHdr->sa));
+
         /**
          * Received Re/Association Request with either
          * Broadcast SSID OR with SSID that does not
@@ -352,14 +361,6 @@
                              pHdr->sa,
                              subType, 0,psessionEntry);
 
-        // Log error
-        if (subType == LIM_ASSOC)
-            limLog(pMac, LOGW,
-                   FL("received Assoc req with unmatched SSID from "));
-        else
-            limLog(pMac, LOGW,
-                   FL("received ReAssoc req with unmatched SSID from "));
-        limPrintMacAddr(pMac, pHdr->sa, LOGW);
         goto error;
     }
 
@@ -383,6 +384,10 @@
     }
     if (limCheckRxBasicRates(pMac, basicRates, psessionEntry) == false)
     {
+        limLog(pMac, LOGW, FL("Received %s Req with unsupported "
+        "rates from"MAC_ADDRESS_STR),
+        (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc",
+        MAC_ADDR_ARRAY(pHdr->sa));
         /**
          * Requesting STA does not support ALL BSS basic
          * rates. Respond with 'basic rates not supported'
@@ -395,14 +400,6 @@
                     pHdr->sa,
                     subType, 0,psessionEntry);
 
-        // Log error
-        if (subType == LIM_ASSOC)
-            limLog(pMac, LOGW,
-               FL("received Assoc req with unsupported rates from "));
-        else
-            limLog(pMac, LOGW,
-               FL("received ReAssoc req with unsupported rates from"));
-        limPrintMacAddr(pMac, pHdr->sa, LOGW);
         goto error;
     }
 
@@ -411,9 +408,10 @@
        (psessionEntry->dot11mode == WNI_CFG_DOT11_MODE_11G_ONLY) &&
        ((!pAssocReq->extendedRatesPresent ) || (pAssocReq->HTCaps.present)))
     {
+        limLog(pMac, LOGE, FL("SOFTAP was in 11G only mode, rejecting legacy "
+                              "STA : "MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));
         limSendAssocRspMgmtFrame( pMac, eSIR_MAC_CAPABILITIES_NOT_SUPPORTED_STATUS, 
                                   1, pHdr->sa, subType, 0, psessionEntry );
-        limLog(pMac, LOGE, FL("SOFTAP was in 11G only mode, rejecting legacy STA's"));
         goto error;
 
     }//end if phyMode == 11G_only
@@ -422,9 +420,10 @@
        (psessionEntry->dot11mode == WNI_CFG_DOT11_MODE_11N_ONLY) && 
        (!pAssocReq->HTCaps.present))
     {
+        limLog(pMac, LOGE, FL("SOFTAP was in 11N only mode, rejecting legacy "
+                              "STA : "MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));
         limSendAssocRspMgmtFrame( pMac, eSIR_MAC_CAPABILITIES_NOT_SUPPORTED_STATUS, 
                                   1, pHdr->sa, subType, 0, psessionEntry );
-        limLog(pMac, LOGE, FL("SOFTAP was in 11N only mode, rejecting legacy STA's"));
         goto error;
     }//end if PhyMode == 11N_only
 
@@ -444,19 +443,19 @@
                 /* One or more required information elements are missing, log the peers error */
                 if (!pAssocReq->powerCapabilityPresent)
                 {
-                    if(subType == LIM_ASSOC)
-                       limLog(pMac, LOG1, FL("LIM Info: Missing Power capability IE in assoc request"));
-                    else
-                       limLog(pMac, LOG1, FL("LIM Info: Missing Power capability IE in Reassoc request"));
+                    limLog(pMac, LOG1, FL("LIM Info: Missing Power capability "
+                    "IE in %s Req from "MAC_ADDRESS_STR),
+                    (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc",
+                    MAC_ADDR_ARRAY(pHdr->sa));
                 }
                 if (!pAssocReq->supportedChannelsPresent)
                 {
-                    if(subType == LIM_ASSOC)
-                        limLog(pMac, LOG1, FL("LIM Info: Missing Supported channel IE in assoc request"));
-                    else
-                        limLog(pMac, LOG1, FL("LIM Info: Missing Supported channel IE in Reassoc request"));
+                    limLog(pMac, LOGW, FL("LIM Info: Missing Supported channel "
+                    "IE in %s Req from "MAC_ADDRESS_STR),
+                    (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc",
+                    MAC_ADDR_ARRAY(pHdr->sa));
+
                 }
-                limPrintMacAddr(pMac, pHdr->sa, LOG1);
             }
             else
             {
@@ -464,20 +463,20 @@
                 status = limIsDot11hPowerCapabilitiesInRange(pMac, pAssocReq, psessionEntry);
                 if (eSIR_SUCCESS != status)
                 {
-                    if (subType == LIM_ASSOC)
-                        limLog(pMac, LOGW, FL("LIM Info: Association MinTxPower(STA) > MaxTxPower(AP)"));
-                    else
-                        limLog(pMac, LOGW, FL("LIM Info: Reassociation MinTxPower(STA) > MaxTxPower(AP)"));
-                    limPrintMacAddr(pMac, pHdr->sa, LOGW);
+                    limLog(pMac, LOGW, FL("LIM Info: MinTxPower(STA) > "
+                    "MaxTxPower(AP) in %s Req from "MAC_ADDRESS_STR),
+                    (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc",
+                    MAC_ADDR_ARRAY(pHdr->sa));
+
                 }
                 status = limIsDot11hSupportedChannelsValid(pMac, pAssocReq);
                 if (eSIR_SUCCESS != status)
                 {
-                    if (subType == LIM_ASSOC)
-                        limLog(pMac, LOGW, FL("LIM Info: Association wrong supported channels (STA)"));
-                    else
-                        limLog(pMac, LOGW, FL("LIM Info: Reassociation wrong supported channels (STA)"));
-                    limPrintMacAddr(pMac, pHdr->sa, LOGW);
+                    limLog(pMac, LOGW, FL("LIM Info: wrong supported "
+                    "channels (STA) in %s Req from "MAC_ADDRESS_STR),
+                    (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc",
+                    MAC_ADDR_ARRAY(pHdr->sa));
+
                 }
                 /* IEs are valid, use them if needed */
             }
@@ -497,6 +496,11 @@
 
     if ( (pAssocReq->HTCaps.present) && (limCheckMCSSet(pMac, pAssocReq->HTCaps.supportedMCSSet) == false))
     {
+         limLog(pMac, LOGW, FL("received %s req with unsupported"
+         "MCS Rate Set from "MAC_ADDRESS_STR),
+         (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc",
+         MAC_ADDR_ARRAY(pHdr->sa));
+
         /**
          * Requesting STA does not support ALL BSS MCS basic Rate set rates.
          * Spec does not define any status code for this scenario.
@@ -508,14 +512,6 @@
                     pHdr->sa,
                     subType, 0,psessionEntry);
 
-        // Log error
-        if (subType == LIM_ASSOC)
-            limLog(pMac, LOGW,
-               FL("received Assoc req with unsupported MCS Rate Set from "));
-        else
-            limLog(pMac, LOGW,
-               FL("received ReAssoc req with unsupported MCS Rate Set from"));
-        limPrintMacAddr(pMac, pHdr->sa, LOGW);
         goto error;
     }
 
@@ -531,6 +527,8 @@
 
         if (!pAssocReq->extendedRatesPresent && val)
         {
+            limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from 11b STA: "
+            MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));
             /**
              * Received Re/Association Request from
              * 11b STA when 11g only policy option
@@ -544,8 +542,6 @@
                            pHdr->sa,
                            subType, 0,psessionEntry);
 
-            limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from 11b STA: "));
-            limPrintMacAddr(pMac, pHdr->sa, LOGW);
             
 #ifdef WLAN_DEBUG    
             pMac->lim.gLim11bStaAssocRejectCount++;
@@ -565,6 +561,10 @@
 
         if ((pMac->lim.gWmmApsd.apsdEnable == 0) && (qInfo->ac_be || qInfo->ac_bk || qInfo->ac_vo || qInfo->ac_vi))
         {
+            limLog(pMac, LOGW,
+                   FL("Rejecting Re/Assoc req from STA: "MAC_ADDRESS_STR),
+                   MAC_ADDR_ARRAY(pHdr->sa));
+            limLog(pMac, LOGE, FL("APSD not enabled, qosInfo - 0x%x"), *qInfo);
 
             /**
              * Received Re/Association Request from
@@ -579,10 +579,6 @@
                            pHdr->sa,
                            subType, 0,psessionEntry);
 
-            limLog(pMac, LOGW,
-                   FL("Rejecting Re/Assoc req from STA: "));
-            limPrintMacAddr(pMac, pHdr->sa, LOGW);
-            limLog(pMac, LOGE, FL("APSD not enabled, qosInfo - 0x%x"), *qInfo);
             goto error;
         }
     }
@@ -673,6 +669,10 @@
                         if(eSIR_SUCCESS != (status = limCheckRxRSNIeMatch(pMac, Dot11fIERSN, psessionEntry,
                                                                           pAssocReq->HTCaps.present, &pmfConnection)))
                         {
+                            limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from "
+                                                  "STA: "MAC_ADDRESS_STR),
+                                                    MAC_ADDR_ARRAY(pHdr->sa));
+
                             /* some IE is not properly sent */
                             /* received Association req frame with RSN IE but length is 0 */
                             limSendAssocRspMgmtFrame(
@@ -682,14 +682,16 @@
                                            pHdr->sa,
                                            subType, 0,psessionEntry);
 
-                            limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA: "));
-                            limPrintMacAddr(pMac, pHdr->sa, LOGW);
                             goto error;
 
                         }
                     }
                     else
                     {
+                        limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from "
+                                              "STA: "MAC_ADDRESS_STR),
+                                              MAC_ADDR_ARRAY(pHdr->sa));
+
                         /* received Association req frame with RSN IE version wrong */
                         limSendAssocRspMgmtFrame(
                                        pMac,
@@ -697,15 +699,14 @@
                                        1,
                                        pHdr->sa,
                                        subType, 0,psessionEntry);
-
-                        limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA: "));
-                        limPrintMacAddr(pMac, pHdr->sa, LOGW);
                         goto error;
 
                     }
                 }
                 else
                 {
+                    limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA:"
+                     MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));
                     /* received Association req frame with RSN IE but length is 0 */
                     limSendAssocRspMgmtFrame(
                                    pMac,
@@ -714,8 +715,6 @@
                                    pHdr->sa,
                                    subType, 0,psessionEntry);
 
-                    limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA: "));
-                    limPrintMacAddr(pMac, pHdr->sa, LOGW);
                     goto error;
                     
                 }
@@ -732,6 +731,8 @@
                     /* check the groupwise and pairwise cipher suites */
                     if(eSIR_SUCCESS != (status = limCheckRxWPAIeMatch(pMac, Dot11fIEWPA, psessionEntry, pAssocReq->HTCaps.present)))
                     {
+                        limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from "
+                              "STA: "MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));
                         /* received Association req frame with WPA IE but mismatch */
                         limSendAssocRspMgmtFrame(
                                        pMac,
@@ -739,15 +740,14 @@
                                        1,
                                        pHdr->sa,
                                        subType, 0,psessionEntry);
-
-                        limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA: "));
-                        limPrintMacAddr(pMac, pHdr->sa, LOGW);
                         goto error;
 
                     }
                 }
                 else
                 {
+                    limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA: "
+                    MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));
                     /* received Association req frame with invalid WPA IE */
                     limSendAssocRspMgmtFrame(
                                    pMac,
@@ -756,8 +756,6 @@
                                    pHdr->sa,
                                    subType, 0,psessionEntry);
 
-                    limLog(pMac, LOGW, FL("Rejecting Re/Assoc req from STA: "));
-                    limPrintMacAddr(pMac, pHdr->sa, LOGW);
                     goto error;
                 }/* end - if(pAssocReq->wpa.length) */
             } /* end - if(pAssocReq->wpaPresent) */
@@ -812,15 +810,11 @@
                      eSIR_MAC_STA_NOT_PRE_AUTHENTICATED_REASON, //=9
                      pHdr->sa, psessionEntry, FALSE);
 
-            // Log error
-            if (subType == LIM_ASSOC)
-                limLog(pMac, LOGW,
-                       FL("received Assoc req from STA that does not have pre-auth context "MAC_ADDRESS_STR),
-                       MAC_ADDR_ARRAY(pHdr->sa));
-            else
-                limLog(pMac, LOGW,
-                       FL("received ReAssoc req from STA that does not have pre-auth context "
-                       MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));
+            limLog(pMac, LOGW, FL("received %s req on sessionid: %d from STA "
+            "that does not have pre-auth context"MAC_ADDRESS_STR),
+            (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc",
+            psessionEntry->peSessionId,
+            MAC_ADDR_ARRAY(pHdr->sa));
             goto error;
         }
 
@@ -848,14 +842,16 @@
 #ifdef WLAN_DEBUG    
                 pMac->lim.gLimNumAssocReqDropInvldState++;
 #endif
-                limLog(pMac, LOG1, FL("received Assoc req in state %X from "), pStaDs->mlmStaContext.mlmState);
+                limLog(pMac, LOG1, FL("received Assoc req in state "
+                   "%X from "), pStaDs->mlmStaContext.mlmState);
             }
             else
             {     
 #ifdef WLAN_DEBUG    
                 pMac->lim.gLimNumReassocReqDropInvldState++;
 #endif
-                limLog(pMac, LOG1, FL("received ReAssoc req in state %X from "), pStaDs->mlmStaContext.mlmState);
+                limLog(pMac, LOG1, FL("received ReAssoc req in state %X"
+                            " from "), pStaDs->mlmStaContext.mlmState);
             }
             limPrintMacAddr(pMac, pHdr->sa, LOG1);
             limPrintMlmState(pMac, LOG1, (tLimMlmStates) pStaDs->mlmStaContext.mlmState);
@@ -957,12 +953,8 @@
     /**
      * STA is Associated !
      */
-    if (subType == LIM_ASSOC)
-        limLog(pMac, LOGW, FL("received Assoc req successful "MAC_ADDRESS_STR),
-               MAC_ADDR_ARRAY(pHdr->sa));
-    else
-        limLog(pMac, LOGW, FL("received ReAssoc req successful"MAC_ADDRESS_STR),
-               MAC_ADDR_ARRAY(pHdr->sa));
+    limLog(pMac, LOGE, FL("Received %s Req  successful from "MAC_ADDRESS_STR),
+    (LIM_ASSOC == subType) ? "Assoc" : "ReAssoc", MAC_ADDR_ARRAY(pHdr->sa));
 
     /**
      * AID for this association will be same as the peer Index used in DPH table.
@@ -995,9 +987,9 @@
     {
         // Could not add hash table entry at DPH
         limLog(pMac, LOGE,
-           FL("could not add hash entry at DPH for aid=%d, MacAddr:"),
-           peerIdx);
-        limPrintMacAddr(pMac, pHdr->sa, LOGE);
+           FL("could not add hash entry at DPH for aid=%d, MacAddr:"
+           MAC_ADDRESS_STR),
+           peerIdx,MAC_ADDR_ARRAY(pHdr->sa));
 
         // Release AID
         limReleasePeerIdx(pMac, peerIdx, psessionEntry);
@@ -1129,9 +1121,9 @@
     {
         // Could not update hash table entry at DPH with rateset
         limLog(pMac, LOGE,
-           FL("could not update hash entry at DPH for aid=%d, MacAddr:"),
-           peerIdx);
-        limPrintMacAddr(pMac, pHdr->sa, LOGE);
+           FL("could not update hash entry at DPH for aid=%d, MacAddr: "
+           MAC_ADDRESS_STR),
+           peerIdx, MAC_ADDR_ARRAY(pHdr->sa));
 
                 // Release AID
         limReleasePeerIdx(pMac, peerIdx, psessionEntry);
@@ -1184,7 +1176,8 @@
                  * Received Re/Association Request from
                  * STA when UPASD is not supported.
                  */
-                limLog( pMac, LOGE, FL( "AP do not support UPASD REASSOC Failed" ));
+                limLog( pMac, LOGE, FL( "AP do not support UPASD "
+                                      "REASSOC Failed" ));
                 /* During wlan fuzz tests for softAP when mal-formed assoc req is
                  * sent to AP due to delSTA is not done in firmnware UMAC is
                  * stuck in some bad state.if we set this flag delsta will happen
@@ -1247,7 +1240,8 @@
         // BTAMP: Add STA context at HW - issue WDA_ADD_STA_REQ to HAL
         if (limAddSta(pMac, pStaDs, false, psessionEntry) != eSIR_SUCCESS)
         {
-            limLog(pMac, LOGE, FL("could not Add STA with assocId=%d"), pStaDs->assocId);
+            limLog(pMac, LOGE, FL("could not Add STA with assocId=%d"),
+                                  pStaDs->assocId);
             limRejectAssociation( pMac, pStaDs->staAddr, pStaDs->mlmStaContext.subType,
                                   true, pStaDs->mlmStaContext.authType, pStaDs->assocId, true,
                                   (tSirResultCodes) eSIR_MAC_UNSPEC_FAILURE_STATUS, psessionEntry);
@@ -1269,7 +1263,8 @@
             pStaDs->mlmStaContext.mlmState = eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE;
             if(limDelSta(pMac, pStaDs, true, psessionEntry) != eSIR_SUCCESS)
             {
-                limLog(pMac, LOGE, FL("could not DEL STA with assocId=%d staId %d"), pStaDs->assocId, pStaDs->staIndex);
+                limLog(pMac, LOGE, FL("could not DEL STA with assocId=%d staId %d"),
+                                       pStaDs->assocId, pStaDs->staIndex);
                 limRejectAssociation( pMac, pStaDs->staAddr, pStaDs->mlmStaContext.subType, true, pStaDs->mlmStaContext.authType,
                                       pStaDs->assocId, true,(tSirResultCodes) eSIR_MAC_UNSPEC_FAILURE_STATUS, psessionEntry);
 
@@ -1285,7 +1280,8 @@
             /* use the same AID, already allocated */
             if (limAddSta(pMac, pStaDs, false, psessionEntry) != eSIR_SUCCESS)
             {
-                    limLog( pMac, LOGE, FL( "AP do not support UPASD REASSOC Failed" ));
+                    limLog( pMac, LOGE, FL( "AP do not support UPASD "
+                                            "REASSOC Failed"));
                     limRejectAssociation( pMac, pStaDs->staAddr, pStaDs->mlmStaContext.subType, true, pStaDs->mlmStaContext.authType,
                                           pStaDs->assocId, true,(tSirResultCodes) eSIR_MAC_WME_REFUSED_STATUS, psessionEntry);
 
@@ -1360,7 +1356,6 @@
 
     // Get the phyMode
     limGetPhyMode(pMac, &phyMode, psessionEntry);
- 
     // Extract pre-auth context for the peer BTAMP-STA, if any.
  
     // Determiine if its Assoc or ReAssoc Request
@@ -1368,6 +1363,11 @@
         subType = LIM_REASSOC;
     else 
         subType = LIM_ASSOC;
+
+    limLog(pMac, LOG1, FL("Sessionid %d ssid %s subtype %d Associd %d staAddr "
+    MAC_ADDRESS_STR), psessionEntry->peSessionId, pAssocReq->ssId.ssId,
+    subType,pStaDs->assocId,MAC_ADDR_ARRAY(pStaDs->staAddr));
+
     if (subType == LIM_ASSOC || subType == LIM_REASSOC)
     {
         temp  = sizeof(tLimMlmAssocInd);
@@ -1400,7 +1400,8 @@
         }
         if (pAssocReq->rsnPresent && (NULL == wpsIe))
         {
-            limLog(pMac, LOG2, FL("Assoc Req RSN IE len = %d"), pAssocReq->rsn.length);
+            limLog(pMac, LOG2, FL("Assoc Req RSN IE len = %d"),
+                                    pAssocReq->rsn.length);
             pMlmAssocInd->rsnIE.length = 2 + pAssocReq->rsn.length;
             pMlmAssocInd->rsnIE.rsnIEdata[0] = SIR_MAC_RSN_EID;
             pMlmAssocInd->rsnIE.rsnIEdata[1] = pAssocReq->rsn.length;
@@ -1426,7 +1427,8 @@
         {
             if((pMlmAssocInd->rsnIE.length + pAssocReq->wpa.length) >= SIR_MAC_MAX_IE_LENGTH)
             {
-                PELOGE(limLog(pMac, LOGE, FL("rsnIEdata index out of bounds %d"), pMlmAssocInd->rsnIE.length);)
+                PELOGE(limLog(pMac, LOGE, FL("rsnIEdata index out of bounds %d"),
+                                              pMlmAssocInd->rsnIE.length);)
                 vos_mem_free(pMlmAssocInd);
                 return;
             }
@@ -1453,7 +1455,8 @@
         {
 
             if (wlan_cfgGetInt(pMac, (tANI_U16) WNI_CFG_WME_ENABLED, &tmp) != eSIR_SUCCESS)
-                 limLog(pMac, LOGP, FL("wlan_cfgGetInt failed for id %d"), WNI_CFG_WME_ENABLED );
+                 limLog(pMac, LOGP, FL("wlan_cfgGetInt failed for id %d"),
+                                                WNI_CFG_WME_ENABLED );
 
             /* check whether AP is enabled with WMM */
             if(tmp)
@@ -1486,7 +1489,8 @@
         pMlmReassocInd = vos_mem_malloc(temp);
         if (NULL == pMlmReassocInd)
         {
-            limLog(pMac, LOGP, FL("call to AllocateMemory failed for pMlmReassocInd"));
+            limLog(pMac, LOGP, FL("call to AllocateMemory failed for "
+                                  "pMlmReassocInd"));
             limReleasePeerIdx(pMac, pStaDs->assocId, psessionEntry);
             return;
         }
@@ -1512,7 +1516,8 @@
 
         if (pAssocReq->rsnPresent && (NULL == wpsIe))
         {
-            limLog(pMac, LOG2, FL("Assoc Req: RSN IE length = %d"), pAssocReq->rsn.length);
+            limLog(pMac, LOG2, FL("Assoc Req: RSN IE length = %d"),
+                                            pAssocReq->rsn.length);
             pMlmReassocInd->rsnIE.length = 2 + pAssocReq->rsn.length;
             pMlmReassocInd->rsnIE.rsnIEdata[0] = SIR_MAC_RSN_EID;
             pMlmReassocInd->rsnIE.rsnIEdata[1] = pAssocReq->rsn.length;
@@ -1529,7 +1534,8 @@
             pMlmReassocInd->supportedChannels.numChnl = (tANI_U8)(pAssocReq->supportedChannels.length / 2);
 
             limLog(pMac, LOG1,
-                FL("Sending Reassoc Ind: spectrum ON, minPwr %d, maxPwr %d, numChnl %d"),
+                FL("Sending Reassoc Ind: spectrum ON, minPwr %d, "
+                   "maxPwr %d, numChnl %d"),
                 pMlmReassocInd->powerCap.minTxPower,
                 pMlmReassocInd->powerCap.maxTxPower,
                 pMlmReassocInd->supportedChannels.numChnl);
@@ -1549,7 +1555,8 @@
         /* This check is to avoid extra Sec IEs present incase of WPS */
         if (pAssocReq->wpaPresent && (NULL == wpsIe))
         {
-            limLog(pMac, LOG2, FL("Received WPA IE length in Assoc Req is %d"), pAssocReq->wpa.length);
+            limLog(pMac, LOG2, FL("Received WPA IE length in Assoc Req is %d"),
+                                   pAssocReq->wpa.length);
             pMlmReassocInd->rsnIE.rsnIEdata[pMlmReassocInd->rsnIE.length] = SIR_MAC_WPA_EID;
             pMlmReassocInd->rsnIE.rsnIEdata[pMlmReassocInd->rsnIE.length + 1] = pAssocReq->wpa.length;
             vos_mem_copy(&pMlmReassocInd->rsnIE.rsnIEdata[pMlmReassocInd->rsnIE.length + 2],
@@ -1572,7 +1579,8 @@
         {
 
             if (wlan_cfgGetInt(pMac, (tANI_U16) WNI_CFG_WME_ENABLED, &tmp) != eSIR_SUCCESS)
-                 limLog(pMac, LOGP, FL("wlan_cfgGetInt failed for id %d"), WNI_CFG_WME_ENABLED );
+                 limLog(pMac, LOGP, FL("wlan_cfgGetInt failed for id %d"),
+                                                    WNI_CFG_WME_ENABLED );
 
             /* check whether AP is enabled with WMM */
             if(tmp)