diff options
| author | Vinay Krishna Eranna <c_veran@qti.qualcomm.com> | 2014-03-24 22:18:24 -0700 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-03-26 21:24:31 -0700 |
| commit | a5166b9d1982fb846d5092e3166faee5cd34552b (patch) | |
| tree | 1aed9b5310d4c9ee777b4925540ac93441aff701 | |
| parent | fa8aea10d7d1f8d7c13ccf971c65d91fbcec9655 (diff) | |
wlan: Logging enhancement for Scan request path in SME
Logging enhancement for Scan request path in SME to provide
more information during failure cases.
Change-Id: I84cfa8ab6858e181aaf327fcd9334b6124981fd3
CRs-Fixed: 591369
| -rw-r--r-- | CORE/SME/src/csr/csrApiScan.c | 157 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 5 |
2 files changed, 113 insertions, 49 deletions
diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c index f5985e7b5c42..c349028ddde2 100644 --- a/CORE/SME/src/csr/csrApiScan.c +++ b/CORE/SME/src/csr/csrApiScan.c @@ -646,7 +646,11 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId, //greater than 7 as SSID for p2p search contains "DIRECT-") if(pScanRequest->SSIDs.SSIDList->SSID.length > DIRECT_SSID_LEN) { - smsLog( pMac, LOG1, FL(" Increase the Dwell time to 100ms.")); + smsLog( pMac, LOG1, FL("P2P: Increasing the min and max Dwell" + " time to %d for specific SSID scan %.*s"), + MAX_CHN_TIME_TO_FIND_GO, + pScanRequest->SSIDs.SSIDList->SSID.length, + pScanRequest->SSIDs.SSIDList->SSID.ssId); pScanRequest->maxChnTime = MAX_CHN_TIME_TO_FIND_GO; pScanRequest->minChnTime = MIN_CHN_TIME_TO_FIND_GO; } @@ -697,7 +701,11 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId, if(pScanRequest->minChnTime == 0 && pScanRequest->maxChnTime == 0) { //The caller doesn't set the time correctly. Set it here - csrSetDefaultScanTiming(pMac, pScanRequest->scanType, pScanRequest); + csrSetDefaultScanTiming(pMac, pScanRequest->scanType, + pScanRequest); + smsLog(pMac, LOG1, FL("Setting default min %d and max %d" + " ChnTime"), pScanRequest->minChnTime, + pScanRequest->maxChnTime); } #ifdef WLAN_AP_STA_CONCURRENCY if(pScanRequest->restTime == 0) @@ -733,6 +741,10 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId, { pScanRequest->maxChnTime = pScanRequest->maxChnTime << 1; pScanRequest->minChnTime = pScanRequest->minChnTime << 1; + smsLog( pMac, LOG1, FL("BTC A2DP up, doubling max and min" + " ChnTime (Max=%d Min=%d)"), + pScanRequest->maxChnTime, + pScanRequest->minChnTime); } pScanRequest->maxChnTimeBtc = pMac->roam.configParam.nActiveMaxChnTimeBtc; @@ -770,16 +782,15 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId, vos_mem_set(&p11dScanCmd->u.scanCmd, sizeof(tScanCmd), 0); pChnInfo->ChannelList = vos_mem_malloc(numChn); if ( NULL == pChnInfo->ChannelList ) - return eHAL_STATUS_FAILURE; - vos_mem_copy(pChnInfo->ChannelList, - pMac->scan.baseChannels.channelList, numChn); - status = eHAL_STATUS_SUCCESS; - if ( !HAL_STATUS_SUCCESS( status ) ) { - vos_mem_free(pChnInfo->ChannelList); - pChnInfo->ChannelList = NULL; - break; + smsLog(pMac, LOGE, FL("Failed to allocate memory")); + status = eHAL_STATUS_FAILURE; + break; } + vos_mem_copy(pChnInfo->ChannelList, + pMac->scan.baseChannels.channelList, + numChn); + pChnInfo->numOfChannels = (tANI_U8)numChn; p11dScanCmd->command = eSmeCommandScan; p11dScanCmd->u.scanCmd.callback = NULL; @@ -836,18 +847,21 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId, #endif if( !HAL_STATUS_SUCCESS( status ) ) { - smsLog( pMac, LOGE, FL(" fail to send message status = %d"), status ); + smsLog( pMac, LOGE, FL(" Failed to send message" + " status = %d"), status); break; } } else { + smsLog(pMac, LOGE, FL("csrScanCopyRequest failed")); break; } } else { //error + smsLog( pMac, LOGE, FL("p11dScanCmd failed") ); break; } } @@ -864,6 +878,25 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId, status = csrScanCopyRequest(pMac, &pScanCmd->u.scanCmd.u.scanRequest, pScanRequest); if(HAL_STATUS_SUCCESS(status)) { + tCsrScanRequest *pTempScanReq = + &pScanCmd->u.scanCmd.u.scanRequest; + pMac->scan.scanProfile.numOfChannels = + pTempScanReq->ChannelInfo.numOfChannels; + + smsLog( pMac, LOG1, FL(" SId=%d scanId=%d" + " Scan reason=%u numSSIDs=%d" + " numChan=%d P2P search=%d minCT=%d maxCT=%d" + " minCBtc=%d maxCBtx=%d"), + sessionId, pScanCmd->u.scanCmd.scanID, + pScanCmd->u.scanCmd.reason, + pTempScanReq->SSIDs.numOfSSIDs, + pTempScanReq->ChannelInfo.numOfChannels, + pTempScanReq->p2pSearch, + pTempScanReq->minChnTime, + pTempScanReq->maxChnTime, + pTempScanReq->minChnTimeBtc, + pTempScanReq->maxChnTimeBtc ); + //Start process the command #ifdef WLAN_AP_STA_CONCURRENCY if (!pMac->fScanOffload) @@ -892,6 +925,14 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId, break; } } + else + { + smsLog( pMac, LOGE, FL("SId: %d Scanning not enabled" + " Scan type=%u, numOfSSIDs=%d P2P search=%d"), + sessionId, pScanRequest->requestType, + pScanRequest->SSIDs.numOfSSIDs, + pScanRequest->p2pSearch ); + } } while(0); if(!HAL_STATUS_SUCCESS(status) && pScanCmd) { @@ -900,7 +941,12 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId, //Set the flag back for restarting idle scan pMac->scan.fRestartIdleScan = eANI_BOOLEAN_TRUE; } - smsLog( pMac, LOGE, FL(" failed with status = %d, releasing scan cmd"), status ); + smsLog( pMac, LOGE, FL(" SId: %d Failed with status=%d" + " Scan reason=%u numOfSSIDs=%d" + " P2P search=%d scanId=%d"), + sessionId, status, pScanCmd->u.scanCmd.reason, + pScanRequest->SSIDs.numOfSSIDs, pScanRequest->p2pSearch, + pScanCmd->u.scanCmd.scanID ); csrReleaseCommandScan(pMac, pScanCmd); } @@ -5485,8 +5531,9 @@ eHalStatus csrSendMBScanReq( tpAniSirGlobal pMac, tANI_U16 sessionId, } pMsg->scanType = pal_cpu_to_be32(scanType); - pMsg->numSsid = (pScanReq->SSIDs.numOfSSIDs < SIR_SCAN_MAX_NUM_SSID) ? pScanReq->SSIDs.numOfSSIDs : - SIR_SCAN_MAX_NUM_SSID; + pMsg->numSsid = + (pScanReq->SSIDs.numOfSSIDs < SIR_SCAN_MAX_NUM_SSID) ? + pScanReq->SSIDs.numOfSSIDs : SIR_SCAN_MAX_NUM_SSID; if((pScanReq->SSIDs.numOfSSIDs != 0) && ( eSIR_PASSIVE_SCAN != scanType )) { for (i = 0; i < pMsg->numSsid; i++) @@ -5567,6 +5614,20 @@ eHalStatus csrSendMBScanReq( tpAniSirGlobal pMac, tANI_U16 sessionId, { smsLog( pMac, LOGE, FL(" memory allocation failure")); } + if(!HAL_STATUS_SUCCESS(status)) + { + smsLog( pMac, LOG1, FL("Failed: SId: %d FirstMatch = %d" + " UniqueResult = %d freshScan = %d hiddenSsid = %d"), + sessionId, pScanReqParam->bReturnAfter1stMatch, + pScanReqParam->fUniqueResult, pScanReqParam->freshScan, + pScanReqParam->hiddenSsid ); + smsLog( pMac, LOG1, FL("scanType = %u BSSType = %u numOfSSIDs = %d" + " numOfChannels = %d requestType = %d p2pSearch = %d\n"), + pScanReq->scanType, pScanReq->BSSType, + pScanReq->SSIDs.numOfSSIDs, + pScanReq->ChannelInfo.numOfChannels, pScanReq->requestType, + pScanReq->p2pSearch ); + } return( status ); } @@ -6005,18 +6066,17 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs { pDstReq->pIEField = vos_mem_malloc(pSrcReq->uIEFieldLen); if ( NULL == pDstReq->pIEField ) - status = eHAL_STATUS_FAILURE; - else - status = eHAL_STATUS_SUCCESS; - if (HAL_STATUS_SUCCESS(status)) { - vos_mem_copy(pDstReq->pIEField, pSrcReq->pIEField, pSrcReq->uIEFieldLen); - pDstReq->uIEFieldLen = pSrcReq->uIEFieldLen; + status = eHAL_STATUS_FAILURE; + smsLog(pMac, LOGE, FL("No memory for scanning IE fields")); + break; } else { - smsLog(pMac, LOGE, "No memory for scanning IE fields"); - break; + status = eHAL_STATUS_SUCCESS; + vos_mem_copy(pDstReq->pIEField, pSrcReq->pIEField, + pSrcReq->uIEFieldLen); + pDstReq->uIEFieldLen = pSrcReq->uIEFieldLen; } }//Allocate memory for IE field { @@ -6031,14 +6091,11 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs pSrcReq->ChannelInfo.numOfChannels * sizeof(*pDstReq->ChannelInfo.ChannelList)); if ( NULL == pDstReq->ChannelInfo.ChannelList ) - status = eHAL_STATUS_FAILURE; - else - status = eHAL_STATUS_SUCCESS; - if(!HAL_STATUS_SUCCESS(status)) - { - pDstReq->ChannelInfo.numOfChannels = 0; - smsLog(pMac, LOGE, "No memory for scanning Channel List"); - break; + { status = eHAL_STATUS_FAILURE; + pDstReq->ChannelInfo.numOfChannels = 0; + smsLog(pMac, LOGE, FL("No memory for scanning Channel" + " List")); + break; } if((pSrcReq->scanType == eSIR_PASSIVE_SCAN) && (pSrcReq->requestType == eCSR_SCAN_REQUEST_11D_SCAN)) @@ -6048,7 +6105,7 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs pDstReq->ChannelInfo.ChannelList[new_index] = pSrcReq->ChannelInfo.ChannelList[index]; new_index++; - } + } pDstReq->ChannelInfo.numOfChannels = new_index; } else if(HAL_STATUS_SUCCESS(csrGetCfgValidChannels(pMac, pMac->roam.validChannelList, &len))) @@ -6086,13 +6143,13 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs { #ifdef FEATURE_WLAN_LFR smsLog(pMac, LOG2, - "%s: reqType=%d, numOfChannels=%d," - " ignoring DFS channel %d", - __func__, pSrcReq->requestType, - pSrcReq->ChannelInfo.numOfChannels, - pSrcReq->ChannelInfo.ChannelList[index]); + FL(" reqType=%d, numOfChannels=%d," + " ignoring DFS channel %d"), + pSrcReq->requestType, + pSrcReq->ChannelInfo.numOfChannels, + pSrcReq->ChannelInfo.ChannelList[index]); #endif - continue; + continue; } pDstReq->ChannelInfo.ChannelList[new_index] = @@ -6112,22 +6169,24 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs * Passing 0 to LIM will trigger a scan on * all valid channels which is not desirable. */ - smsLog(pMac, LOGE, "%s: no valid channels found (request=%d)", - __func__, pSrcReq->requestType); - for ( index = 0; index < pSrcReq->ChannelInfo.numOfChannels ; index++ ) - { - smsLog(pMac, LOGE, "pSrcReq index=%d channel=%d", - index, pSrcReq->ChannelInfo.ChannelList[index]); - } - status = eHAL_STATUS_FAILURE; - break; + smsLog(pMac, LOGE, FL(" no valid channels found" + " (request=%d)"), pSrcReq->requestType); + for ( index = 0; index < pSrcReq->ChannelInfo.numOfChannels ; index++ ) + { + smsLog(pMac, LOGE, FL("pSrcReq index=%d" + " channel=%d"), index, + pSrcReq->ChannelInfo.ChannelList[index]); + } + status = eHAL_STATUS_FAILURE; + break; } #endif } else { - smsLog(pMac, LOGE, "Couldn't get the valid Channel List, keeping requester's list"); - vos_mem_copy(pDstReq->ChannelInfo.ChannelList, + smsLog(pMac, LOGE, FL("Couldn't get the valid Channel" + " List, keeping requester's list")); + vos_mem_copy(pDstReq->ChannelInfo.ChannelList, pSrcReq->ChannelInfo.ChannelList, pSrcReq->ChannelInfo.numOfChannels * sizeof(*pDstReq->ChannelInfo.ChannelList)); @@ -6158,7 +6217,7 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs else { pDstReq->SSIDs.numOfSSIDs = 0; - smsLog(pMac, LOGE, "No memory for scanning SSID List"); + smsLog(pMac, LOGE, FL("No memory for scanning SSID List")); break; } }//Allocate memory for SSID List diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index a8246000cabe..946699c81eea 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -2923,6 +2923,11 @@ eHalStatus sme_ScanRequest(tHalHandle hHal, tANI_U8 sessionId, tCsrScanRequest * #endif status = csrScanRequest( hHal, sessionId, pscanReq, pScanRequestID, callback, pContext ); + if ( !HAL_STATUS_SUCCESS( status ) ) + { + smsLog(pMac, LOGE, FL("csrScanRequest failed" + " SId=%d"), sessionId); + } #ifdef FEATURE_WLAN_LFR } else |
