diff options
| author | Anurag Chouhan <achouhan@codeaurora.org> | 2017-01-14 14:19:37 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-07 09:31:19 -0800 |
| commit | e4fccb81362df5cb2a6bf69b9f7402d7a14f0135 (patch) | |
| tree | dee084385a2b60e7a4a38a8fe6aeab8990e9a50d | |
| parent | d09814ad7acaff5672f8a051a78d6de9a47d1c9d (diff) | |
qcacld-2.0: Fix PNO scan interval
With new PNO Scan parameter change the scan plans has to be
updated by the framework, but framework not always configure
max number of scan plans paremeters, In this case max scan plans
configured to framework is two, but framework is sending only
one scan plan, as firmware always expects two scan plans that
is fast/slow scan from the driver if only once scan plan will
be configured firmware will set other scan plan to default.
The fix is to make sure if framework configures one scan plan
then driver has to configure both scan plans accordingly.
Change-Id: I5011cebe3f747be094f5b44c3111cb5ce4f0e802
CRs-Fixed: 1111512
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index ab864d724431..395615eeb0b2 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -24870,16 +24870,27 @@ static void hdd_config_sched_scan_plan(tpSirPNOScanReq pno_req, struct cfg80211_sched_scan_request *request, hdd_context_t *hdd_ctx) { - pno_req->fast_scan_period = - request->scan_plans[0].interval * MSEC_PER_SEC; - pno_req->fast_scan_max_cycles = request->scan_plans[0].iterations; - pno_req->slow_scan_period = - request->scan_plans[1].interval * MSEC_PER_SEC; - hddLog(LOGE, "Base scan interval: %d sec, scan cycles: %d, slow scan interval %d", - request->scan_plans[0].interval, - request->scan_plans[0].iterations, - request->scan_plans[1].interval); - + if (request->n_scan_plans == 2) { + pno_req->fast_scan_period = + request->scan_plans[0].interval * MSEC_PER_SEC; + pno_req->fast_scan_max_cycles = + request->scan_plans[0].iterations; + pno_req->slow_scan_period = + request->scan_plans[1].interval * MSEC_PER_SEC; + hddLog(LOGE, "Base scan interval: %d sec, scan cycles: %d, slow scan interval %d", + request->scan_plans[0].interval, + request->scan_plans[0].iterations, + request->scan_plans[1].interval); + } else if (request->n_scan_plans == 1) { + pno_req->fast_scan_period = request->scan_plans[0].interval * + MSEC_PER_SEC; + pno_req->fast_scan_max_cycles = 1; + pno_req->slow_scan_period = request->scan_plans[0].interval * + MSEC_PER_SEC; + } else { + hddLog(LOGE, "Invalid number of scan plans %d !!", + request->n_scan_plans); + } } #else static void hdd_config_sched_scan_plan(tpSirPNOScanReq pno_req, |
