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

Added error and info logs, trimmed the logs
(exeeding 80 characters) and rearranged some logs
for connect path in limProcessAuthFrame.c

Change-Id: I54f9408b11a0fcf05a209bf8670039c2b529804f
CRs-Fixed: 576052
diff --git a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
index 48cea75..487a35a 100644
--- a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
@@ -254,15 +254,14 @@
             authFrame.authAlgoNumber = eSIR_SHARED_KEY;
             authFrame.authTransactionSeqNumber = SIR_MAC_AUTH_FRAME_4;
             authFrame.authStatusCode = eSIR_MAC_CHALLENGE_FAILURE_STATUS;
-
+            // Log error
+            PELOGE(limLog(pMac, LOGE,
+                   FL("received Authentication frame with wep bit set on "
+                   "role=%d "MAC_ADDRESS_STR),
+                   psessionEntry->limSystemRole, MAC_ADDR_ARRAY(pHdr->sa) );)
             limSendAuthMgmtFrame(pMac, &authFrame,
                                  pHdr->sa,
                                  LIM_NO_WEP_IN_FC,psessionEntry);
-            // Log error
-            PELOGE(limLog(pMac, LOGE,
-                   FL("received Authentication frame with wep bit set on role=%d "MAC_ADDRESS_STR),
-                   psessionEntry->limSystemRole, MAC_ADDR_ARRAY(pHdr->sa) );)
-
             return;
         }
 
