From 007291fb8d58e2ec3e51862e79aa93e14b8ed255 Mon Sep 17 00:00:00 2001 From: Aditya Kodukula Date: Thu, 4 Jun 2020 20:27:48 -0700 Subject: [PATCH] qcacld-3.0: Add Kernel Version check for cfg80211_update_owe_info_event As part of GKI kernel whitelisting effort, add kernel version check for cfg80211_update_owe_info_event. Change-Id: I06e4f42bbe6d032a816c61eea2e4cc415ebbdff4 CRs-Fixed: 2700291 --- core/hdd/inc/wlan_hdd_main.h | 25 ------------------------- core/hdd/src/wlan_hdd_cfg80211.c | 9 ++++++--- core/hdd/src/wlan_hdd_cfg80211.h | 26 ++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 28 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 4debe991a033..193659fe370d 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -4229,31 +4229,6 @@ QDF_STATUS hdd_md_bl_evt_cb(void *ctx, struct sir_md_bl_evt *event); */ void hdd_hidden_ssid_enable_roaming(hdd_handle_t hdd_handle, uint8_t vdev_id); -/** - * hdd_send_update_owe_info_event - Send update OWE info event - * @adapter: Pointer to adapter - * @sta_addr: MAC address of peer STA - * @owe_ie: OWE IE - * @owe_ie_len: Length of OWE IE - * - * Send update OWE info event to hostapd - * - * Return: none - */ -#ifdef CFG80211_EXTERNAL_DH_UPDATE_SUPPORT -void hdd_send_update_owe_info_event(struct hdd_adapter *adapter, - uint8_t sta_addr[], - uint8_t *owe_ie, - uint32_t owe_ie_len); -#else -static inline void hdd_send_update_owe_info_event(struct hdd_adapter *adapter, - uint8_t sta_addr[], - uint8_t *owe_ie, - uint32_t owe_ie_len) -{ -} -#endif - /** * hdd_psoc_idle_shutdown - perform idle shutdown after interface inactivity * timeout diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 76e1023a762c..c5d0a0423274 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -21822,7 +21822,8 @@ wlan_hdd_cfg80211_update_ft_ies(struct wiphy *wiphy, } #endif -#ifdef CFG80211_EXTERNAL_DH_UPDATE_SUPPORT +#if defined(CFG80211_EXTERNAL_DH_UPDATE_SUPPORT) || \ +(LINUX_VERSION_CODE > KERNEL_VERSION(5, 2, 0)) /** * __wlan_hdd_cfg80211_update_owe_info() - update OWE info * @wiphy: Pointer to wiphy @@ -23448,7 +23449,8 @@ void hdd_set_rate_bw(struct rate_info *info, enum hdd_rate_info_bw hdd_bw) } #endif -#ifdef CFG80211_EXTERNAL_DH_UPDATE_SUPPORT +#if defined(CFG80211_EXTERNAL_DH_UPDATE_SUPPORT) || \ +(LINUX_VERSION_CODE > KERNEL_VERSION(5, 2, 0)) void hdd_send_update_owe_info_event(struct hdd_adapter *adapter, uint8_t sta_addr[], uint8_t *owe_ie, @@ -23798,7 +23800,8 @@ static struct cfg80211_ops wlan_hdd_cfg80211_ops = { #if defined(KERNEL_SUPPORT_11R_CFG80211) .update_ft_ies = wlan_hdd_cfg80211_update_ft_ies, #endif -#ifdef CFG80211_EXTERNAL_DH_UPDATE_SUPPORT +#if defined(CFG80211_EXTERNAL_DH_UPDATE_SUPPORT) || \ +(LINUX_VERSION_CODE > KERNEL_VERSION(5, 2, 0)) .update_owe_info = wlan_hdd_cfg80211_update_owe_info, #endif #ifdef FEATURE_WLAN_TDLS diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index f20b99f8b4a6..ce1bab7be81a 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -825,4 +825,30 @@ void wlan_hdd_set_wlm_mode(struct hdd_context *hdd_ctx, uint16_t latency_level) */ enum qca_wlan_802_11_mode hdd_convert_cfgdot11mode_to_80211mode(enum csr_cfgdot11mode mode); + +/** + * hdd_send_update_owe_info_event - Send update OWE info event + * @adapter: Pointer to adapter + * @sta_addr: MAC address of peer STA + * @owe_ie: OWE IE + * @owe_ie_len: Length of OWE IE + * + * Send update OWE info event to hostapd + * + * Return: none + */ +#if defined(CFG80211_EXTERNAL_DH_UPDATE_SUPPORT) || \ +(LINUX_VERSION_CODE > KERNEL_VERSION(5, 2, 0)) +void hdd_send_update_owe_info_event(struct hdd_adapter *adapter, + uint8_t sta_addr[], + uint8_t *owe_ie, + uint32_t owe_ie_len); +#else +static inline void hdd_send_update_owe_info_event(struct hdd_adapter *adapter, + uint8_t sta_addr[], + uint8_t *owe_ie, + uint32_t owe_ie_len) +{ +} +#endif #endif