Browse Source

qcacld-3.0: Clean up obsolete conditional compilation NAPIER_CODE

Clean up obsolete conditional compilation NAPIER_CODE.

Change-Id: I6655c135757117535be1ccdc688dbe7ff5bd5a6a
CRs-Fixed: 1095867
Rajeev Kumar 8 years ago
parent
commit
e4cbd534a6

+ 0 - 29
core/cds/inc/cds_mq.h

@@ -88,39 +88,10 @@ typedef struct cds_msg_s {
 #define HIGH_PRIORITY 1
 #define LOW_PRIORITY 0
 
-#ifndef NAPIER_CODE
-QDF_STATUS cds_mq_post_message_by_priority(CDS_MQ_ID msg_queue_id,
-					   cds_msg_t *message,
-					   int is_high_priority);
-
-/**
- * cds_mq_post_message() - posts a message to a message queue
- * @msg_queue_id: Identifies the message queue upon which the message
- *    will be posted.
- * @message: A pointer to a message buffer. Memory for this message
- *    buffer is allocated by the caller and free'd by the QDF after the
- *    message is posted to the message queue.  If the consumer of the
- *    message needs anything in this message, it needs to copy the contents
- *    before returning from the message queue handler.
- *
- * Return: QDF_STATUS_SUCCESS for successful posting
- *             QDF_STATUS_E_INVAL for invalid message queue id
- *             QDF_STATUS_E_FAULT for invalid message pointer
- *             QDF_STATUS_E_FAILURE for unknown failure reported by
- *             message queue handler
- */
-static inline QDF_STATUS cds_mq_post_message(CDS_MQ_ID msg_queue_id,
-					     cds_msg_t *message)
-{
-	return cds_mq_post_message_by_priority(msg_queue_id, message,
-						LOW_PRIORITY);
-}
-#else
 #define cds_mq_post_message_by_priority(_x, _y, _z) \
 	scheduler_post_msg_by_priority((_x), ((struct scheduler_msg *)_y), (_z))
 #define cds_mq_post_message(_x, _y) \
 	scheduler_post_msg((_x), ((struct scheduler_msg *)_y))
-#endif
 
 /**---------------------------------------------------------------------------
 

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

@@ -53,16 +53,9 @@
 
 #define TX_POST_EVENT_MASK               0x001
 #define TX_SUSPEND_EVENT_MASK            0x002
-#ifndef NAPIER_CODE
-#define MC_POST_EVENT_MASK               0x001
-#define MC_SUSPEND_EVENT_MASK            0x002
-#endif
 #define RX_POST_EVENT_MASK               0x001
 #define RX_SUSPEND_EVENT_MASK            0x002
 #define TX_SHUTDOWN_EVENT_MASK           0x010
-#ifndef NAPIER_CODE
-#define MC_SHUTDOWN_EVENT_MASK           0x010
-#endif
 #define RX_SHUTDOWN_EVENT_MASK           0x010
 #define WD_POST_EVENT_MASK               0x001
 #define WD_SHUTDOWN_EVENT_MASK           0x002
@@ -80,11 +73,7 @@
  *
  * Increased to 8000 to handle more RX frames
  */
-#ifndef NAPIER_CODE
 #define CDS_CORE_MAX_MESSAGES 8000
-#else
-#define CDS_CORE_MAX_MESSAGES 1000
-#endif
 
 #ifdef QCA_CONFIG_SMP
 /*
@@ -139,38 +128,6 @@ struct cds_ol_rx_pkt {
 typedef struct _cds_sched_context {
 	/* Place holder to the CDS Context */
 	void *pVContext;
-#ifndef NAPIER_CODE
-	/* WMA Message queue on the Main thread */
-	cds_mq_type wmaMcMq;
-
-	/* PE Message queue on the Main thread */
-	cds_mq_type peMcMq;
-
-	/* SME Message queue on the Main thread */
-	cds_mq_type smeMcMq;
-
-	/* SYS Message queue on the Main thread */
-	cds_mq_type sysMcMq;
-
-	/* Handle of Event for MC thread to signal startup */
-	struct completion McStartEvent;
-
-	struct task_struct *McThread;
-
-	/* completion object for MC thread shutdown */
-	struct completion McShutdown;
-
-	/* Wait queue for MC thread */
-	wait_queue_head_t mcWaitQueue;
-
-	unsigned long mcEventFlag;
-
-	/* Completion object to resume Mc thread */
-	struct completion ResumeMcEvent;
-
-	/* lock to make sure that McThread suspend/resume mechanism is in sync */
-	spinlock_t McThreadLock;
-#endif
 #ifdef QCA_CONFIG_SMP
 	spinlock_t ol_rx_thread_lock;
 

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

@@ -74,11 +74,6 @@ static cds_context_type g_cds_context;
 static p_cds_contextType gp_cds_context;
 static struct __qdf_device g_qdf_ctx;
 
-#ifndef NAPIER_CODE
-/* Debug variable to detect MC thread stuck */
-static atomic_t cds_wrapper_empty_count;
-#endif
-
 static uint8_t cds_multicast_logging;
 
 static struct ol_if_ops  dp_ol_if_ops = {
@@ -218,7 +213,6 @@ static void cds_cdp_cfg_attach(struct cds_config_info *cds_cfg)
 	cdp_cfg_set_packet_log_enabled(soc, gp_cds_context->cfg_ctx,
 		(uint8_t)cds_is_packet_log_enabled());
 }
-#ifdef NAPIER_CODE
 static QDF_STATUS cds_register_all_modules(void)
 {
 	QDF_STATUS status;
@@ -257,16 +251,6 @@ static QDF_STATUS cds_deregister_all_modules(void)
 	status = scheduler_deregister_module(QDF_MODULE_ID_OS_IF);
 	return status;
 }
-#else
-static QDF_STATUS cds_register_all_modules(void)
-{
-	return QDF_STATUS_SUCCESS;
-}
-static QDF_STATUS cds_deregister_all_modules(void)
-{
-	return QDF_STATUS_SUCCESS;
-}
-#endif
 
 /**
  * cds_open() - open the CDS Module
@@ -1462,118 +1446,6 @@ QDF_STATUS cds_free_context(void *p_cds_context, QDF_MODULE_ID moduleID,
 	return QDF_STATUS_SUCCESS;
 } /* cds_free_context() */
 
-#ifndef NAPIER_CODE
-/**
- * cds_mq_post_message_by_priority() - posts message using priority
- * to message queue
- * @msgQueueId: message queue id
- * @pMsg: message to be posted
- * @is_high_priority: wheather message is high priority
- *
- * This function is used to post high priority message to message queue
- *
- * Return: QDF_STATUS_SUCCESS on success
- *         QDF_STATUS_E_FAILURE on failure
- *         QDF_STATUS_E_RESOURCES on resource allocation failure
- */
-QDF_STATUS cds_mq_post_message_by_priority(CDS_MQ_ID msgQueueId,
-					   cds_msg_t *pMsg,
-					   int is_high_priority)
-{
-	p_cds_mq_type pTargetMq = NULL;
-	p_cds_msg_wrapper pMsgWrapper = NULL;
-	uint32_t debug_count = 0;
-
-	if ((gp_cds_context == NULL) || (pMsg == NULL)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Null params or global cds context is null",
-			  __func__);
-		QDF_ASSERT(0);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	switch (msgQueueId) {
-	/* Message Queue ID for messages bound for SME */
-	case CDS_MQ_ID_SME:
-	{
-		pTargetMq = &(gp_cds_context->qdf_sched.smeMcMq);
-		break;
-	}
-
-	/* Message Queue ID for messages bound for PE */
-	case CDS_MQ_ID_PE:
-	{
-		pTargetMq = &(gp_cds_context->qdf_sched.peMcMq);
-		break;
-	}
-
-	/* Message Queue ID for messages bound for wma */
-	case CDS_MQ_ID_WMA:
-	{
-		pTargetMq = &(gp_cds_context->qdf_sched.wmaMcMq);
-		break;
-	}
-
-	/* Message Queue ID for messages bound for the SYS module */
-	case CDS_MQ_ID_SYS:
-	{
-		pTargetMq = &(gp_cds_context->qdf_sched.sysMcMq);
-		break;
-	}
-
-	default:
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  ("%s: Trying to queue msg into unknown MC Msg queue ID %d"),
-			  __func__, msgQueueId);
-
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	QDF_ASSERT(NULL != pTargetMq);
-	if (pTargetMq == NULL) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: pTargetMq == NULL", __func__);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	/* Try and get a free Msg wrapper */
-	pMsgWrapper = cds_mq_get(&gp_cds_context->freeVosMq);
-
-	if (NULL == pMsgWrapper) {
-		debug_count = atomic_inc_return(&cds_wrapper_empty_count);
-		if (1 == debug_count) {
-			QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-				"%s: CDS Core run out of message wrapper %d",
-				__func__, debug_count);
-			cds_flush_logs(WLAN_LOG_TYPE_FATAL,
-				WLAN_LOG_INDICATOR_HOST_ONLY,
-				WLAN_LOG_REASON_VOS_MSG_UNDER_RUN,
-				true, false);
-		}
-		if (CDS_WRAPPER_MAX_FAIL_COUNT == debug_count)
-			QDF_BUG(0);
-
-		return QDF_STATUS_E_RESOURCES;
-	}
-
-	atomic_set(&cds_wrapper_empty_count, 0);
-
-	/* Copy the message now */
-	qdf_mem_copy((void *)pMsgWrapper->pVosMsg,
-		     (void *)pMsg, sizeof(cds_msg_t));
-
-	if (is_high_priority)
-		cds_mq_put_front(pTargetMq, pMsgWrapper);
-	else
-		cds_mq_put(pTargetMq, pMsgWrapper);
-
-	set_bit(MC_POST_EVENT_MASK, &gp_cds_context->qdf_sched.mcEventFlag);
-	wake_up_interruptible(&gp_cds_context->qdf_sched.mcWaitQueue);
-
-	return QDF_STATUS_SUCCESS;
-} /* cds_mq_post_message() */
-#endif
-
 /**
  * cds_sys_probe_thread_cback() -  probe mc thread callback
  * @pUserData: pointer to user data

+ 0 - 495
core/cds/src/cds_sched.c

@@ -88,9 +88,6 @@ enum notifier_state {
 
 
 static p_cds_sched_context gp_cds_sched_context;
-#ifndef NAPIER_CODE
-static int cds_mc_thread(void *Arg);
-#endif
 #ifdef QCA_CONFIG_SMP
 static int cds_ol_rx_thread(void *arg);
 static unsigned long affine_cpu;
@@ -470,10 +467,6 @@ QDF_STATUS cds_sched_open(void *p_cds_context,
 		p_cds_sched_context pSchedContext,
 		uint32_t SchedCtxSize)
 {
-#ifndef NAPIER_CODE
-	QDF_STATUS vStatus = QDF_STATUS_SUCCESS;
-#endif
-
 	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
 		  "%s: Opening the CDS Scheduler", __func__);
 	/* Sanity checks */
