qcacmn: Fix compile error for cfg80211_sched_scan_results()

The 4.12 Linux kernel adds a request id parameter to
cfg80211_sched_scan_results(). Add conditional compilation to provide
the correct parameters based on the kernel version.

Change-Id: I2008895e390af88af0b22df6bfd7ef753d25b419
CRs-Fixed: 2092073
This commit is contained in:
Dustin Brown 2017-08-11 17:33:19 -07:00 • committed by snandini
commit 9feb201862

View file

@ -199,6 +199,20 @@ static void wlan_config_sched_scan_plan(struct pno_scan_req_params *pno_req,
}
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
static inline void
wlan_cfg80211_sched_scan_results(struct wiphy *wiphy, uint64_t reqid)
{
cfg80211_sched_scan_results(wiphy);
}
#else
static inline void
wlan_cfg80211_sched_scan_results(struct wiphy *wiphy, uint64_t reqid)
{
cfg80211_sched_scan_results(wiphy, reqid);
}
#endif
/**
* wlan_cfg80211_pno_callback() - pno callback function to handle
* pno events.
@ -231,7 +245,7 @@ static void wlan_cfg80211_pno_callback(struct wlan_objmgr_vdev *vdev,
cfg80211_err("pdev_ospriv is NULL");
return;
}
cfg80211_sched_scan_results(pdev_ospriv->wiphy);
wlan_cfg80211_sched_scan_results(pdev_ospriv->wiphy, 0);
}
#ifdef WLAN_POLICY_MGR_ENABLE