Bladeren bron

qcacld-3.0: Remove obsolete CDS mq APIs reference from CDS module

After control path scheduler componentization CDS message queue
APIs are no longer used hence remove obsolete CDS mq APIs from CDS
module.

Change-Id: I7d83783d9fd126bb8b17a5c3292eac91c0966280
CRs-Fixed: 1114375
Rajeev Kumar 8 jaren geleden
bovenliggende
commit
229f1d3cc0

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

@@ -44,54 +44,9 @@
 #include <qdf_types.h>
 #include <qdf_status.h>
 
-/*--------------------------------------------------------------------------
-   Preprocessor definitions and constants
-   ------------------------------------------------------------------------*/
-
-/*--------------------------------------------------------------------------
-   Type declarations
-   ------------------------------------------------------------------------*/
-
-/* cds Message Type.
-   This represnets a message that can be posted to another module through
-   the cds Message Queues.
-   \note This is mapped directly to the tSirMsgQ for backward
-   compatibility with the legacy MAC code */
-typedef struct cds_msg_s {
-	uint16_t type;
-	/*
-	 * This field can be used as sequence number/dialog token for matching
-	 * requests and responses.
-	 */
-	uint16_t reserved;
-	/**
-	 * Based on the type either a bodyptr pointer into
-	 * memory or bodyval as a 32 bit data is used.
-	 * bodyptr: is always a freeable pointer, one should always
-	 * make sure that bodyptr is always freeable.
-	 *
-	 * Messages should use either bodyptr or bodyval; not both !!!.
-	 */
-	void *bodyptr;
-
-	uint32_t bodyval;
-
-	/*
-	 * Some messages provide a callback function.  The function signature
-	 * must be agreed upon between the two entities exchanging the message
-	 */
-	void *callback;
-
-} cds_msg_t;
-
 #define HIGH_PRIORITY 1
 #define LOW_PRIORITY 0
 