@@ -490,23 +483,6 @@ QDF_STATUS cds_sched_open(void *p_cds_context,
 	}
 	qdf_mem_zero(pSchedContext, sizeof(cds_sched_context));
 	pSchedContext->pVContext = p_cds_context;
-#ifndef NAPIER_CODE
-	vStatus = cds_sched_init_mqs(pSchedContext);
-	if (!QDF_IS_STATUS_SUCCESS(vStatus)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Failed to initialize CDS Scheduler MQs",
-			  __func__);
-		return vStatus;
-	}
-	/* Initialize the helper events and event queues */
-	init_completion(&pSchedContext->McStartEvent);
-	init_completion(&pSchedContext->McShutdown);
-	init_completion(&pSchedContext->ResumeMcEvent);
-
-	spin_lock_init(&pSchedContext->McThreadLock);
-	init_waitqueue_head(&pSchedContext->mcWaitQueue);
-	pSchedContext->mcEventFlag = 0;
-#endif
 #ifdef QCA_CONFIG_SMP
 	spin_lock_init(&pSchedContext->ol_rx_thread_lock);
 	init_waitqueue_head(&pSchedContext->ol_rx_wait_queue);
@@ -530,27 +506,6 @@ QDF_STATUS cds_sched_open(void *p_cds_context,
 #endif
 	gp_cds_sched_context = pSchedContext;
 
-#ifndef NAPIER_CODE
-	/* Create the CDS Main Controller thread */
-	pSchedContext->McThread = kthread_create(cds_mc_thread, pSchedContext,
-						 "cds_mc_thread");
-	if (IS_ERR(pSchedContext->McThread)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
-			  "%s: Could not Create CDS Main Thread Controller",
-			  __func__);
-		goto MC_THREAD_START_FAILURE;
-	}
-	wake_up_process(pSchedContext->McThread);
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
-		  "%s: CDS Main Controller thread Created", __func__);
-	/*
-	 * Now make sure all threads have started before we exit.
-	 * Each thread should normally ACK back when it starts.
-	 */
-	wait_for_completion_interruptible(&pSchedContext->McStartEvent);
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
-		  "%s: CDS MC Thread has started", __func__);
-#endif
 #ifdef QCA_CONFIG_SMP
 	pSchedContext->ol_rx_thread = kthread_create(cds_ol_rx_thread,
 						       pSchedContext,
@@ -577,286 +532,18 @@ QDF_STATUS cds_sched_open(void *p_cds_context,
 
 #ifdef QCA_CONFIG_SMP
 OL_RX_THREAD_START_FAILURE:
-#ifndef NAPIER_CODE
-	/* Try and force the Main thread controller to exit */
-	set_bit(MC_SHUTDOWN_EVENT_MASK, &pSchedContext->mcEventFlag);
-	set_bit(MC_POST_EVENT_MASK, &pSchedContext->mcEventFlag);
-	wake_up_interruptible(&pSchedContext->mcWaitQueue);
-	/* Wait for MC to exit */
-	wait_for_completion_interruptible(&pSchedContext->McShutdown);
-#endif
-#endif
-
-#ifndef NAPIER_CODE
-MC_THREAD_START_FAILURE:
-	/* De-initialize all the message queues */
-	cds_sched_deinit_mqs(pSchedContext);
 #endif
 
 #ifdef QCA_CONFIG_SMP
 	unregister_hotcpu_notifier(&cds_cpu_hotplug_notifier);
 	cds_free_ol_rx_pkt_freeq(gp_cds_sched_context);
 pkt_freeqalloc_failure:
-#endif
-#ifndef NAPIER_CODE
-	/* De-initialize all the message queues */
-	cds_sched_deinit_mqs(pSchedContext);
 #endif
 
 	return QDF_STATUS_E_RESOURCES;
 
 } /* cds_sched_open() */
 
-#ifndef NAPIER_CODE
-/**
- * cds_mc_thread() - cds main controller thread execution handler
- * @Arg: Pointer to the global CDS Sched Context
- *
- * Return: thread exit code
- */
-static int cds_mc_thread(void *Arg)
-{
-	p_cds_sched_context pSchedContext = (p_cds_sched_context) Arg;
-	p_cds_msg_wrapper pMsgWrapper = NULL;
-	tpAniSirGlobal pMacContext = NULL;
-	tSirRetStatus macStatus = eSIR_SUCCESS;
-	QDF_STATUS vStatus = QDF_STATUS_SUCCESS;
-	int retWaitStatus = 0;
-	bool shutdown = false;
-	hdd_context_t *pHddCtx = NULL;
-	v_CONTEXT_t p_cds_context = NULL;
-
-	if (Arg == NULL) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Bad Args passed", __func__);
-		return 0;
-	}
-	set_user_nice(current, -2);
-
-	/* Ack back to the context from which the main controller thread
-	 * has been created
-	 */
-	complete(&pSchedContext->McStartEvent);
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO,
-		  "%s: MC Thread %d (%s) starting up", __func__, current->pid,
-		  current->comm);
-
-	/* Get the Global CDS Context */
-	p_cds_context = cds_get_global_context();
-	if (!p_cds_context) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
-			  "%s: Global CDS context is Null", __func__);
-		return 0;
-	}
-
-	pHddCtx = cds_get_context(QDF_MODULE_ID_HDD);
-	if (!pHddCtx) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
-			  "%s: HDD context is Null", __func__);
-		return 0;
-	}
-
-	while (!shutdown) {
-		/* This implements the execution model algorithm */
-		retWaitStatus =
-			wait_event_interruptible(pSchedContext->mcWaitQueue,
-						 test_bit(MC_POST_EVENT_MASK,
-							  &pSchedContext->mcEventFlag)
-						 || test_bit(MC_SUSPEND_EVENT_MASK,
-							     &pSchedContext->mcEventFlag));
-
-		if (retWaitStatus == -ERESTARTSYS) {
-			QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-				  "%s: wait_event_interruptible returned -ERESTARTSYS",
-				  __func__);
-			QDF_BUG(0);
-		}
-		clear_bit(MC_POST_EVENT_MASK, &pSchedContext->mcEventFlag);
-
-		while (1) {
-			/* Check if MC needs to shutdown */
-			if (test_bit
-				    (MC_SHUTDOWN_EVENT_MASK,
-				    &pSchedContext->mcEventFlag)) {
-				QDF_TRACE(QDF_MODULE_ID_QDF,
-					  QDF_TRACE_LEVEL_INFO,
-					  "%s: MC thread signaled to shutdown",
-					  __func__);
-				shutdown = true;
-				/* Check for any Suspend Indication */
-				if (test_bit
-					    (MC_SUSPEND_EVENT_MASK,
-					    &pSchedContext->mcEventFlag)) {
-					clear_bit(MC_SUSPEND_EVENT_MASK,
-						  &pSchedContext->mcEventFlag);
-
-					/* Unblock anyone waiting on suspend */
-					complete(&pHddCtx->mc_sus_event_var);
-				}
-				break;
-			}
-			/* Check the SYS queue first */
-			if (!cds_is_mq_empty(&pSchedContext->sysMcMq)) {
-				/* Service the SYS message queue */
-				pMsgWrapper =
-					cds_mq_get(&pSchedContext->sysMcMq);
-				if (pMsgWrapper == NULL) {
-					QDF_TRACE(QDF_MODULE_ID_QDF,
-						  QDF_TRACE_LEVEL_ERROR,
-						  "%s: pMsgWrapper is NULL",
-						  __func__);
-					QDF_ASSERT(0);
-					break;
-				}
-				vStatus =
-					sys_mc_process_msg(pSchedContext->pVContext,
-							   pMsgWrapper->pVosMsg);
-				if (!QDF_IS_STATUS_SUCCESS(vStatus)) {
-					QDF_TRACE(QDF_MODULE_ID_QDF,
-						  QDF_TRACE_LEVEL_ERROR,
-						  "%s: Issue Processing SYS message",
-						  __func__);
-				}
-				/* return message to the Core */
-				cds_core_return_msg(pSchedContext->pVContext,
-						    pMsgWrapper);
-				continue;
-			}
-			/* Check the WMA queue */
-			if (!cds_is_mq_empty(&pSchedContext->wmaMcMq)) {
-				/* Service the WMA message queue */
-				pMsgWrapper =
-					cds_mq_get(&pSchedContext->wmaMcMq);
-				if (pMsgWrapper == NULL) {
-					QDF_TRACE(QDF_MODULE_ID_QDF,
-						  QDF_TRACE_LEVEL_ERROR,
-						  "%s: pMsgWrapper is NULL",
-						  __func__);
-					QDF_ASSERT(0);
-					break;
-				}
-				vStatus =
-					wma_mc_process_msg(pSchedContext->pVContext,
-							 pMsgWrapper->pVosMsg);
-				if (!QDF_IS_STATUS_SUCCESS(vStatus)) {
-					QDF_TRACE(QDF_MODULE_ID_QDF,
-						  QDF_TRACE_LEVEL_ERROR,
-						  "%s: Issue Processing WMA message",
-						  __func__);
-				}
-				/* return message to the Core */
-				cds_core_return_msg(pSchedContext->pVContext,
-						    pMsgWrapper);
-				continue;
-			}
-			/* Check the PE queue */
-			if (!cds_is_mq_empty(&pSchedContext->peMcMq)) {
-				/* Service the PE message queue */
-				pMsgWrapper =
-					cds_mq_get(&pSchedContext->peMcMq);
-				if (NULL == pMsgWrapper) {
-					QDF_TRACE(QDF_MODULE_ID_QDF,
-						  QDF_TRACE_LEVEL_ERROR,
-						  "%s: pMsgWrapper is NULL",
-						  __func__);
-					QDF_ASSERT(0);
-					break;
-				}
-				/* Need some optimization */
-				pMacContext =
-					cds_get_context(QDF_MODULE_ID_PE);
-				if (NULL == pMacContext) {
-					QDF_TRACE(QDF_MODULE_ID_QDF,
-						  QDF_TRACE_LEVEL_INFO,
-						  "MAC Context not ready yet");
-					cds_core_return_msg
-						(pSchedContext->pVContext,
-						pMsgWrapper);
-					continue;
-				}
-
-				macStatus =
-					pe_process_messages(pMacContext,
-							    (tSirMsgQ *)
-							    pMsgWrapper->pVosMsg);
-				if (eSIR_SUCCESS != macStatus) {
-					QDF_TRACE(QDF_MODULE_ID_QDF,
-						  QDF_TRACE_LEVEL_ERROR,
-						  "%s: Issue Processing PE message",
-						  __func__);
-				}
-				/* return message to the Core */
-				cds_core_return_msg(pSchedContext->pVContext,
-						    pMsgWrapper);
-				continue;
-			}
-			/** Check the SME queue **/
-			if (!cds_is_mq_empty(&pSchedContext->smeMcMq)) {
-				/* Service the SME message queue */
-				pMsgWrapper =
-					cds_mq_get(&pSchedContext->smeMcMq);
-				if (NULL == pMsgWrapper) {
-					QDF_TRACE(QDF_MODULE_ID_QDF,
-						  QDF_TRACE_LEVEL_ERROR,
-						  "%s: pMsgWrapper is NULL",
-						  __func__);
-					QDF_ASSERT(0);
-					break;
-				}
-				/* Need some optimization */
-				pMacContext =
-					cds_get_context(QDF_MODULE_ID_SME);
-				if (NULL == pMacContext) {
-					QDF_TRACE(QDF_MODULE_ID_QDF,
-						  QDF_TRACE_LEVEL_INFO,
-						  "MAC Context not ready yet");
-					cds_core_return_msg
-						(pSchedContext->pVContext,
-						pMsgWrapper);
-					continue;
-				}
-
-				vStatus =
-					sme_process_msg((tHalHandle) pMacContext,
-							pMsgWrapper->pVosMsg);
-				if (!QDF_IS_STATUS_SUCCESS(vStatus)) {
-					QDF_TRACE(QDF_MODULE_ID_QDF,
-						  QDF_TRACE_LEVEL_ERROR,
-						  "%s: Issue Processing SME message",
-						  __func__);
-				}
-				/* return message to the Core */
-				cds_core_return_msg(pSchedContext->pVContext,
-						    pMsgWrapper);
-				continue;
-			}
-			/* Check for any Suspend Indication */
-			if (test_bit
-				    (MC_SUSPEND_EVENT_MASK,
-				    &pSchedContext->mcEventFlag)) {
-				clear_bit(MC_SUSPEND_EVENT_MASK,
-					  &pSchedContext->mcEventFlag);
-				spin_lock(&pSchedContext->McThreadLock);
-				INIT_COMPLETION(pSchedContext->ResumeMcEvent);
-				/* Mc Thread Suspended */
-				complete(&pHddCtx->mc_sus_event_var);
-
-				spin_unlock(&pSchedContext->McThreadLock);
-
-				/* Wait foe Resume Indication */
-				wait_for_completion_interruptible
-					(&pSchedContext->ResumeMcEvent);
-			}
-			break;  /* All queues are empty now */
-		} /* while message loop processing */
-	} /* while true */
-	/* If we get here the MC thread must exit */
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO,
-		  "%s: MC Thread exiting!!!!", __func__);
-	complete_and_exit(&pSchedContext->McShutdown, 0);
-} /* cds_mc_thread() */
-#endif
-
 #ifdef QCA_CONFIG_SMP
 /**
  * cds_free_ol_rx_pkt_freeq() - free cds buffer free queue
@@ -1176,24 +863,6 @@ QDF_STATUS cds_sched_close(void *p_cds_context)
 			  "%s: gp_cds_sched_context == NULL", __func__);
 		return QDF_STATUS_E_FAILURE;
 	}
-
-#ifndef NAPIER_CODE
-
-	/* shut down MC Thread */
-	set_bit(MC_SHUTDOWN_EVENT_MASK, &gp_cds_sched_context->mcEventFlag);
-	set_bit(MC_POST_EVENT_MASK, &gp_cds_sched_context->mcEventFlag);
-	wake_up_interruptible(&gp_cds_sched_context->mcWaitQueue);
-	/* Wait for MC to exit */
-	wait_for_completion(&gp_cds_sched_context->McShutdown);
-	gp_cds_sched_context->McThread = 0;
-
-	/* Clean up message queues of MC thread */
-	cds_sched_flush_mc_mqs(gp_cds_sched_context);
-
-	/* Deinit all the queues */
-	cds_sched_deinit_mqs(gp_cds_sched_context);
-#endif
-
 #ifdef QCA_CONFIG_SMP
 	/* Shut down Tlshim Rx thread */
 	set_bit(RX_SHUTDOWN_EVENT_MASK, &gp_cds_sched_context->ol_rx_event_flag);
