diff options
| author | Deepak Dhamdhere <ddhamdhe@qca.qualcomm.com> | 2014-05-16 02:10:37 -0700 |
|---|---|---|
| committer | Pitani Venkata Rajesh Kumar <c_vpitan@qti.qualcomm.com> | 2014-05-20 19:38:25 +0530 |
| commit | 358fc839910ba985d46148f4133f36458afeb75f (patch) | |
| tree | a4a905240d0d5a6e8e26f023c53570ffb20981e2 | |
| parent | 1d924620081de8fbf5e5f81b2f797c521e2d9d2a (diff) | |
qcacld: Change default scan parameters to avoid data hole
Default dwell time and burst duration used for STA and P2PCLI scans while
connected cause the STA to go away from home channel for upto 200 ms
because it uses a burst of 200 ms to cover 5 channels.
Changed the default parameters to use no burst (split scan), rest_time
propagated from CSR and non-zero idle time. Use same values of dwell time
for active and passive scans as before.
Tuning of these parameters for SAP and P2PGO modes will be done in future.
Change-Id: I31434684e2486c7af080abadffe27d5e24fdac00
CRs-Fixed: 663606
| -rw-r--r-- | CORE/MAC/inc/sirApi.h | 2 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c | 1 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 49 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.h | 5 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiScan.c | 2 |
5 files changed, 42 insertions, 17 deletions
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index fa75e425d33a..17d44c0e1a56 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -863,6 +863,7 @@ typedef struct sSirSmeScanReq */ tANI_U32 minChannelTimeBtc; //in units of milliseconds tANI_U32 maxChannelTimeBtc; //in units of milliseconds + tANI_U32 restTime; //in units of milliseconds, ignored when not connected tANI_U8 returnAfterFirstMatch; /** @@ -4510,6 +4511,7 @@ typedef struct sSirScanOffloadReq { tSirScanType scanType; tANI_U32 minChannelTime; tANI_U32 maxChannelTime; + tANI_U32 restTime; //in units of milliseconds, ignored when not connected tSirP2pScanType p2pScanType; tANI_U16 uIEFieldLen; tANI_U16 uIEFieldOffset; diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index 75b604d0d090..3777c9b8766f 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -1155,6 +1155,7 @@ static eHalStatus limSendHalStartScanOffloadReq(tpAniSirGlobal pMac, pScanOffloadReq->scanType = pScanReq->scanType; pScanOffloadReq->minChannelTime = pScanReq->minChannelTime; pScanOffloadReq->maxChannelTime = pScanReq->maxChannelTime; + pScanOffloadReq->restTime= pScanReq->restTime; /* for normal scan, the value for p2pScanType should be 0 always */ diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 0840e1fd72f1..eadcb3d16052 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -4374,6 +4374,7 @@ bool wma_check_scan_in_progress(WMA_HANDLE handle) return false; } + /* function : wma_get_buf_start_scan_cmd * Descriptin : * Args : @@ -4442,26 +4443,41 @@ VOS_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle, WMI_SCAN_EVENT_PREEMPTED | WMI_SCAN_EVENT_RESTARTED; + /* CSR sends min and max dwell time values, but expects the firmware + * to use only max dwell time value. It does not send separate values + * for active and passive. We use the same value for now. + * CSR will pass 40 or 110 ms as maxChannelTime value to us. + */ cmd->dwell_time_active = scan_req->maxChannelTime; cmd->dwell_time_passive = scan_req->maxChannelTime; + /* Ensure correct number of probes are sent on active channel */ + cmd->repeat_probe_time = cmd->dwell_time_active / WMA_SCAN_NPROBES_DEFAULT; + + /* CSR sends only one value restTime for staying on home channel + * to continue data traffic. Rome fw has facility to monitor the traffic + * and move to next channel. Stay on the channel for at least half + * of the requested time and then leave if there is no traffic. + */ + cmd->min_rest_time = scan_req->restTime / 2; + cmd->max_rest_time = scan_req->restTime; + + /* Check for traffic at idle_time interval after min_rest_time. + * Default value is 25 ms to allow full use of max_rest_time + * when voice packets are running at 20 ms interval. + */ + cmd->idle_time = WMA_SCAN_IDLE_TIME_DEFAULT; + + /* Large timeout value for full scan cycle, 30 seconds */ cmd->max_scan_time = WMA_HW_DEF_SCAN_MAX_DURATION; + cmd->scan_ctrl_flags |= WMI_SCAN_ADD_OFDM_RATES; - if (scan_req->scanType == eSIR_PASSIVE_SCAN) - cmd->burst_duration = 0; - else { - if (scan_req->channelList.numChannels < - WMA_BURST_SCAN_MAX_NUM_OFFCHANNELS) { - cmd->burst_duration = - scan_req->channelList.numChannels * - scan_req->maxChannelTime; - } else { - cmd->burst_duration = - WMA_BURST_SCAN_MAX_NUM_OFFCHANNELS * - scan_req->maxChannelTime; - } - } + /* Do not combine multiple channels in a single burst. Come back + * to home channel for data traffic after every foreign channel. + * By default, prefer throughput performance over scan cycle time. + */ + cmd->burst_duration = 0; if (!scan_req->p2pScanType) { WMA_LOGD("Normal Scan request"); @@ -4471,7 +4487,6 @@ VOS_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle, if (scan_req->scanType == eSIR_PASSIVE_SCAN) cmd->scan_ctrl_flags |= WMI_SCAN_FLAG_PASSIVE; cmd->scan_ctrl_flags |= WMI_SCAN_FILTER_PROBE_REQ; - cmd->repeat_probe_time = scan_req->maxChannelTime/3; } else { WMA_LOGD("P2P Scan"); @@ -4487,6 +4502,10 @@ VOS_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle, WMA_LOGD("P2P_SCAN_TYPE_SEARCH"); cmd->scan_ctrl_flags |= WMI_SCAN_FILTER_PROBE_REQ; cmd->repeat_probe_time = scan_req->maxChannelTime/3; + /* Default P2P burst duration of 120 ms will cover + * 3 channels with default max dwell time 40 ms. + */ + cmd->burst_duration = WMA_P2P_SCAN_MAX_BURST_DURATION; break; default: WMA_LOGE("Invalid scan type"); diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h index ae3cd8fad4c0..c18d3033158f 100644 --- a/CORE/SERVICES/WMA/wma.h +++ b/CORE/SERVICES/WMA/wma.h @@ -139,7 +139,10 @@ #define WMA_HW_DEF_SCAN_MAX_DURATION 30000 /* 30 secs */ /* Max offchannel duration */ -#define WMA_BURST_SCAN_MAX_NUM_OFFCHANNELS 5 +#define WMA_BURST_SCAN_MAX_NUM_OFFCHANNELS (5) +#define WMA_SCAN_NPROBES_DEFAULT (2) +#define WMA_SCAN_IDLE_TIME_DEFAULT (25) +#define WMA_P2P_SCAN_MAX_BURST_DURATION (120) /* Roaming default values * All time and period values are in milliseconds. diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c index 50f28cf64f28..3375810f6493 100644 --- a/CORE/SME/src/csr/csrApiScan.c +++ b/CORE/SME/src/csr/csrApiScan.c @@ -5673,7 +5673,7 @@ eHalStatus csrSendMBScanReq( tpAniSirGlobal pMac, tANI_U16 sessionId, //hidden SSID option pMsg->hiddenSsid = pScanReqParam->hiddenSsid; //rest time - //pMsg->restTime = pScanReq->restTime; + pMsg->restTime = pScanReq->restTime; pMsg->returnAfterFirstMatch = pScanReqParam->bReturnAfter1stMatch; // All the scan results caching will be done by Roaming // We do not want LIM to do any caching of scan results, |