-#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))
-
 /**---------------------------------------------------------------------------
 
    \brief cds_send_mb_message_to_mac() - post a message to a message queue

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

@@ -45,7 +45,6 @@
 #if defined(WLAN_OPEN_SOURCE) && defined(CONFIG_HAS_WAKELOCK)
 #include <linux/wakelock.h>
 #endif
-#include <cds_mq.h>
 #include <qdf_types.h>
 #include "qdf_lock.h"
 #include "qdf_mc_timer.h"
@@ -73,18 +72,6 @@
 typedef void (*cds_ol_rx_thread_cb)(void *context, void *rxpkt, uint16_t staid);
 #endif
 
-/*
-** QDF Message queue definition.
-*/
-typedef struct _cds_mq_type {
-	/* Lock use to synchronize access to this message queue */
-	spinlock_t mqLock;
-
-	/* List of vOS Messages waiting on this queue */
-	struct list_head mqList;
-
-} cds_mq_type, *p_cds_mq_type;
-
 #ifdef QCA_CONFIG_SMP
 /*
 ** CDS message wrapper for data rx from TXRX
@@ -186,20 +173,6 @@ struct cds_log_complete {
 	bool recovery_needed;
 };
 
-/*
-** CDS Sched Msg Wrapper
-** Wrapper messages so that they can be chained to their respective queue
-** in the scheduler.
-*/
-typedef struct _cds_msg_wrapper {
-	/* Message node */
-	struct list_head msgNode;
-
-	/* the Vos message it is associated to */
-	cds_msg_t *pVosMsg;
-
-} cds_msg_wrapper, *p_cds_msg_wrapper;
-
 typedef struct _cds_context_type {
 	/* Scheduler Context */
 	cds_sched_context qdf_sched;
@@ -477,14 +450,7 @@ QDF_STATUS cds_sched_open(void *p_cds_context,
    ---------------------------------------------------------------------------*/
 QDF_STATUS cds_sched_close(void *p_cds_context);
 
-/* Helper routines provided to other CDS API's */
-void cds_mq_put(p_cds_mq_type pMq, p_cds_msg_wrapper pMsgWrapper);
-void cds_mq_put_front(p_cds_mq_type mq, p_cds_msg_wrapper msg_wrapper);
-p_cds_msg_wrapper cds_mq_get(p_cds_mq_type pMq);
 p_cds_sched_context get_cds_sched_ctxt(void);
-QDF_STATUS cds_sched_init_mqs(p_cds_sched_context pSchedContext);
-void cds_sched_deinit_mqs(p_cds_sched_context pSchedContext);
-void cds_sched_flush_mc_mqs(p_cds_sched_context pSchedContext);
 
 void qdf_timer_module_init(void);
 void qdf_timer_module_deinit(void);

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

@@ -31,7 +31,6 @@
  * Connectivity driver services APIs
  */
 
-#include <cds_mq.h>
 #include "cds_sched.h"
 #include <cds_api.h>
 #include "sir_types.h"

+ 0 - 88
core/cds/src/cds_mq.c

@@ -34,7 +34,6 @@
  */
 
 /* Include Files */
-#include <cds_mq.h>
 #include "cds_sched.h"
 #include <cds_api.h>
 #include "sir_types.h"
@@ -47,93 +46,6 @@
 
 tSirRetStatus u_mac_post_ctrl_msg(void *pSirGlobal, void *pMb);
 
-/**
- * cds_mq_put() - add a message to the message queue
- * @pMq: Pointer to the message queue
- * @pMsgWrapper: Msg wrapper containing the message
- *
- * Return: none
- */
-inline void cds_mq_put(p_cds_mq_type pMq, p_cds_msg_wrapper pMsgWrapper)
-{
-	unsigned long flags;
-
-	if ((pMq == NULL) || (pMsgWrapper == NULL)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: NULL pointer passed", __func__);
-		return;
-	}
-
-	spin_lock_irqsave(&pMq->mqLock, flags);
-
-	list_add_tail(&pMsgWrapper->msgNode, &pMq->mqList);
-
-	spin_unlock_irqrestore(&pMq->mqLock, flags);
-
-} /* cds_mq_put() */
-
-/**
- * cds_mq_put_front() - adds a message to the head of message queue
- * @mq: message queue
- * @msg_wrapper: message wrapper
- *
- * This function is used to add a message to the head of message queue
- *
- * Return: None
- */
-void cds_mq_put_front(p_cds_mq_type mq, p_cds_msg_wrapper msg_wrapper)
-{
-	unsigned long flags;
-
-	if ((mq == NULL) || (msg_wrapper == NULL)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			"%s: NULL pointer passed", __func__);
-		return;
-	}
-
-	spin_lock_irqsave(&mq->mqLock, flags);
-	list_add(&msg_wrapper->msgNode, &mq->mqList);
-	spin_unlock_irqrestore(&mq->mqLock, flags);
-}
-
-/**
- * cds_mq_get() - get a message with its wrapper from a message queue
- * @pMq: Pointer to the message queue
- *
- * Return: pointer to the message wrapper
- */
-inline p_cds_msg_wrapper cds_mq_get(p_cds_mq_type pMq)
-{
-	p_cds_msg_wrapper pMsgWrapper = NULL;
-
-	struct list_head *listptr;
-	unsigned long flags;
-
-	if (pMq == NULL) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
-			  "%s: NULL pointer passed", __func__);
-		return NULL;
-	}
-
-	spin_lock_irqsave(&pMq->mqLock, flags);
-
-	if (list_empty(&pMq->mqList)) {
-		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_WARN,
-			  "%s: CDS Message Queue is empty", __func__);
-	} else {
-		listptr = pMq->mqList.next;
-		pMsgWrapper =
-			(p_cds_msg_wrapper) list_entry(listptr, cds_msg_wrapper,
-						       msgNode);
-		list_del(pMq->mqList.next);
-	}
-
-	spin_unlock_irqrestore(&pMq->mqLock, flags);
-
-	return pMsgWrapper;
-
-} /* cds_mq_get() */
-
 /**
  * cds_send_mb_message_to_mac() - post a message to a message queue
  * @pBuf: Pointer to buffer allocated by caller

+ 1 - 2
core/cds/src/cds_sched.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -32,7 +32,6 @@
  */
 
  /* Include Files */
-#include <cds_mq.h>
 #include <cds_api.h>
 #include <ani_global.h>
 #include <sir_types.h>

+ 1 - 19
core/dp/txrx/txrx.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -201,22 +201,4 @@ static inline int wlan_txrx_register_rssi_indcb(void *g_cdsctx,
 	return 0;
 }
 
-/* FIXME: The following stubs will be removed eventually */
-static inline int wlan_txrx_mc_process_msg(void *g_cdsctx, cds_msg_t *msg)
-{
-	return 0;
-}
-
-static inline int wlan_txrx_tx_process_msg(void *g_cdsctx, cds_msg_t *msg)
-{
-	return 0;
-}
-
-static inline void wlan_txrx_mc_free_msg(void *g_cdsctx, cds_msg_t *msg)
-{
-}
-
-static inline void wlan_txrx_tx_free_msg(void *g_cdsctx, cds_msg_t *msg)
-{
-}
 #endif

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

@@ -43,7 +43,6 @@
    -------------------------------------------------------------------------*/
 #include <qdf_types.h>
 #include <qdf_status.h>
-#include <cds_mq.h>
 #include <scheduler_api.h>
 
 /*---------------------------------------------------------------------------

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

@@ -29,7 +29,6 @@
 #define WMA_API_H
 
 #include "osdep.h"
-#include "cds_mq.h"
 #include "ani_global.h"
 #include "a_types.h"
 #include "osapi_linux.h"