@@ -1209,170 +878,6 @@ QDF_STATUS cds_sched_close(void *p_cds_context)
 	return QDF_STATUS_SUCCESS;
 } /* cds_sched_close() */
 
-#ifndef NAPIER_CODE
-
-/**
- * cds_sched_init_mqs() - initialize the cds scheduler message queues
- * @p_cds_sched_context: Pointer to the Scheduler Context.
- *
- * This api initializes the cds scheduler message queues.
- *
- * Return: QDF status
- */
-QDF_STATUS cds_sched_init_mqs(p_cds_sched_context pSchedContext)
-{
-	QDF_STATUS vStatus = QDF_STATUS_SUCCESS;
-	/* Now intialize all the message queues */
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
-		  "%s: Initializing the WMA MC Message queue", __func__);
-	vStatus = cds_mq_init(&pSchedContext->wmaMcMq);
-	if (!QDF_IS_STATUS_SUCCESS(vStatus)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Failed to init WMA MC Message queue", __func__);
-		QDF_ASSERT(0);
-		return vStatus;
-	}
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
-		  "%s: Initializing the PE MC Message queue", __func__);
-	vStatus = cds_mq_init(&pSchedContext->peMcMq);
-	if (!QDF_IS_STATUS_SUCCESS(vStatus)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Failed to init PE MC Message queue", __func__);
-		QDF_ASSERT(0);
-		return vStatus;
-	}
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
-		  "%s: Initializing the SME MC Message queue", __func__);
-	vStatus = cds_mq_init(&pSchedContext->smeMcMq);
-	if (!QDF_IS_STATUS_SUCCESS(vStatus)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Failed to init SME MC Message queue", __func__);
-		QDF_ASSERT(0);
-		return vStatus;
-	}
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
-		  "%s: Initializing the SYS MC Message queue", __func__);
-	vStatus = cds_mq_init(&pSchedContext->sysMcMq);
-	if (!QDF_IS_STATUS_SUCCESS(vStatus)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Failed to init SYS MC Message queue", __func__);
-		QDF_ASSERT(0);
-		return vStatus;
-	}
-
-	return QDF_STATUS_SUCCESS;
-} /* cds_sched_init_mqs() */
-
-/**
- * cds_sched_deinit_mqs() - Deinitialize the cds scheduler message queues
- * @p_cds_sched_context: Pointer to the Scheduler Context.
- *
- * Return: none
- */
-void cds_sched_deinit_mqs(p_cds_sched_context pSchedContext)
-{
-	/* Now de-intialize all message queues */
-
-	/* MC WMA */
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
-		  "%s De-Initializing the WMA MC Message queue", __func__);
-	cds_mq_deinit(&pSchedContext->wmaMcMq);
-	/* MC PE */
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
-		  "%s De-Initializing the PE MC Message queue", __func__);
-	cds_mq_deinit(&pSchedContext->peMcMq);
-	/* MC SME */
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
-		  "%s De-Initializing the SME MC Message queue", __func__);
-	cds_mq_deinit(&pSchedContext->smeMcMq);
-	/* MC SYS */
-	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH,
-		  "%s De-Initializing the SYS MC Message queue", __func__);
-	cds_mq_deinit(&pSchedContext->sysMcMq);
-
-} /* cds_sched_deinit_mqs() */
-
-/**
- * cds_sched_flush_mc_mqs() - flush all the MC thread message queues
- * @pSchedContext: Pointer to global cds context
- *
- * Return: none
- */
-void cds_sched_flush_mc_mqs(p_cds_sched_context pSchedContext)
-{
-	p_cds_msg_wrapper pMsgWrapper = NULL;
-	p_cds_contextType cds_ctx;
-
-	/* Here each of the MC thread MQ shall be drained and returned to the
-	 * Core. Before returning a wrapper to the Core, the CDS message shall
-	 * be freed first
-	 */
-	QDF_TRACE(QDF_MODULE_ID_QDF,
-		  QDF_TRACE_LEVEL_INFO,
-		  ("Flushing the MC Thread message queue"));
-
-	if (NULL == pSchedContext) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: pSchedContext is NULL", __func__);
-		return;
-	}
-
-	cds_ctx = (p_cds_contextType) (pSchedContext->pVContext);
-	if (NULL == cds_ctx) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: cds_ctx is NULL", __func__);
-		return;
-	}
-
-	/* Flush the SYS Mq */
-	while (NULL != (pMsgWrapper = cds_mq_get(&pSchedContext->sysMcMq))) {
-		QDF_TRACE(QDF_MODULE_ID_QDF,
-			  QDF_TRACE_LEVEL_INFO,
-			  "%s: Freeing MC SYS message type %d ", __func__,
-			  pMsgWrapper->pVosMsg->type);
-		cds_core_return_msg(pSchedContext->pVContext, pMsgWrapper);
-	}
-	/* Flush the WMA Mq */
-	while (NULL != (pMsgWrapper = cds_mq_get(&pSchedContext->wmaMcMq))) {
-		if (pMsgWrapper->pVosMsg != NULL) {
-			QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO,
-				  "%s: Freeing MC WMA MSG message type %d",
-				  __func__, pMsgWrapper->pVosMsg->type);
-			if (pMsgWrapper->pVosMsg->bodyptr) {
-				qdf_mem_free((void *)pMsgWrapper->
-					     pVosMsg->bodyptr);
-			}
-
-			pMsgWrapper->pVosMsg->bodyptr = NULL;
-			pMsgWrapper->pVosMsg->bodyval = 0;
-			pMsgWrapper->pVosMsg->type = 0;
-		}
-		cds_core_return_msg(pSchedContext->pVContext, pMsgWrapper);
-	}
-
-	/* Flush the PE Mq */
-	while (NULL != (pMsgWrapper = cds_mq_get(&pSchedContext->peMcMq))) {
-		QDF_TRACE(QDF_MODULE_ID_QDF,
-			  QDF_TRACE_LEVEL_INFO,
-			  "%s: Freeing MC PE MSG message type %d", __func__,
-			  pMsgWrapper->pVosMsg->type);
-		pe_free_msg(cds_ctx->pMACContext,
-			    (tSirMsgQ *) pMsgWrapper->pVosMsg);
-		cds_core_return_msg(pSchedContext->pVContext, pMsgWrapper);
-	}
-	/* Flush the SME Mq */
-	while (NULL != (pMsgWrapper = cds_mq_get(&pSchedContext->smeMcMq))) {
-		QDF_TRACE(QDF_MODULE_ID_QDF,
-			  QDF_TRACE_LEVEL_INFO,
-			  "%s: Freeing MC SME MSG message type %d", __func__,
-			  pMsgWrapper->pVosMsg->type);
-		sme_free_msg(cds_ctx->pMACContext, pMsgWrapper->pVosMsg);
-		cds_core_return_msg(pSchedContext->pVContext, pMsgWrapper);
-	}
-} /* cds_sched_flush_mc_mqs() */
-
-#endif
-
 /**
  * get_cds_sched_ctxt() - get cds scheduler context
  *

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

@@ -7871,12 +7871,6 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx)
 		QDF_ASSERT(0);
 	}
 
-#ifndef NAPIER_CODE
-	/* Clean up message queues of TX, RX and MC thread */
-	if (!cds_is_driver_recovering())
-		cds_sched_flush_mc_mqs(cds_sched_context);
-#endif
-
 	hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
 	if (!hif_ctx) {
 		hdd_err("Hif context is Null");

+ 0 - 2
core/mac/src/pe/include/lim_api.h

@@ -276,9 +276,7 @@ static inline void lim_get_rf_band_new(tpAniSirGlobal pMac, tSirRFBand *band,
 
    --------------------------------------------------------------------------*/
 tSirRetStatus pe_process_messages(tpAniSirGlobal pMac, tSirMsgQ *pMsg);
-#ifdef NAPIER_CODE
 QDF_STATUS pe_mc_process_handler(struct scheduler_msg *msg);
-#endif
 
 /** -------------------------------------------------------------
    \fn pe_free_msg

+ 0 - 2
core/mac/src/pe/lim/lim_api.c

@@ -988,7 +988,6 @@ tSirRetStatus pe_process_messages(tpAniSirGlobal pMac, tSirMsgQ *pMsg)
 	return eSIR_SUCCESS;
 }
 
-#ifdef NAPIER_CODE
 QDF_STATUS pe_mc_process_handler(struct scheduler_msg *msg)
 {
 	tSirRetStatus status;
@@ -1003,7 +1002,6 @@ QDF_STATUS pe_mc_process_handler(struct scheduler_msg *msg)
 
 	return QDF_STATUS_E_FAILURE;
 }
-#endif
 
 /* --------------------------------------------------------------------------- */
 /**

+ 0 - 2
core/mac/src/sys/common/inc/wlan_qct_sys.h

@@ -180,9 +180,7 @@ QDF_STATUS sys_stop(v_CONTEXT_t p_cds_context);
 
    --------------------------------------------------------------------------*/
 QDF_STATUS sys_mc_process_msg(v_CONTEXT_t p_cds_context, cds_msg_t *pMsg);
-#ifdef NAPIER_CODE
 QDF_STATUS sys_mc_process_handler(struct scheduler_msg *msg);
-#endif
 
 void wlan_sys_probe(void);
 

+ 0 - 2
core/mac/src/sys/common/src/wlan_qct_sys.c

@@ -250,7 +250,6 @@ QDF_STATUS sys_mc_process_msg(v_CONTEXT_t p_cds_context, cds_msg_t *pMsg)
 	return qdf_status;
 }
 
-#ifdef NAPIER_CODE
 QDF_STATUS sys_mc_process_handler(struct scheduler_msg *msg)
 {
 	void *cds_ctx = cds_get_global_context();
@@ -262,7 +261,6 @@ QDF_STATUS sys_mc_process_handler(struct scheduler_msg *msg)
 	}
 	return sys_mc_process_msg(cds_ctx, (cds_msg_t *)msg);
 }
