From 72097efbccdf0fa01d680c556d5987bd09aeb93c Mon Sep 17 00:00:00 2001 From: Rashmi Ramanna Date: Fri, 20 Dec 2013 09:04:12 +0530 Subject: P2P: Sanity check for presence of SSID in p2p scan request. In Change-Id I7d810255a70e5d7e9ae143e094c878f08b2a829d, we are increasing the dwell time of p2p scan if the p2p scan is for specific SSID. There may be chances that some supplicants doesn't trigger p2p scan for specific SSID or SSIDList is NULL. This results in kernel panic when p2p scan is issued to establish p2p connection. To resolve this issue, the number of SSIDs in scan request is checked for the presence of SSID in p2p scan request. Change-Id: I53c7f8a3124ffb9d72301ab2a8c64fade62b871e CRs-fixed: 591975 --- CORE/SME/src/csr/csrApiScan.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c index 81ca2ecd514f..45e7ccbf25ff 100644 --- a/CORE/SME/src/csr/csrApiScan.c +++ b/CORE/SME/src/csr/csrApiScan.c @@ -729,13 +729,16 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId, */ if(pScanRequest->p2pSearch) { - //If the scan request is for specific SSId the length of SSID will be - //greater than 7 as SSID for p2p search contains "DIRECT-") - if(pScanRequest->SSIDs.SSIDList->SSID.length > DIRECT_SSID_LEN) + if(pScanRequest->SSIDs.numOfSSIDs) { - smsLog( pMac, LOG1, FL(" Increase the Dwell time to 100ms.")); - pScanRequest->maxChnTime = MAX_CHN_TIME_TO_FIND_GO; - pScanRequest->minChnTime = MIN_CHN_TIME_TO_FIND_GO; + //If the scan request is for specific SSId the length of SSID will be + //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.")); + pScanRequest->maxChnTime = MAX_CHN_TIME_TO_FIND_GO; + pScanRequest->minChnTime = MIN_CHN_TIME_TO_FIND_GO; + } } } -- cgit v1.2.3