@@ -305,6 +304,12 @@
 
             if (pAuthNode == NULL)
             {
+                // Log error
+                PELOGE(limLog(pMac, LOGE,
+                       FL("received Authentication frame from peer that has "
+                       "no preauth context with WEP bit set "MAC_ADDRESS_STR),
+                       MAC_ADDR_ARRAY(pHdr->sa));)
+
                 /**
                  * No 'pre-auth' context exists for this STA that sent
                  * an Authentication frame with FC bit set.
@@ -320,12 +325,6 @@
                                      pHdr->sa,
                                      LIM_NO_WEP_IN_FC,psessionEntry);
 
-                // Log error
-                PELOGE(limLog(pMac, LOGE,
-                       FL("received Authentication frame from peer that has "
-                       "no preauth context with WEP bit set "MAC_ADDRESS_STR),
-                       MAC_ADDR_ARRAY(pHdr->sa));)
-
                 return;
             }
             else
@@ -341,6 +340,12 @@
                     (pAuthNode->mlmState !=
                      eLIM_MLM_AUTH_RSP_TIMEOUT_STATE))
                 {
+                    // Log error
+                    PELOGE(limLog(pMac, LOGE,
+                           FL("received Authentication frame from peer that is "
+                           "in state %d "MAC_ADDRESS_STR),
+                            pAuthNode->mlmState, MAC_ADDR_ARRAY(pHdr->sa));)
+
                     /**
                      * Should not have received Authentication frame
                      * with WEP bit set in FC in other states.
@@ -358,11 +363,6 @@
                                          pHdr->sa,
                                          LIM_NO_WEP_IN_FC,psessionEntry);
 
-                    // Log error
-                    PELOGE(limLog(pMac, LOGE,
-                           FL("received Authentication frame from peer that is in state %d "
-                           MAC_ADDRESS_STR), pAuthNode->mlmState, MAC_ADDR_ARRAY(pHdr->sa));)
-
                     return;
                 }
             }
@@ -377,6 +377,12 @@
             {
                 if (!pKeyMapEntry->wepOn)
                 {
+                    // Log error
+                    PELOGE(limLog(pMac, LOGE,
+                           FL("received Auth frame3 from peer that has NULL "
+                           "key map entry "
+                           MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));)
+
                     /**
                      * Key Mapping entry has null key.
                      * Send Authentication frame
@@ -392,11 +398,6 @@
                                          pHdr->sa,
                                          LIM_NO_WEP_IN_FC,psessionEntry);
 
-                    // Log error
-                    PELOGE(limLog(pMac, LOGE,
-                           FL("received Auth frame3 from peer that has NULL key map entry "
-                           MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));)
-
                     return;
                 } // if (!pKeyMapEntry->wepOn)
                 else
@@ -409,7 +410,14 @@
                     if (decryptResult == LIM_DECRYPT_ICV_FAIL)
                     {
                         /// ICV failure
-                        PELOGW(limLog(pMac, LOGW, FL("=====> decryptResult == LIM_DECRYPT_ICV_FAIL ..."));)
+                        PELOGW(limLog(pMac, LOGW, FL("=====> decryptResult == "
+                        "LIM_DECRYPT_ICV_FAIL ..."));)
+                        // Log error
+                        PELOGE(limLog(pMac, LOGE,
+                               FL("received Authentication frame from peer "
+                               "that failed decryption, Addr "
+                               MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));)
+
                         limDeletePreAuthNode(pMac,
                                              pHdr->sa);
                         authFrame.authAlgoNumber = eSIR_SHARED_KEY;
@@ -423,16 +431,19 @@
                                             pHdr->sa,
                                             LIM_NO_WEP_IN_FC,psessionEntry);
 
-                        // Log error
-                        PELOGE(limLog(pMac, LOGE,
-                               FL("received Authentication frame from peer that failed decryption, Addr "
-                               MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));)
 
                         return;
                     }
 
-                    if ((sirConvertAuthFrame2Struct(pMac, plainBody, frameLen-8, &rxAuthFrame)!=eSIR_SUCCESS)||(!isAuthValid(pMac, &rxAuthFrame,psessionEntry)))
+                    if ( ( sirConvertAuthFrame2Struct(pMac, plainBody, frameLen-8,
+                         &rxAuthFrame)!=eSIR_SUCCESS ) ||
+                         ( !isAuthValid(pMac, &rxAuthFrame,psessionEntry) ) )
+                    {
+                        PELOGE(limLog(pMac, LOGE,
+                               FL("failed to convert Auth Frame to structure "
+                               "or Auth is not valid "));)
                         return;
+                    }
 
 
                 } // end if (pKeyMapEntry->key == NULL)
@@ -485,7 +496,13 @@
                                                         (tANI_U16) (frameLen-SIR_MAC_WEP_IV_LENGTH));
                     if (decryptResult == LIM_DECRYPT_ICV_FAIL)
                     {
-                        PELOGW(limLog(pMac, LOGW, FL("=====> decryptResult == LIM_DECRYPT_ICV_FAIL ..."));)
+                        PELOGW(limLog(pMac, LOGW, FL("=====> decryptResult == "
+                        "LIM_DECRYPT_ICV_FAIL ..."));)
+                        // Log error
+                        PELOGE(limLog(pMac, LOGE,
+                               FL("received Authentication frame from peer that "
+                               "failed decryption: "
+                               MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));)
                         /// ICV failure
                         limDeletePreAuthNode(pMac,
                                              pHdr->sa);
@@ -500,20 +517,26 @@
                                             pHdr->sa,
                                             LIM_NO_WEP_IN_FC,psessionEntry);
 
-                        // Log error
-                        PELOGE(limLog(pMac, LOGE,
-                               FL("received Authentication frame from peer that failed decryption: "
-                               MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));)
-
                         return;
                     }
-                    if ((sirConvertAuthFrame2Struct(pMac, plainBody, frameLen-8, &rxAuthFrame)!=eSIR_SUCCESS)||(!isAuthValid(pMac, &rxAuthFrame,psessionEntry)))
+                    if ( ( sirConvertAuthFrame2Struct(pMac, plainBody, frameLen-8,
+                         &rxAuthFrame)!=eSIR_SUCCESS ) ||
+                        ( !isAuthValid(pMac, &rxAuthFrame, psessionEntry) ) )
+                     {
+                        PELOGE(limLog(pMac, LOGE,
+                               FL("failed to convert Auth Frame to structure "
+                               "or Auth is not valid "));)
                         return;
-
+                    }
             } // End of check for Key Mapping/Default key presence
         }
         else
         {
+            // Log error
+            PELOGE(limLog(pMac, LOGE,
+                   FL("received Authentication frame3 from peer that while "
+                   "privacy option is turned OFF "
+                   MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));)
             /**
              * Privacy option is not implemented.
              * So reject Authentication frame received with
@@ -533,11 +556,6 @@
                                  pHdr->sa,
                                  LIM_NO_WEP_IN_FC,psessionEntry);
 
-            // Log error
-            PELOGE(limLog(pMac, LOGE,
-                   FL("received Authentication frame3 from peer that while privacy option is turned OFF "
-                   MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));)
-
             return;
         } // else if (wlan_cfgGetInt(CFG_PRIVACY_OPTION_IMPLEMENTED))
     } // if (fc.wep)
@@ -545,8 +563,15 @@
     {
 
 
-        if ((sirConvertAuthFrame2Struct(pMac, pBody, frameLen, &rxAuthFrame)!=eSIR_SUCCESS)||(!isAuthValid(pMac, &rxAuthFrame,psessionEntry)))
+        if ( ( sirConvertAuthFrame2Struct(pMac, pBody,
+            frameLen, &rxAuthFrame)!=eSIR_SUCCESS ) ||
+            ( !isAuthValid(pMac, &rxAuthFrame,psessionEntry) ) )
+        {
+            PELOGE(limLog(pMac, LOGE,
+                   FL("failed to convert Auth Frame to structure or Auth is "
+                   "not valid "));)
             return;
+        }
     }
 
 
@@ -614,7 +639,8 @@
                                                     eLIM_AUTH_RSP_TIMER,
                                                     pAuthNode->authNodeIdx);
                     }
-                    PELOGE(limLog(pMac, LOGE, FL("STA is initiating brand-new Authentication ..."));)
+                    PELOGE(limLog(pMac, LOGE, FL("STA is initiating brand-new "
+                    "Authentication ..."));)
                     limDeletePreAuthNode(pMac,
                                          pHdr->sa);
                     /**
@@ -641,7 +667,9 @@
 
                     if (NULL != pStaDs)
                     {
-                        PELOGE(limLog(pMac, LOGE, FL("lim Delete Station Context (staId: %d, assocId: %d) "),pStaDs->staIndex, assocId);)
+                        PELOGE(limLog(pMac, LOGE, FL("lim Delete Station "
+                        "Context (staId: %d, assocId: %d) "),pStaDs->staIndex,
+                        assocId);)
                         limSendDeauthMgmtFrame(pMac,
                                eSIR_MAC_UNSPEC_FAILURE_REASON, (tANI_U8 *) pAuthNode->peerMacAddr, psessionEntry, FALSE);
                         limTriggerSTAdeletion(pMac, pStaDs, psessionEntry);
@@ -655,7 +683,8 @@
                      * but ACK lost at STA side, in this case 2nd auth frame is already 
                      * in transmission queue
                      * */
-                    PELOGE(limLog(pMac, LOGE, FL("STA is initiating Authentication after ACK lost..."));)
+                    PELOGE(limLog(pMac, LOGE, FL("STA is initiating "
+                    "Authentication after ACK lost..."));)
                     return;
                 }
             }
