Pārlūkot izejas kodu

qcacmn: Properly featurize NAN

When CONFIG_MOBILE_ROUTER is enabled there are build failures
due to improper featurization of NAN, so fix the featurization.

Change-Id: I6bc11fb82394c2d32b328cb5d50ff974051755e1
CRs-Fixed: 2353170
jiad 6 gadi atpakaļ
vecāks
revīzija
cceae87cf8

+ 0 - 2
umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h

@@ -64,9 +64,7 @@ struct oem_data_rsp;
 struct direct_buf_rx_data;
 #endif
 
-#ifdef WLAN_FEATURE_NAN_CONVERGENCE
 struct scheduler_msg;
-#endif
 
 #ifdef CONVERGED_TDLS_ENABLE
 #include "wlan_tdls_public_structs.h"

+ 14 - 0
wmi/inc/wmi_unified_priv.h

@@ -2224,6 +2224,20 @@ static inline void wmi_sta_attach_tlv(struct wmi_unified *wmi_handle)
 }
 #endif
 
+#ifdef WLAN_FEATURE_NAN
+/**
+ * wmi_nan_feature_attach_tlv() - set NAN feature wmi callback
+ * @wmi_handle: wmi handle
+ *
+ * Return: none
+ */
+void wmi_nan_feature_attach_tlv(struct wmi_unified *wmi_handle);
+#else
+static inline void wmi_nan_feature_attach_tlv(struct wmi_unified *wmi_handle)
+{
+}
+#endif
+
 /**
  * wmi_align() - provides word aligned parameter
  * @param: parameter to be aligned

+ 2 - 0
wmi/inc/wmi_unified_sta_api.h

@@ -146,6 +146,7 @@ QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id);
 QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
 					struct wlm_latency_level_param *param);
 
+#ifdef WLAN_FEATURE_NAN
 /**
  * wmi_unified_nan_req_cmd() - to send nan request to target
  * @wmi_handle: wmi handle
@@ -155,6 +156,7 @@ QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
  */
 QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
 				   struct nan_req_params *nan_req);
+#endif
 
 /**
  * wmi_unified_process_set_ie_info_cmd() - Function to send IE info to firmware

+ 2 - 0
wmi/src/wmi_unified_sta_api.c

@@ -123,6 +123,7 @@ QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl,
 	return QDF_STATUS_E_FAILURE;
 }
 
+#ifdef WLAN_FEATURE_NAN
 QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
 			struct nan_req_params *nan_req)
 {
@@ -134,6 +135,7 @@ QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl,
 
 	return QDF_STATUS_E_FAILURE;
 }
+#endif
 
 QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl,
 				   struct vdev_ie_info_param *ie_info)

+ 10 - 1
wmi/src/wmi_unified_sta_tlv.c

@@ -502,6 +502,7 @@ static QDF_STATUS send_wlm_latency_level_cmd_tlv(wmi_unified_t wmi_handle,
 	return 0;
 }
 
+#ifdef WLAN_FEATURE_NAN
 /**
  * send_nan_req_cmd_tlv() - to send nan request to target
  * @wmi_handle: wmi handle
@@ -574,6 +575,14 @@ static QDF_STATUS send_nan_req_cmd_tlv(wmi_unified_t wmi_handle,
 	return ret;
 }
 
+void wmi_nan_feature_attach_tlv(struct wmi_unified *wmi_handle)
+{
+	struct wmi_ops *ops = wmi_handle->ops;
+
+	ops->send_nan_req_cmd = send_nan_req_cmd_tlv;
+}
+#endif /* WLAN_FEATURE_NAN */
+
 #ifdef CONVERGED_TDLS_ENABLE
 /**
  * tdls_get_wmi_offchannel_mode - Get WMI tdls off channel mode
@@ -2471,7 +2480,6 @@ void wmi_sta_attach_tlv(wmi_unified_t wmi_handle)
 	ops->send_fw_profiling_cmd = send_fw_profiling_cmd_tlv;
 	ops->send_nat_keepalive_en_cmd = send_nat_keepalive_en_cmd_tlv;
 	ops->send_wlm_latency_level_cmd = send_wlm_latency_level_cmd_tlv;
-	ops->send_nan_req_cmd = send_nan_req_cmd_tlv;
 	ops->send_process_set_ie_info_cmd = send_process_set_ie_info_cmd_tlv;
 	ops->send_set_base_macaddr_indicate_cmd =
 		 send_set_base_macaddr_indicate_cmd_tlv;
@@ -2504,5 +2512,6 @@ void wmi_sta_attach_tlv(wmi_unified_t wmi_handle)
 	wmi_tdls_attach_tlv(wmi_handle);
 	wmi_disa_attach_tlv(wmi_handle);
 	wmi_policy_mgr_attach_tlv(wmi_handle);
+	wmi_nan_feature_attach_tlv(wmi_handle);
 }