qcacld-3.0: Use at least MaxChannelTime dwell time for RRM scan

Use at least gPassive/gActiveMaxChannelTime dwell time in RRM scan
request, sometimes it’s impossible to detect AP's in scan with very
low dwell time specially in case of Passive beacon report request.

Change-Id: Id06c98d8119fbcf59b167ca310972799bf7df487
CRs-Fixed: 1085637
This commit is contained in:
Arif Hussain 2016-11-03 11:09:58 -07:00 • committed by Prakash Dhavali
commit 0233ecd853

View file

@ -650,6 +650,7 @@ static QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
QDF_STATUS status = QDF_STATUS_SUCCESS;
tpRrmSMEContext sme_rrm_ctx = &mac_ctx->rrm.rrmSmeContext;
uint32_t session_id;
uint32_t max_chan_time;
tSirScanType scan_type;
uint64_t current_time;
@ -709,6 +710,23 @@ static QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
sms_log(mac_ctx, LOG1, FL("Scan Type(%d) Max Dwell Time(%d)"),
scan_req.scanType, scan_req.maxChnTime);
/*
* Use gPassive/gActiveMaxChannelTime if maxChanTime is less
* than default.
*/
if (eSIR_ACTIVE_SCAN == scan_type)
max_chan_time =
mac_ctx->roam.configParam.nActiveMaxChnTime;
else
max_chan_time =
mac_ctx->roam.configParam.nPassiveMaxChnTime;
if (scan_req.maxChnTime < max_chan_time) {
scan_req.maxChnTime = max_chan_time;
sms_log(mac_ctx, LOG1,
FL("Setting default max %d ChanTime"),
max_chan_time);
}
/*
* For RRM scans timing is very important especially when the