Selaa lähdekoodia

qcacmn: Enable TDLS component

Enable TDLS module in dispatcher

Change-Id: I4b1fe09278115a90eb6b19ed6ce8fef57143a910
CRs-Fixed: 2011330
Frank Liu 8 vuotta sitten
vanhempi
sitoutus
cda0961ecc

+ 36 - 0
init_deinit/dispatcher/src/dispatcher_init_deinit.c

@@ -55,6 +55,10 @@
 #ifdef WLAN_OFFCHAN_TXRX_ENABLE
 #include <wlan_offchan_txrx_api.h>
 #endif
+
+#ifdef CONVERGED_TDLS_ENABLE
+#include "wlan_tdls_ucfg_api.h"
+#endif
 /**
  * DOC: This file provides various init/deinit trigger point for new
  * components.
@@ -127,6 +131,37 @@ static QDF_STATUS p2p_psoc_disable(struct wlan_objmgr_psoc *psoc)
 }
 #endif /* END of CONVERGED_P2P_ENABLE */
 
+#ifdef CONVERGED_TDLS_ENABLE
+static QDF_STATUS tdls_init(void)
+{
+	return ucfg_tdls_init();
+}
+
+static QDF_STATUS tdls_deinit(void)
+{
+	return ucfg_tdls_deinit();
+}
+
+static QDF_STATUS tdls_psoc_open(struct wlan_objmgr_psoc *psoc)
+{
+	return ucfg_tdls_psoc_open(psoc);
+}
+
+static QDF_STATUS tdls_psoc_close(struct wlan_objmgr_psoc *psoc)
+{
+	return ucfg_tdls_psoc_close(psoc);
+}
+
+static QDF_STATUS tdls_psoc_enable(struct wlan_objmgr_psoc *psoc)
+{
+	return ucfg_tdls_psoc_enable(psoc);
+}
+
+static QDF_STATUS tdls_psoc_disable(struct wlan_objmgr_psoc *psoc)
+{
+	return ucfg_tdls_psoc_disable(psoc);
+}
+#else
 static QDF_STATUS tdls_init(void)
 {
 	return QDF_STATUS_SUCCESS;
@@ -157,6 +192,7 @@ static QDF_STATUS tdls_psoc_disable(struct wlan_objmgr_psoc *psoc)
 {
 	return QDF_STATUS_SUCCESS;
 }
+#endif
 
 #ifdef WLAN_PMO_ENABLE
 static QDF_STATUS dispatcher_init_pmo(void)

+ 10 - 2
umac/tdls/dispatcher/inc/wlan_tdls_ucfg_api.h

@@ -73,12 +73,20 @@ QDF_STATUS ucfg_tdls_update_config(struct wlan_objmgr_psoc *psoc,
 				   struct tdls_start_params *req);
 
 /**
- * ucfg_tdls_psoc_stop() - TDLS module stop
+ * ucfg_tdls_psoc_enable() - TDLS module enable API
  * @psoc: psoc object
  *
  * Return: QDF_STATUS
  */
-QDF_STATUS ucfg_tdls_psoc_stop(struct wlan_objmgr_psoc *psoc);
+QDF_STATUS ucfg_tdls_psoc_enable(struct wlan_objmgr_psoc *psoc);
+
+/**
+ * ucfg_tdls_psoc_disable() - TDLS moudle disable API
+ * @psoc: psoc object
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS ucfg_tdls_psoc_disable(struct wlan_objmgr_psoc *psoc);
 
 /**
  * ucfg_tdls_add_peer() - handle TDLS add peer

+ 25 - 3
umac/tdls/dispatcher/src/wlan_tdls_ucfg_api.c

@@ -23,6 +23,7 @@
  */
 
 #include <wlan_tdls_ucfg_api.h>
+#include <wlan_tdls_tgt_api.h>
 #include "../../core/src/wlan_tdls_main.h"
 #include "../../core/src/wlan_tdls_cmds_process.h"
 #include <wlan_objmgr_global_obj.h>
@@ -213,11 +214,32 @@ QDF_STATUS ucfg_tdls_update_config(struct wlan_objmgr_psoc *psoc,
 	return QDF_STATUS_SUCCESS;
 }
 
-QDF_STATUS ucfg_tdls_psoc_stop(struct wlan_objmgr_psoc *psoc)
+QDF_STATUS ucfg_tdls_psoc_enable(struct wlan_objmgr_psoc *psoc)
 {
+	QDF_STATUS status;
+
+	tdls_notice("psoc tdls enable: 0x%p", psoc);
+	if (!psoc) {
+		tdls_err("NULL psoc");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	status = tgt_tdls_register_ev_handler(psoc);
+
+	return status;
+}
+
+QDF_STATUS ucfg_tdls_psoc_disable(struct wlan_objmgr_psoc *psoc)
+{
+	QDF_STATUS status;
 	struct tdls_soc_priv_obj *soc_obj = NULL;
 
-	tdls_notice("tdls psoc stop");
+	tdls_notice("psoc tdls disable: 0x%p", psoc);
+	if (!psoc) {
+		tdls_err("NULL psoc");
+		return QDF_STATUS_E_FAILURE;
+	}
+	status = tgt_tdls_unregister_ev_handler(psoc);
 	soc_obj = wlan_objmgr_psoc_get_comp_private_obj(psoc,
 							WLAN_UMAC_COMP_TDLS);
 	if (!soc_obj) {
@@ -231,7 +253,7 @@ QDF_STATUS ucfg_tdls_psoc_stop(struct wlan_objmgr_psoc *psoc)
 	soc_obj->tdls_tx_cnf_cb = NULL;
 	soc_obj->tx_ack_cnf_cb_data = NULL;
 
-	return QDF_STATUS_SUCCESS;
+	return status;
 }
 
 QDF_STATUS ucfg_tdls_psoc_close(struct wlan_objmgr_psoc *psoc)