diff options
| author | Krishna Kumaar Natarajan <kknatara@qca.qualcomm.com> | 2015-03-23 21:07:35 -0700 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2015-04-09 16:33:06 +0530 |
| commit | f7e1cf045d615bb1eff11a0eb8f8d8a9f05c632b (patch) | |
| tree | 88f853d3328b919718ff553fc174dd75c872f12d | |
| parent | 799d684bb66479014a68d46a952646121ba1a634 (diff) | |
qcacld: Enhance user space logging for connectivity events
Add user space logging options for some connectivity events like
AUTHENTICATION, ASSOCIATION and SCANNING.
Change-Id: Ie869e6e7ed2797c67f849f5380fea117086acd32
CRs-Fixed: 818320
| -rw-r--r-- | CORE/MAC/src/pe/lim/limFT.c | 6 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c | 9 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c | 22 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limSecurityUtils.c | 5 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limSendManagementFrames.c | 12 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limUtils.h | 15 | ||||
| -rw-r--r-- | CORE/SME/inc/csrInternal.h | 11 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiScan.c | 7 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrUtil.c | 32 |
11 files changed, 109 insertions, 18 deletions
diff --git a/CORE/MAC/src/pe/lim/limFT.c b/CORE/MAC/src/pe/lim/limFT.c index 05a7170925bc..f85599eb6da6 100644 --- a/CORE/MAC/src/pe/lim/limFT.c +++ b/CORE/MAC/src/pe/lim/limFT.c @@ -401,6 +401,10 @@ void limPerformFTPreAuth(tpAniSirGlobal pMac, eHalStatus status, #if defined WLAN_FEATURE_VOWIFI_11R_DEBUG PELOG1(limLog( pMac, LOG1, FL("FT Auth Rsp Timer Started"));) #endif +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_ROAM_AUTH_START_EVENT, + pMac->lim.pSessionEntry, eSIR_SUCCESS, eSIR_SUCCESS); +#endif limSendAuthMgmtFrame(pMac, &authFrame, psessionEntry->ftPEContext.pFTPreAuthReq->preAuthbssId, @@ -1173,7 +1177,7 @@ void limHandleFTPreAuthRsp(tpAniSirGlobal pMac, tSirRetStatus status, tpPESession pftSessionEntry = NULL; tANI_U8 sessionId = 0; tpSirBssDescription pbssDescription = NULL; -#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM +#ifdef FEATURE_WLAN_DIAG_SUPPORT limDiagEventReport(pMac, WLAN_PE_DIAG_PRE_AUTH_RSP_EVENT, psessionEntry, (tANI_U16)status, 0); #endif diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c index 85e990970b7a..a98912ee1e29 100644 --- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c @@ -718,6 +718,10 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub { // Log success PELOG1(limLog(pMac, LOG1, FL("Successfully Reassociated with BSS"));) +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_ROAM_ASSOC_COMP_EVENT, + psessionEntry, eSIR_SUCCESS, eSIR_SUCCESS); +#endif #ifdef FEATURE_WLAN_ESE { tANI_U8 cnt = 0; @@ -908,8 +912,9 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub else psessionEntry->beaconParams.fShortPreamble = true; } -#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT - limDiagEventReport(pMac, WLAN_PE_DIAG_CONNECTED, psessionEntry, 0, 0); +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_CONNECTED, psessionEntry, + eSIR_SUCCESS, eSIR_SUCCESS); #endif if( pAssocRsp->QosMapSet.present ) { diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c index 37079280bb6f..12440bbd92d7 100644 --- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c @@ -2394,6 +2394,10 @@ limProcessMlmAuthReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) (tANI_U8) pMac->lim.gpLimMlmAuthReq->authType; authFrameBody.authTransactionSeqNumber = SIR_MAC_AUTH_FRAME_1; authFrameBody.authStatusCode = 0; +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_AUTH_START_EVENT, psessionEntry, + eSIR_SUCCESS, authFrameBody.authStatusCode); +#endif limSendAuthMgmtFrame(pMac, &authFrameBody, pMac->lim.gpLimMlmAuthReq->peerMacAddr, diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c index cafbe3c9bc74..3821a2fc29e6 100644 --- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c @@ -631,6 +631,10 @@ limSendMlmAssocReq( tpAniSirGlobal pMac, } } +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_ASSOC_REQ_EVENT, psessionEntry, + eSIR_SUCCESS, eSIR_SUCCESS); +#endif pMlmAssocReq->listenInterval = (tANI_U16)val; /* Update PE session ID*/ pMlmAssocReq->sessionId = psessionEntry->peSessionId; diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index 8c6213ea1090..7abf06977ed8 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -1302,9 +1302,10 @@ __limProcessSmeScanReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) tpSirSmeScanReq pScanReq; tANI_U8 i = 0; -#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT - limDiagEventReport(pMac, WLAN_PE_DIAG_SCAN_REQ_EVENT, NULL, 0, 0); -#endif //FEATURE_WLAN_DIAG_SUPPORT +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_SCAN_REQ_EVENT, NULL, + eSIR_SUCCESS, eSIR_SUCCESS); +#endif pScanReq = (tpSirSmeScanReq) pMsgBuf; limLog(pMac, LOG1, FL("SME SCAN REQ numChan %d min %d max %d IELen %d first %d fresh %d unique %d type %d mode %d rsp %d"), @@ -2351,9 +2352,10 @@ __limProcessSmeReassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) return; } -#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT - limDiagEventReport(pMac, WLAN_PE_DIAG_REASSOC_REQ_EVENT, psessionEntry, 0, 0); -#endif //FEATURE_WLAN_DIAG_SUPPORT +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_REASSOC_REQ_EVENT, psessionEntry, + eSIR_SUCCESS, eSIR_SUCCESS); +#endif //pMac->lim.gpLimReassocReq = pReassocReq;//TO SUPPORT BT-AMP /* Store the reassoc handle in the session Table.. 23rd sep review */ @@ -5699,35 +5701,27 @@ limProcessSmeReqMessages(tpAniSirGlobal pMac, tpSirMsgQ pMsg) case eWNI_SME_REASSOC_REQ: __limProcessSmeReassocReq(pMac, pMsgBuf); - break; case eWNI_SME_DISASSOC_REQ: __limProcessSmeDisassocReq(pMac, pMsgBuf); - break; case eWNI_SME_DISASSOC_CNF: case eWNI_SME_DEAUTH_CNF: __limProcessSmeDisassocCnf(pMac, pMsgBuf); - break; case eWNI_SME_DEAUTH_REQ: __limProcessSmeDeauthReq(pMac, pMsgBuf); - break; - - case eWNI_SME_SETCONTEXT_REQ: __limProcessSmeSetContextReq(pMac, pMsgBuf); - break; case eWNI_SME_REMOVEKEY_REQ: __limProcessSmeRemoveKeyReq(pMac, pMsgBuf); - break; case eWNI_SME_STOP_BSS_REQ: diff --git a/CORE/MAC/src/pe/lim/limSecurityUtils.c b/CORE/MAC/src/pe/lim/limSecurityUtils.c index 3608e72e0c17..26b5119c968d 100644 --- a/CORE/MAC/src/pe/lim/limSecurityUtils.c +++ b/CORE/MAC/src/pe/lim/limSecurityUtils.c @@ -432,6 +432,11 @@ limRestoreFromAuthState(tpAniSirGlobal pMac, tSirResultCodes resultCode, tANI_U1 tSirMacAddr currentBssId; tLimMlmAuthCnf mlmAuthCnf; +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_AUTH_COMP_EVENT, sessionEntry, + resultCode, protStatusCode); +#endif + vos_mem_copy( (tANI_U8 *) &mlmAuthCnf.peerMacAddr, (tANI_U8 *) &pMac->lim.gpLimMlmAuthReq->peerMacAddr, sizeof(tSirMacAddr)); diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c index 573145f8c3e8..32dfe14e2baa 100644 --- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c +++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c @@ -2478,6 +2478,10 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac, txFlag |= HAL_USE_PEER_STA_REQUESTED_MASK; } +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_ASSOC_START_EVENT, psessionEntry, + eSIR_SUCCESS, eSIR_SUCCESS); +#endif pMacHdr = ( tpSirMacMgmtHdr ) pFrame; MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_MGMT, psessionEntry->peSessionId, pMacHdr->fc.subType)); @@ -2932,6 +2936,10 @@ limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac, psessionEntry->assocReqLen = (ft_ies_length); } +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_REASSOC_START_EVENT, psessionEntry, + eSIR_SUCCESS, eSIR_SUCCESS); +#endif MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_MGMT, psessionEntry->peSessionId, pMacHdr->fc.subType)); halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) (nBytes + ft_ies_length), @@ -3299,6 +3307,10 @@ limSendReassocReqMgmtFrame(tpAniSirGlobal pMac, txFlag |= HAL_USE_PEER_STA_REQUESTED_MASK; } +#ifdef FEATURE_WLAN_DIAG_SUPPORT + limDiagEventReport(pMac, WLAN_PE_DIAG_REASSOC_START_EVENT, psessionEntry, + eSIR_SUCCESS, eSIR_SUCCESS); +#endif MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_MGMT, psessionEntry->peSessionId, pMacHdr->fc.subType)); halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) (sizeof(tSirMacMgmtHdr) + nPayload), diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h index 7b08e1024c92..1fecbb73ed59 100644 --- a/CORE/MAC/src/pe/lim/limUtils.h +++ b/CORE/MAC/src/pe/lim/limUtils.h @@ -526,9 +526,22 @@ typedef enum WLAN_PE_DIAG_PREAUTH_DONE, WLAN_PE_DIAG_REASSOCIATING, WLAN_PE_DIAG_CONNECTED, -}WLAN_PE_DIAG_EVENT_TYPE; + WLAN_PE_DIAG_ASSOC_REQ_EVENT, + WLAN_PE_DIAG_AUTH_COMP_EVENT, + WLAN_PE_DIAG_ASSOC_COMP_EVENT, + WLAN_PE_DIAG_AUTH_START_EVENT, + WLAN_PE_DIAG_ASSOC_START_EVENT, + WLAN_PE_DIAG_REASSOC_START_EVENT, + WLAN_PE_DIAG_ROAM_AUTH_START_EVENT, + WLAN_PE_DIAG_ROAM_AUTH_COMP_EVENT, + WLAN_PE_DIAG_ROAM_ASSOC_START_EVENT, + WLAN_PE_DIAG_ROAM_ASSOC_COMP_EVENT, + RESERVED1, /* for SCAN_COMPLETE */ + RESERVED2, /* for SCAN_RES_FOUND */ +} WLAN_PE_DIAG_EVENT_TYPE; void limDiagEventReport(tpAniSirGlobal pMac, tANI_U16 eventType, tpPESession pSessionEntry, tANI_U16 status, tANI_U16 reasonCode); + #endif /* FEATURE_WLAN_DIAG_SUPPORT */ void peSetResumeChannel(tpAniSirGlobal pMac, tANI_U16 channel, ePhyChanBondState cbState); diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h index c8d15e5850d8..54d1582bd5ae 100644 --- a/CORE/SME/inc/csrInternal.h +++ b/CORE/SME/inc/csrInternal.h @@ -289,6 +289,13 @@ typedef enum }eCsrDiagWlanStatusEventReason; +typedef enum +{ + eCSR_EVENT_TYPE_INVALID = 0, + eCSR_EVENT_SCAN_COMPLETE = 70, + eCSR_EVENT_SCAN_RES_FOUND = 71, +} eCSR_WLAN_DIAG_EVENT_TYPE; + #endif //FEATURE_WLAN_DIAG_SUPPORT typedef struct tagCsrChannel @@ -1555,5 +1562,9 @@ bool csr_clear_joinreq_param(tpAniSirGlobal mac_ctx, eHalStatus csr_issue_stored_joinreq(tpAniSirGlobal mac_ctx, uint32_t *roam_id, uint32_t session_id); +#ifdef FEATURE_WLAN_DIAG_SUPPORT +void csr_diag_event_report(tpAniSirGlobal pmac, uint16_t event_type, + uint16_t status, uint16_t reasoncode); +#endif #endif diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c index 737086f4ce6a..e104a5548e29 100644 --- a/CORE/SME/src/csr/csrApiScan.c +++ b/CORE/SME/src/csr/csrApiScan.c @@ -5216,6 +5216,13 @@ static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCo csrLLCount(&pMac->scan.tempScanResults), pScanRsp->statusCode); smsLog(pMac, LOG1, "scan reason is %d", pCommand->u.scanCmd.reason); +#ifdef FEATURE_WLAN_DIAG_SUPPORT + csr_diag_event_report(pMac, eCSR_EVENT_SCAN_COMPLETE, eSIR_SUCCESS, + eSIR_SUCCESS); + if (csrLLCount(&pMac->scan.tempScanResults) > 0) + csr_diag_event_report(pMac, eCSR_EVENT_SCAN_RES_FOUND, eSIR_SUCCESS, + eSIR_SUCCESS); +#endif fRemoveCommand = csrScanComplete( pMac, pScanRsp ); fRet = eANI_BOOLEAN_TRUE; }//if ( eSIR_SME_MORE_SCAN_RESULTS_FOLLOW != pScanRsp->statusCode ) diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c index bf2ed06df7ec..f41b7a138445 100644 --- a/CORE/SME/src/csr/csrUtil.c +++ b/CORE/SME/src/csr/csrUtil.c @@ -5934,3 +5934,35 @@ VOS_STATUS csrAddToChannelListFront( return eHAL_STATUS_SUCCESS; } #endif +#ifdef FEATURE_WLAN_DIAG_SUPPORT +/** + * csr_diag_event_report() - send PE diag event + * @pmac: pointer to global MAC context. + * @event_typev: sub event type for DIAG event. + * @status: status of the event + * @reasoncode: reasoncode for the given status + * + * This function is called to send diag event + * + * Return: NA + */ + +void csr_diag_event_report(tpAniSirGlobal pmac, uint16_t event_type, + uint16_t status, uint16_t reasoncode) +{ + tSirMacAddr nullbssid = { 0, 0, 0, 0, 0, 0 }; + WLAN_VOS_DIAG_EVENT_DEF(diag_event, vos_event_wlan_pe_payload_type); + + vos_mem_set(&diag_event, sizeof(vos_event_wlan_pe_payload_type), 0); + + vos_mem_copy(diag_event.bssid, nullbssid, sizeof(tSirMacAddr)); + diag_event.sme_state = (tANI_U16)pmac->lim.gLimSmeState; + diag_event.mlm_state = (tANI_U16)pmac->lim.gLimMlmState; + diag_event.event_type = event_type; + diag_event.status = status; + diag_event.reason_code = reasoncode; + + WLAN_VOS_DIAG_EVENT_REPORT(&diag_event, EVENT_WLAN_PE); + return; +} +#endif |
