ソースを参照

qcacld-3.0: Get the firmware capability NAN_VDEV_SUPPORT

Firmware advertises service capability bit NAN_VDEV_SUPPORT for
separate NAN vdev creation. This capability can be used to create
separate interface for NAN discovery and process corresponding
commands from userspace.

Change-Id: I45573c94ee2d966afc1e207c9eefc146ff43320f
CRs-Fixed: 2592019
Srinivas Dasari 5 年 前
コミット
4c50119c27

+ 2 - 0
components/nan/core/inc/nan_public_structs.h

@@ -791,6 +791,7 @@ struct wlan_nan_rx_ops {
  * @ndi_dbs_supported: Target supports NAN Datapath with DBS
  * @nan_sap_supported: Target supports NAN Discovery with SAP concurrency
  * @ndi_sap_supported: Target supports NAN Datapth with SAP concurrency
+ * @nan_vdev_allowed: Allow separate vdev creation for NAN discovery
  */
 struct nan_tgt_caps {
 	uint32_t nan_disable_supported:1;
@@ -798,6 +799,7 @@ struct nan_tgt_caps {
 	uint32_t ndi_dbs_supported:1;
 	uint32_t nan_sap_supported:1;
 	uint32_t ndi_sap_supported:1;
+	uint32_t nan_vdev_allowed:1;
 };
 
 #endif

+ 14 - 0
components/nan/dispatcher/inc/nan_ucfg_api.h

@@ -360,6 +360,14 @@ bool ucfg_nan_is_enable_disable_in_progress(struct wlan_objmgr_psoc *psoc);
  */
 bool ucfg_nan_is_sta_ndp_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
 					     struct wlan_objmgr_vdev *vdev);
+
+/**
+ * ucfg_nan_is_vdev_creation_allowed()- Get support for NAN vdev creation
+ * @psoc: pointer to psoc object
+ *
+ * Return: True if NAN vdev creation is allowed else false
+ */
+bool ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc *psoc);
 #else /* WLAN_FEATURE_NAN */
 
 static inline
@@ -411,5 +419,11 @@ bool ucfg_nan_is_sta_ndp_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
 {
 	return false;
 }
+
+static inline
+bool ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc *psoc)
+{
+	return false;
+}
 #endif /* WLAN_FEATURE_NAN */
 #endif /* _NAN_UCFG_API_H_ */

+ 13 - 0
components/nan/dispatcher/src/nan_ucfg_api.c

@@ -1032,3 +1032,16 @@ bool ucfg_nan_is_sta_ndp_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
 
 	return false;
 }
+
+bool ucfg_nan_is_vdev_creation_allowed(struct wlan_objmgr_psoc *psoc)
+{
+	struct nan_psoc_priv_obj *psoc_nan_obj;
+
+	psoc_nan_obj = nan_get_psoc_priv_obj(psoc);
+	if (!psoc_nan_obj) {
+		nan_err("psoc_nan_obj is null");
+		return false;
+	}
+
+	return psoc_nan_obj->nan_caps.nan_vdev_allowed;
+}

+ 3 - 0
core/wma/src/wma_main.c

@@ -5235,6 +5235,9 @@ static void wma_update_nan_target_caps(tp_wma_handle wma_handle,
 	if (wmi_service_enabled(wma_handle->wmi_handle,
 				wmi_service_ndi_sap_support))
 		tgt_cfg->nan_caps.ndi_sap_supported = 1;
+
+	if (wmi_service_enabled(wma_handle->wmi_handle, wmi_service_nan_vdev))
+		tgt_cfg->nan_caps.nan_vdev_allowed = 1;
 }
 #else
 static void wma_update_nan_target_caps(tp_wma_handle wma_handle,