From 5fbb1052eed546dd896a11e1eb2b6c706e1f80be Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Fri, 11 Aug 2017 17:25:51 -0700 Subject: [PATCH] qcacld-3.0: 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: 2092070 --- core/hdd/src/wlan_hdd_power.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index 15b8a6c53d58..8463fbe09449 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1539,6 +1539,20 @@ void wlan_hdd_inc_suspend_stats(hdd_context_t *hdd_ctx, wlan_hdd_print_suspend_fail_stats(hdd_ctx); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0) +static inline void +hdd_sched_scan_results(struct wiphy *wiphy, uint64_t reqid) +{ + cfg80211_sched_scan_results(wiphy); +} +#else +static inline void +hdd_sched_scan_results(struct wiphy *wiphy, uint64_t reqid) +{ + cfg80211_sched_scan_results(wiphy, reqid); +} +#endif + /** * __wlan_hdd_cfg80211_resume_wlan() - cfg80211 resume callback * @wiphy: Pointer to wiphy @@ -1639,7 +1653,7 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) hdd_prevent_suspend_timeout( HDD_WAKELOCK_TIMEOUT_RESUME, WIFI_POWER_EVENT_WAKELOCK_RESUME_WLAN); - cfg80211_sched_scan_results(pHddCtx->wiphy); + hdd_sched_scan_results(pHddCtx->wiphy, 0); } hdd_debug("cfg80211 scan result database updated");