From 77e9044005cab0fe822b3afc1a2113e521ca48df Mon Sep 17 00:00:00 2001 From: "Kanchanapally, Vidyullatha" Date: Fri, 13 May 2016 12:50:43 +0530 Subject: qcacld-2.0: Guard driver cfg80211 abort scan implementation with appropriate checks prima to qcacld-2.0 propagation cfg80211 abort scan implementation is available only from kernel 4.5 onwards. Hence guard the abort scan driver implementation with linux version and backport availability checks in order to prevent any compilation issues with old kernel versions. Change-Id: I5956f9daa06225535ae4f10aed4ebe310f7acc7a CRs-Fixed: 1010982 --- CORE/HDD/src/wlan_hdd_cfg80211.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index d427b5aa77e4..ef4227e1876a 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -25026,6 +25026,8 @@ void wlan_hdd_cfg80211_extscan_callback(void *ctx, const tANI_U16 evType, #endif /* FEATURE_WLAN_EXTSCAN */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0)) || \ + defined(CFG80211_ABORT_SCAN) /** * __wlan_hdd_cfg80211_abort_scan() - cfg80211 abort scan api * @wiphy: Pointer to wiphy @@ -25074,6 +25076,7 @@ static void wlan_hdd_cfg80211_abort_scan(struct wiphy *wiphy, __wlan_hdd_cfg80211_abort_scan(wiphy, wdev); vos_ssr_unprotect(__func__); } +#endif /* cfg80211_ops */ static struct cfg80211_ops wlan_hdd_cfg80211_ops = @@ -25149,5 +25152,8 @@ static struct cfg80211_ops wlan_hdd_cfg80211_ops = #ifdef CHANNEL_SWITCH_SUPPORTED .channel_switch = wlan_hdd_cfg80211_channel_switch, #endif +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,5,0)) || \ + defined(CFG80211_ABORT_SCAN) .abort_scan = wlan_hdd_cfg80211_abort_scan, +#endif }; -- cgit v1.2.3