From 0233ecd853f01be2d6f675f0b6fdb577807b3fda Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Thu, 3 Nov 2016 11:09:58 -0700 Subject: [PATCH] qcacld-3.0: Use at least MaxChannelTime dwell time for RRM scan MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- core/sme/src/rrm/sme_rrm.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c index 11d3f69cb208..34d9308eb416 100644 --- a/core/sme/src/rrm/sme_rrm.c +++ b/core/sme/src/rrm/sme_rrm.c @@ -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