qcacmn: Fix compilation with scheduled scan start delay

cfg80211_sched_scan_request start delay is added from
KERNEL_VERSION 4.4, and schedule scan plans is backported but
not the start delay.

This change is to make sure start delay accessed from request
only for KERNEL_VERSION 4.4 to avoid compilation issues with
CFG80211_MULTI_SCAN_PLAN_BACKPORT.

Change-Id: I3469ef457bb1f97fdddfb7491fbcaa2e64a16e8a
CRs-Fixed: 2038458
Este commit está contenido en:
Arif Hussain
2017-04-25 11:48:19 -07:00
cometido por snandini
padre 52cfdcf001
commit d6b243219d

Ver fichero

@@ -35,6 +35,20 @@
#include <qdf_mem.h>
#include <wlan_utility.h>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0))
static uint32_t hdd_config_sched_scan_start_delay(
struct cfg80211_sched_scan_request *request)
{
return request->delay;
}
#else
static uint32_t hdd_config_sched_scan_start_delay(
struct cfg80211_sched_scan_request *request)
{
return 0;
}
#endif
#ifdef FEATURE_WLAN_SCAN_PNO
#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)) || \
defined(CFG80211_MULTI_SCAN_PLAN_BACKPORT))
@@ -50,7 +64,6 @@
static void wlan_config_sched_scan_plan(struct pno_scan_req_params *pno_req,
struct cfg80211_sched_scan_request *request)
{
pno_req->delay_start_time = request->delay;
/*
* As of now max 2 scan plans were supported by firmware
* if number of scan plan supported by firmware increased below logic
@@ -326,6 +339,7 @@ int wlan_cfg80211_sched_scan_start(struct wlan_objmgr_pdev *pdev,
* shall be in slow_scan_period mode until next PNO Start.
*/
wlan_config_sched_scan_plan(req, request);
req->delay_start_time = hdd_config_sched_scan_start_delay(request);
cfg80211_notice("Base scan interval: %d sec, scan cycles: %d, slow scan interval %d",
req->fast_scan_period, req->fast_scan_max_cycles,
req->slow_scan_period);