Browse Source

qcacld-3.0: Remove obsolete MC thread message buffers from cds

After control path scheduler componentization CDS message buffers,
and message wrappers are no longer used hence remove them.

Change-Id: If6e915ffe27775511cb359adb704fa9e03653420
CRs-Fixed: 1107094
Rajeev Kumar 8 years ago
parent
commit
3e5ef0da16
2 changed files with 2 additions and 50 deletions
  1. 0 20
      core/cds/inc/cds_sched.h
  2. 2 30
      core/cds/src/cds_api.c

+ 0 - 20
core/cds/inc/cds_sched.h

@@ -63,18 +63,6 @@
 #define WD_WLAN_SHUTDOWN_EVENT_MASK      0x008
 #define WD_WLAN_REINIT_EVENT_MASK        0x010
 
-/*
- * Maximum number of messages in the system
- * These are buffers to account for all current messages
- * with some accounting of what we think is a
- * worst-case scenario.  Must be able to handle all
- * incoming frames, as well as overhead for internal
- * messaging
- *
- * Increased to 8000 to handle more RX frames
- */
-#define CDS_CORE_MAX_MESSAGES 8000
-
 #ifdef QCA_CONFIG_SMP
 /*
 ** Maximum number of cds messages to be allocated for
@@ -213,14 +201,6 @@ typedef struct _cds_msg_wrapper {
 } cds_msg_wrapper, *p_cds_msg_wrapper;
 
 typedef struct _cds_context_type {
-	/* Messages buffers */
-	cds_msg_t aMsgBuffers[CDS_CORE_MAX_MESSAGES];
-
-	cds_msg_wrapper aMsgWrappers[CDS_CORE_MAX_MESSAGES];
-
-	/* Free Message queue */
-	cds_mq_type freeVosMq;
-
 	/* Scheduler Context */
 	cds_sched_context qdf_sched;
 

+ 2 - 30
core/cds/src/cds_api.c

@@ -66,9 +66,6 @@
 #include <dispatcher_init_deinit.h>
 /* Preprocessor Definitions and Constants */
 
-/* Maximum number of cds message queue get wrapper failures to cause panic */
-#define CDS_WRAPPER_MAX_FAIL_COUNT (CDS_CORE_MAX_MESSAGES * 3)
-
 /* Data definitions */
 static cds_context_type g_cds_context;
 static p_cds_contextType gp_cds_context;
@@ -269,7 +266,6 @@ static QDF_STATUS cds_deregister_all_modules(void)
 QDF_STATUS cds_open(void)
 {
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
-	int iter = 0;
 	tSirRetStatus sirStatus = eSIR_SUCCESS;
 	struct cds_config_info *cds_cfg;
 	qdf_device_t qdf_ctx;
@@ -312,38 +308,19 @@ QDF_STATUS cds_open(void)
 		goto err_probe_event;
 	}
 
-	/* Initialize the free message queue */
-	qdf_status = cds_mq_init(&gp_cds_context->freeVosMq);
-	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
-		/* Critical Error ...  Cannot proceed further */
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
-			  "%s: Failed to initialize CDS free message queue",
-			  __func__);
-		QDF_ASSERT(0);
-		goto err_wma_complete_event;
-	}
-
-	for (iter = 0; iter < CDS_CORE_MAX_MESSAGES; iter++) {
-		(gp_cds_context->aMsgWrappers[iter]).pVosMsg =
-			&(gp_cds_context->aMsgBuffers[iter]);
-		INIT_LIST_HEAD(&gp_cds_context->aMsgWrappers[iter].msgNode);
-		cds_mq_put(&gp_cds_context->freeVosMq,
-			   &(gp_cds_context->aMsgWrappers[iter]));
-	}
-
 	pHddCtx = (hdd_context_t *) (gp_cds_context->pHDDContext);
 	if ((NULL == pHddCtx) || (NULL == pHddCtx->config)) {
 		/* Critical Error ...  Cannot proceed further */
 		cds_err("Hdd Context is Null");
 		QDF_ASSERT(0);
-		goto err_msg_queue;
+		goto err_wma_complete_event;
 	}
 
 	if (!QDF_IS_STATUS_SUCCESS(qdf_mutex_create(
 				&cds_ctx->qdf_conc_list_lock))) {
 		cds_err("Failed to init qdf_conc_list_lock");
 		QDF_ASSERT(0);
-		goto err_msg_queue;
+		goto err_wma_complete_event;
 	}
 
 	/* Now Open the CDS Scheduler */
@@ -540,9 +517,6 @@ err_sched_close:
 err_concurrency_lock:
 	qdf_mutex_destroy(&cds_ctx->qdf_conc_list_lock);
 
-err_msg_queue:
-	cds_mq_deinit(&gp_cds_context->freeVosMq);
-
 err_wma_complete_event:
 	qdf_event_destroy(&gp_cds_context->wmaCompleteEvent);
 
@@ -980,8 +954,6 @@ QDF_STATUS cds_close(v_CONTEXT_t cds_context)
 		QDF_ASSERT(QDF_IS_STATUS_SUCCESS(qdf_status));
 	}
 
-	cds_mq_deinit(&((p_cds_contextType) cds_context)->freeVosMq);
-
 	qdf_status = qdf_event_destroy(&gp_cds_context->wmaCompleteEvent);
 	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,