Browse Source

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
Aditya Kodukula 4 years ago
parent
commit
007291fb8d
3 changed files with 32 additions and 28 deletions
  1. 0 25
      core/hdd/inc/wlan_hdd_main.h
  2. 6 3
      core/hdd/src/wlan_hdd_cfg80211.c
  3. 26 0
      core/hdd/src/wlan_hdd_cfg80211.h

+ 0 - 25
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

+ 6 - 3
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

+ 26 - 0
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