summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Brown <dustinb@codeaurora.org>2017-08-11 17:25:51 -0700
committerpramod kotreshappa <kpramod@codeaurora.org>2017-08-25 13:44:17 -0700
commit81bf201a0e38d796ebe24cbd421511eaee92cf77 (patch)
treea3efd89d97211d2d37b8f291dd62fa4d0bf96345
parenta8529a7eb49429d1a4a607b0a4fa7deab1ea9859 (diff)
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
-rw-r--r--core/hdd/src/wlan_hdd_power.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index 5c5aba562143..b983b5890e77 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -1723,6 +1723,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
@@ -1819,7 +1833,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");