-#endif
 
 /**
  * sys_process_mmh_msg() - this api to process mmh message

+ 0 - 2
core/sme/inc/sme_api.h

@@ -240,9 +240,7 @@ QDF_STATUS sme_get_soft_ap_domain(tHalHandle hHal,
 QDF_STATUS sme_set_reg_info(tHalHandle hHal, uint8_t *apCntryCode);
 QDF_STATUS sme_hdd_ready_ind(tHalHandle hHal);
 QDF_STATUS sme_process_msg(tHalHandle hHal, cds_msg_t *pMsg);
-#ifdef NAPIER_CODE
 QDF_STATUS sme_mc_process_handler(struct scheduler_msg *msg);
-#endif
 void sme_free_msg(tHalHandle hHal, cds_msg_t *pMsg);
 QDF_STATUS sme_scan_request(tHalHandle hHal, uint8_t sessionId,
 		tCsrScanRequest *, csr_scan_completeCallback callback,

+ 0 - 2
core/sme/src/common/sme_api.c

@@ -3098,7 +3098,6 @@ release_lock:
 	return status;
 }
 
-#ifdef NAPIER_CODE
 QDF_STATUS sme_mc_process_handler(struct scheduler_msg *msg)
 {
 	tpAniSirGlobal mac_ctx = cds_get_context(QDF_MODULE_ID_SME);
@@ -3110,7 +3109,6 @@ QDF_STATUS sme_mc_process_handler(struct scheduler_msg *msg)
 
 	return sme_process_msg((tHalHandle)mac_ctx, (cds_msg_t *)msg);
 }
-#endif
 
 /**
  * sme_process_nss_update_resp() - Process nss update response

+ 0 - 2
core/wma/inc/wma_api.h

@@ -108,9 +108,7 @@ QDF_STATUS wma_pre_start(void *cds_context);
 
 QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg);
 
-#ifdef NAPIER_CODE
 QDF_STATUS wma_mc_process_handler(struct scheduler_msg *msg);
-#endif
 
 QDF_STATUS wma_start(void *cds_context);
 

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

@@ -6888,7 +6888,6 @@ end:
 	return qdf_status;
 }
 
-#ifdef NAPIER_CODE
 QDF_STATUS wma_mc_process_handler(struct scheduler_msg *msg)
 {
 	void *cds_ctx = cds_get_global_context();
@@ -6900,7 +6899,6 @@ QDF_STATUS wma_mc_process_handler(struct scheduler_msg *msg)
 	}
 	return wma_mc_process_msg(cds_ctx, (cds_msg_t *)msg);
 }
-#endif
 
 /**
  * wma_log_completion_timeout() - Log completion timeout