@@ -671,6 +700,8 @@
             }
             if (pMac->lim.gLimNumPreAuthContexts == maxNumPreAuth)
             {
+                PELOGE(limLog(pMac, LOGE, FL("Max number of "
+                    "preauth context reached"));)
                 /**
                  * Maximum number of pre-auth contexts
                  * reached. Send Authentication frame
@@ -775,6 +806,12 @@
                         cfgPrivacyOptImp = (tANI_U8)val;
                         if (!cfgPrivacyOptImp)
                         {
+                            // Log error
+                            PELOGE(limLog(pMac, LOGE,
+                                   FL("received Auth frame for unsupported auth algorithm %d "
+                                   MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber,
+                                   MAC_ADDR_ARRAY(pHdr->sa));)
+
                             /**
                              * Authenticator does not have WEP
                              * implemented.
@@ -795,12 +832,6 @@
                                                 pHdr->sa,
                                                 LIM_NO_WEP_IN_FC,psessionEntry);
 
-                            // Log error
-                            PELOGE(limLog(pMac, LOGE,
-                                   FL("received Auth frame for unsupported auth algorithm %d "
-                                   MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, 
-                                   MAC_ADDR_ARRAY(pHdr->sa));)
-
                             return;
                         }
                         else
@@ -873,7 +904,8 @@
                             // TODO
                             //if( !VOS_IS_STATUS_SUCCESS( vos_rand_get_bytes( 0, (tANI_U8 *)challengeTextArray, SIR_MAC_AUTH_CHALLENGE_LENGTH ) ) )
                             {
-                               limLog(pMac, LOGE,FL("Challenge text preparation failed in limProcessAuthFrame"));
+                               limLog(pMac, LOGE,FL("Challenge text "
+                               "preparation failed in limProcessAuthFrame"));
                             }
                             
                             pChallenge = pAuthNode->challengeText;
@@ -907,6 +939,13 @@
                         break;
 
                     default:
+                         // Log error
+                       PELOGE( limLog(pMac, LOGE,
+                               FL("received Auth frame for unsupported auth "
+                               "algorithm %d "MAC_ADDRESS_STR),
+                               pRxAuthFrameBody->authAlgoNumber,
+                               MAC_ADDR_ARRAY(pHdr->sa));)
+
                         /**
                          * Responding party does not support the
                          * authentication algorithm requested by
@@ -927,17 +966,18 @@
                                             pHdr->sa,
                                             LIM_NO_WEP_IN_FC,psessionEntry);
 
-                        // Log error
-                       PELOGE( limLog(pMac, LOGE,
-                               FL("received Auth frame for unsupported auth algorithm %d "
-                               MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, 
-                               MAC_ADDR_ARRAY(pHdr->sa));)
-
                         return;
                 } // end switch(pRxAuthFrameBody->authAlgoNumber)
             } // if (limIsAuthAlgoSupported(pRxAuthFrameBody->authAlgoNumber))
             else
             {
+                // Log error
+                PELOGE(limLog(pMac, LOGE,
+                       FL("received Authentication frame for unsupported auth "
+                       "algorithm %d "MAC_ADDRESS_STR),
+                       pRxAuthFrameBody->authAlgoNumber,
+                       MAC_ADDR_ARRAY(pHdr->sa));)
+
                 /**
                  * Responding party does not support the
                  * authentication algorithm requested by sending party.
@@ -954,11 +994,6 @@
                                      pHdr->sa,
                                      LIM_NO_WEP_IN_FC,psessionEntry);
 
-                // Log error
-                PELOGE(limLog(pMac, LOGE,
-                       FL("received Authentication frame for unsupported auth algorithm %d "
-                       MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, 
-                       MAC_ADDR_ARRAY(pHdr->sa));)
                 return;
             } //end if (limIsAuthAlgoSupported(pRxAuthFrameBody->authAlgoNumber))
             break;
@@ -994,7 +1029,8 @@
 
                 // Log error
                 PELOGW(limLog(pMac, LOGW,
-                       FL("received Auth frame2 from unexpected peer "MAC_ADDRESS_STR),
+                       FL("received Auth frame2 from unexpected peer "
+                       MAC_ADDRESS_STR),
                        MAC_ADDR_ARRAY(pHdr->sa));)
 
                 break;
@@ -1030,7 +1066,7 @@
                 // Log error
                 PELOGW(limLog(pMac, LOGW,
                        FL("received Auth frame2 for unexpected auth algo number %d "
-                       MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, 
+                       MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber,
                        MAC_ADDR_ARRAY(pHdr->sa));)
 
                 break;
@@ -1099,8 +1135,9 @@
 
                         // Log error
                        PELOGE( limLog(pMac, LOGE,
-                               FL("received Auth frame from peer for unsupported auth algo %d "
-                               MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, 
+                               FL("received Auth frame from peer for "
+                               "unsupported auth algo %d "
+                               MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber,
                                MAC_ADDR_ARRAY(pHdr->sa));)
 
                         authFrame.authAlgoNumber =
@@ -1123,7 +1160,8 @@
                         {
                             // Log error
                             PELOGE(limLog(pMac, LOGE,
-                                   FL("received Auth frame with invalid challenge text IE"));)
+                                   FL("received Auth frame with invalid "
+                                   "challenge text IE"));)
 
                             return;
                         }
@@ -1139,6 +1177,12 @@
                         {
                             if (pKeyMapEntry->key == NULL)
                             {
+                                // Log error
+                                PELOGE(limLog(pMac, LOGE,
+                                       FL("received Auth frame from peer when "
+                                       "key mapping key is NULL"MAC_ADDRESS_STR),
+                                       MAC_ADDR_ARRAY(pHdr->sa));)
+
                                 /**
                                  * Key Mapping entry has null key.
                                  * Send Auth frame with
@@ -1155,11 +1199,6 @@
                                                      pHdr->sa,
                                                      LIM_NO_WEP_IN_FC,psessionEntry);
 
-                                // Log error
-                                PELOGE(limLog(pMac, LOGE,
-                                       FL("received Auth frame from peer when key mapping key is NULL"
-                                       MAC_ADDRESS_STR),MAC_ADDR_ARRAY(pHdr->sa));)
-
                                 limRestoreFromAuthState(pMac, eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER,
                                                               eSIR_MAC_UNSPEC_FAILURE_REASON,psessionEntry);
 
@@ -1299,6 +1338,13 @@
 
             if (pRxAuthFrameBody->authAlgoNumber != eSIR_SHARED_KEY)
             {
+                // Log error
+                PELOGE(limLog(pMac, LOGE,
+                       FL("received Auth frame3 from peer with auth algo "
+                       "number %d "MAC_ADDRESS_STR),
+                       pRxAuthFrameBody->authAlgoNumber,
+                       MAC_ADDR_ARRAY(pHdr->sa));)
+
                 /**
                  * Received Authentication frame3 with algorithm other than
                  * Shared Key authentication type. Reject with Auth frame4
@@ -1314,12 +1360,6 @@
                                      pHdr->sa,
                                      LIM_NO_WEP_IN_FC,psessionEntry);
 
-                // Log error
-                PELOGE(limLog(pMac, LOGE,
-                       FL("received Auth frame3 from peer with auth algo number %d "
-                       MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, 
-                       MAC_ADDR_ARRAY(pHdr->sa));)
-
                 return;
             }
 
@@ -1333,6 +1373,12 @@
                  */
                 if (!pHdr->fc.wep)
                 {
+                    // Log error
+                    PELOGE(limLog(pMac, LOGE,
+                           FL("received Auth frame3 from peer with no WEP bit "
+                           "set "MAC_ADDRESS_STR),
+                           MAC_ADDR_ARRAY(pHdr->sa));)
+
                     /// WEP bit is not set in FC of Auth Frame3
                     authFrame.authAlgoNumber = eSIR_SHARED_KEY;
                     authFrame.authTransactionSeqNumber =
@@ -1344,11 +1390,6 @@
                                          pHdr->sa,
                                          LIM_NO_WEP_IN_FC,psessionEntry);
 
-                    // Log error
-                    PELOGE(limLog(pMac, LOGE,
-                           FL("received Auth frame3 from peer with no WEP bit set "MAC_ADDRESS_STR),
-                           MAC_ADDR_ARRAY(pHdr->sa));)
-
                     return;
                 }
 
