Просмотр исходного кода

qcacld-3.0: Define init-deinit basic framework for phase 3 convergence

Define basic dispatcher framework for init/deinit. Each individual
component is supposed to define its init/deinit primitives and replace
dummy place holder primitives.

Change-Id: I35140ea7af03ce568e1732435458caf78ab28996
CRs-Fixed: 1095741
Rajeev Kumar 8 лет назад
Родитель
Сommit
97767a0297
3 измененных файлов с 34 добавлено и 0 удалено
  1. 12 0
      Kbuild
  2. 15 0
      core/cds/src/cds_api.c
  3. 7 0
      core/hdd/src/wlan_hdd_main.c

+ 12 - 0
Kbuild

@@ -842,6 +842,16 @@ HTT_OBJS := $(HTT_DIR)/htt_tx.o \
             $(HTT_DIR)/htt_fw_stats.o \
             $(HTT_DIR)/htt_rx.o
 
+
+############## INIT-DEINIT ###########
+INIT_DEINIT_DIR := init_deinit/dispatcher
+INIT_DEINIT_INC_DIR := $(INIT_DEINIT_DIR)/inc
+INIT_DEINIT_SRC_DIR := $(INIT_DEINIT_DIR)/src
+INIT_DEINIT_OBJ_DIR := $(WLAN_COMMON_ROOT)/$(INIT_DEINIT_SRC_DIR)
+INIT_DEINIT_INC := -I$(WLAN_COMMON_INC)/$(INIT_DEINIT_INC_DIR)
+INIT_DEINIT_OBJS := $(INIT_DEINIT_OBJ_DIR)/dispatcher_init_deinit.o
+
+
 ############## HTC ##########
 HTC_DIR := htc
 HTC_INC := -I$(WLAN_COMMON_INC)/$(HTC_DIR)
@@ -1051,6 +1061,7 @@ INCS +=		$(WMA_INC) \
 		$(CDP_INC) \
 		$(PKTLOG_INC) \
 		$(HTT_INC) \
+		$(INIT_DEINIT_INC) \
 		$(HTC_INC) \
 		$(DFS_INC) \
 		$(WCFG_INC) \
@@ -1091,6 +1102,7 @@ OBJS +=		$(WMA_OBJS) \
 		$(WMI_OBJS) \
 		$(FWLOG_OBJS) \
 		$(HTC_OBJS) \
+		$(INIT_DEINIT_OBJS) \
 		$(DFS_OBJS)
 
 OBJS +=		$(HIF_OBJS) \

+ 15 - 0
core/cds/src/cds_api.c

@@ -63,6 +63,7 @@
 #include <cdp_txrx_cmn_reg.h>
 #include <cdp_txrx_cfg.h>
 #include <cdp_txrx_misc.h>
+#include <dispatcher_init_deinit.h>
 /* Preprocessor Definitions and Constants */
 
 /* Maximum number of cds message queue get wrapper failures to cause panic */
@@ -463,6 +464,8 @@ QDF_STATUS cds_open(void)
 	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "%s: CDS successfully Opened", __func__);
 
+	dispatcher_psoc_open();
+
 	return QDF_STATUS_SUCCESS;
 
 err_sme_close:
@@ -709,6 +712,8 @@ QDF_STATUS cds_enable(v_CONTEXT_t cds_context)
 	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO,
 		  "%s: CDS Start is successful!!", __func__);
 
+	dispatcher_psoc_enable();
+
 	return QDF_STATUS_SUCCESS;
 
 err_soc_target_detach:
@@ -763,6 +768,14 @@ QDF_STATUS cds_disable(v_CONTEXT_t cds_context)
 	QDF_STATUS qdf_status;
 	void *handle;
 
+	/* PSOC disable for all new components. It needs to happen before
+	 * target is PDEV suspended such that a component can abort all its
+	 * ongoing transaction with FW. Always keep it before wma_stop() as
+	 * wma_stop() does target PDEV suspend.
+	 */
+	dispatcher_psoc_disable();
+
+
 	qdf_status = wma_stop(cds_context, HAL_STOP_TYPE_RF_KILL);
 
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
@@ -939,6 +952,8 @@ QDF_STATUS cds_close(v_CONTEXT_t cds_context)
 	cds_deinit_ini_config();
 	qdf_timer_module_deinit();
 
+	dispatcher_psoc_close();
+
 	return QDF_STATUS_SUCCESS;
 }
 

+ 7 - 0
core/hdd/src/wlan_hdd_main.c

@@ -108,6 +108,7 @@
 #include "nan_api.h"
 #include <wlan_hdd_napi.h>
 #include "wlan_hdd_disa.h"
+#include <dispatcher_init_deinit.h>
 
 #ifdef MODULE
 #define WLAN_MODULE_NAME  module_name(THIS_MODULE)
@@ -9121,6 +9122,8 @@ static int __hdd_module_init(void)
 		goto err_hdd_init;
 	}
 
+	dispatcher_init();
+
 	qdf_wake_lock_create(&wlan_wake_lock, "wlan");
 
 	hdd_set_conparam((uint32_t) con_mode);
@@ -9137,9 +9140,12 @@ static int __hdd_module_init(void)
 	return 0;
 out:
 	qdf_wake_lock_destroy(&wlan_wake_lock);
+	dispatcher_deinit();
 	hdd_deinit();
+
 err_hdd_init:
 	pld_deinit();
+
 	return ret;
 }
 
@@ -9181,6 +9187,7 @@ static void __hdd_module_exit(void)
 
 	qdf_wake_lock_destroy(&wlan_wake_lock);
 
+	dispatcher_deinit();
 	hdd_deinit();
 	pld_deinit();