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.

CRs-fixed: 591975
Change-Id: I17cd4c5375e45ccb4b407388a51ee068872dc2f9
diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c
index b0539ec..00fbaa2 100644
--- a/CORE/SME/src/csr/csrApiScan.c
+++ b/CORE/SME/src/csr/csrApiScan.c
@@ -742,13 +742,16 @@
      */
     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;
+            }
         }
     }