@@ -1356,6 +1397,12 @@
                                                 pHdr->sa);
                 if (pAuthNode == NULL)
                 {
+                     // Log error
+                    PELOGE(limLog(pMac, LOGW,
+                           FL("received AuthFrame3 from peer that has no "
+                           "preauth context "MAC_ADDRESS_STR),
+                            MAC_ADDR_ARRAY(pHdr->sa));)
+
                     /**
                      * No 'pre-auth' context exists for
                      * this STA that sent an Authentication
@@ -1373,16 +1420,15 @@
                                          pHdr->sa,
                                          LIM_NO_WEP_IN_FC,psessionEntry);
 
-                    // Log error
-                    PELOGE(limLog(pMac, LOGW,
-                           FL("received AuthFrame3 from peer that has no preauth context "
-                           MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pHdr->sa));)
-
                     return;
                 }
 
                 if (pAuthNode->mlmState == eLIM_MLM_AUTH_RSP_TIMEOUT_STATE)
                 {
+                    // Log error
+                    limLog(pMac, LOGW,
+                           FL("auth response timer timedout for peer "));
+                    limPrintMacAddr(pMac, pHdr->sa, LOGW);
                     /**
                      * Received Auth Frame3 after Auth Response timeout.
                      * Reject by sending Auth Frame4 with
@@ -1399,11 +1445,6 @@
                                         pHdr->sa,
                                         LIM_NO_WEP_IN_FC,psessionEntry);
 
-                    // Log error
-                    limLog(pMac, LOGW,
-                           FL("auth response timer timedout for peer "));
-                    limPrintMacAddr(pMac, pHdr->sa, LOGW);
-
                     /// Delete pre-auth context of STA
                     limDeletePreAuthNode(pMac,
                                          pHdr->sa);
@@ -1475,6 +1516,11 @@
                 }
                 else
                 {
+                     // Log error
+                    PELOGE( limLog(pMac, LOGW,
+                                   FL("Challenge failure for peer "
+                                   MAC_ADDRESS_STR),
+                                   MAC_ADDR_ARRAY(pHdr->sa));)
                     /**
                      * Challenge Failure.
                      * Send Authentication frame4 with 'challenge failure'
@@ -1493,10 +1539,6 @@
                                          pHdr->sa,
                                          LIM_NO_WEP_IN_FC,psessionEntry);
 
-                    // Log error
-                    PELOGE( limLog(pMac, LOGW,
-                                   FL("Challenge failure for peer "MAC_ADDRESS_STR),
-                                   MAC_ADDR_ARRAY(pHdr->sa));)
                     return;
                 }
             } // if (pMac->lim.gLimSystemRole == eLIM_AP_ROLE || ...
@@ -1514,8 +1556,8 @@
 
                 // Log error
                 PELOG1(limLog(pMac, LOG1,
-                       FL("received unexpected Auth frame4 from peer in state %d, addr "),
-                       psessionEntry->limMlmState);)
+                       FL("received unexpected Auth frame4 from peer in state "
+                       "%d, addr "), psessionEntry->limMlmState);)
                PELOG1( limPrintMacAddr(pMac, pHdr->sa, LOG1);)
 
                 return;
@@ -1532,8 +1574,8 @@
 
                 // Log error
                 PELOGE(limLog(pMac, LOGE,
-                       FL("received Auth frame4 from peer with invalid auth algo %d "
-                       MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber, 
+                       FL("received Auth frame4 from peer with invalid auth "
+                       "algo %d "MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber,
                        MAC_ADDR_ARRAY(pHdr->sa));)
 
                 return;
@@ -1567,8 +1609,9 @@
                  */
 
                 PELOGE(limLog(pMac, LOGE,
-                       FL("received Authentication frame from peer with invalid auth seq number %d "
-                       MAC_ADDRESS_STR), pRxAuthFrameBody->authTransactionSeqNumber, 
+                       FL("received Authentication frame from peer with "
+                       "invalid auth seq number %d "
+                       MAC_ADDRESS_STR), pRxAuthFrameBody->authTransactionSeqNumber,
                        MAC_ADDR_ARRAY(pHdr->sa));)
 
                 break;
@@ -1629,8 +1672,9 @@
 
             // Log error
             PELOGE(limLog(pMac, LOGE,
-                   FL("received Auth frame from peer with invalid auth seq number %d "
-                   MAC_ADDRESS_STR), pRxAuthFrameBody->authTransactionSeqNumber, 
+                   FL("received Auth frame from peer with invalid auth seq "
+                   "number %d " MAC_ADDRESS_STR),
+                   pRxAuthFrameBody->authTransactionSeqNumber,
                    MAC_ADDR_ARRAY(pHdr->sa));)
 
             break;
@@ -1677,18 +1721,21 @@
     psessionEntry = pMac->ft.ftPEContext.psavedsessionEntry;
     if (psessionEntry == NULL) 
     {
-        limLog(pMac, LOGW, FL("Error: Unable to find session id while in pre-auth phase for FT"));
+        limLog(pMac, LOGE, FL("Error: Unable to find session id while in "
+        "pre-auth phase for FT"));
         return eSIR_FAILURE;
     }
 
     if (pMac->ft.ftPEContext.pFTPreAuthReq == NULL)
     {
+        limLog(pMac, LOGE, FL("Error: No FT"));
         // No FT in progress.
         return eSIR_FAILURE;
     }
 
     if (frameLen == 0) 
     {
+        limLog(pMac, LOGE, FL("Error: Frame len = 0"));
         return eSIR_FAILURE;
     }
 #ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG
@@ -1704,6 +1751,7 @@
     if (!vos_mem_compare(pMac->ft.ftPEContext.pFTPreAuthReq->preAuthbssId,
                          pHdr->bssId, sizeof( tSirMacAddr )))
     {
+        limLog(pMac, LOGE, FL("Error: Same bssid as preauth BSSID"));
         // In this case SME if indeed has triggered a 
         // pre auth it will time out.
         return eSIR_FAILURE;