P2P: Increase the dwell time for p2p scan with specific SSID
In MCC scenario, during group formation, the p2p client scans for p2p GO
to form the p2p connection. At this time, the chances of channel switch
of GO may result in client failing to find GO and group formation failure
happens on GO.
To resolve this, the probability of client to find GO is increased by
increasing the dwell time of scan on channel with specific SSID.
Change-Id: I7d810255a70e5d7e9ae143e094c878f08b2a829d
CRs-Fixed: 551326
diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c
index aabc532..6fe8123 100644
--- a/CORE/SME/src/csr/csrApiScan.c
+++ b/CORE/SME/src/csr/csrApiScan.c
@@ -67,6 +67,9 @@
#include "wlan_qct_wda.h"
#define CSR_VALIDATE_LIST //This portion of code need to be removed once the issue is resolved.
+#define MIN_CHN_TIME_TO_FIND_GO 100
+#define MAX_CHN_TIME_TO_FIND_GO 100
+#define DIRECT_SSID_LEN 7
#ifdef CSR_VALIDATE_LIST
tDblLinkList *g_pchannelPowerInfoList24 = NULL, * g_pchannelPowerInfoList5 = NULL;
@@ -726,6 +729,23 @@
VOS_ASSERT(0);
}
+ /* During group formation, the P2P client scans for GO with the specific SSID.
+ * There will be chances of GO switching to other channels because of scan or
+ * to STA channel in case of STA+GO MCC scenario. So to increase the possibility
+ * of client to find the GO, the dwell time of scan is increased to 100ms.
+ */
+ 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)
+ {
+ 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;
+ }
+ }
+
do
{
if(pMac->scan.fScanEnable)