wlan: Fix packet jitter caused by increased dwell time

Currently the dwell is doubled even for the driver initiated
scans which causes packet jitter.To address this, double
the dwell time only for user initiated scan request.

CRs-Fixed: 972227
Change-Id: Id02802ff1716744e5bef55c21f9cdd6ce0367946
diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c
index 82b7d99..1b7111b 100644
--- a/CORE/SME/src/csr/csrApiScan.c
+++ b/CORE/SME/src/csr/csrApiScan.c
@@ -613,7 +613,7 @@
     eHalStatus status = eHAL_STATUS_FAILURE;
     tSmeCmd *pScanCmd = NULL;
     eCsrConnectState ConnectState;
-    
+
     if(pScanRequest == NULL)
     {
         smsLog( pMac, LOGE, FL(" pScanRequest is NULL"));
@@ -803,7 +803,8 @@
                                    "dwell time for first scan %u"),
                                     scanReq.maxChnTime);
                         }
-                        if (!(pScanRequest->p2pSearch)
+                        if ((pScanCmd->u.scanCmd.reason == eCsrScanUserRequest)
+                           && !(pScanRequest->p2pSearch)
                            &&(pScanRequest->ChannelInfo.numOfChannels
                            < pMac->roam.configParam.
                                  max_chan_for_dwell_time_cfg))
@@ -880,7 +881,8 @@
                                  pScanRequest->maxChnTime);
                 }
 
-                if (!(pScanRequest->p2pSearch)
+                if ((pScanCmd->u.scanCmd.reason == eCsrScanUserRequest)
+                         && !(pScanRequest->p2pSearch)
                          && (pScanRequest->ChannelInfo.numOfChannels
                          < pMac->roam.configParam.max_chan_for_dwell_time_cfg))
                 {