qcacmn: change CDS_MQ_ID to QDF_MODULE_ID

As a common driver design, CDS_MQ_ID has to be replaced with
QDF_MODULE_ID

CRs-Fixed: 1104147
Change-Id: I11221a32a3ccde0d69ac87ce29bde67416a3587c
This commit is contained in:
Krunal Soni 2016-12-21 14:39:40 -08:00 • committed by Gerrit - the friendly Code Review server
commit bc5cfa71b6
2 changed files with 6 additions and 54 deletions

View file

@ -52,26 +52,6 @@
*/
#define SYS_MSG_COOKIE 0xFACE
/**
* enum CDS_MQ_ID - message queues enum
* @CDS_MQ_ID_SME: Legacy SME message queue ID
* @CDS_MQ_ID_PE: Legacy PE message queue ID
* @CDS_MQ_ID_WMA: Legacy WMA message queue ID
* @CDS_MQ_ID_SYS: Legacy SYS message queue ID
* @CDS_MQ_ID_OS_IF: OS IF(north interface) message queue ID
* @CDS_MQ_ID_TARGET_IF: Target IF(south interface) message queue ID
*/
typedef enum {
CDS_MQ_ID_SME = QDF_MODULE_ID_SME,
CDS_MQ_ID_PE = QDF_MODULE_ID_PE,
CDS_MQ_ID_WMA = QDF_MODULE_ID_WMA,
CDS_MQ_ID_SYS = QDF_MODULE_ID_SYS,
CDS_MQ_ID_OS_IF = QDF_MODULE_ID_OS_IF,
CDS_MQ_ID_TARGET_IF = QDF_MODULE_ID_TARGET_IF,
} CDS_MQ_ID;
typedef enum {
SYS_MSG_ID_MC_START,
SYS_MSG_ID_MC_THR_PROBE,
@ -148,23 +128,9 @@ QDF_STATUS scheduler_deregister_module(QDF_MODULE_ID qid);
* @msg: mesage pointer
* @is_high_priority: set to true for high priority message else false
*
* IMPORTANT NOTE:
* 1) Legacy MCL modules continue posting messages to following legacy
* message queue IDs:
* a) CDS_MQ_ID_SME : SME module message queue
* b) CDS_MQ_ID_PE : PE module message queue
* c) CDS_MQ_ID_WMA : WMA module message queue
* d) CDS_MQ_ID_SYS : SYS module message queue
* 2) All new components like SCM, P2P, TDLS, etc. needs to post messages
* to following new message queue ids:
* a) CDS_MQ_ID_OS_IF : North interface message queue for request comign
* from operating systems
* b) CDS_MQ_ID_TARGET_IF : South interface message queue for messages
* and events coming from target(firmware)
*
* Return: QDF status
*/
QDF_STATUS scheduler_post_msg_by_priority(CDS_MQ_ID qid,
QDF_STATUS scheduler_post_msg_by_priority(QDF_MODULE_ID qid,
struct scheduler_msg *msg, bool is_high_priority);
/**
@ -172,23 +138,9 @@ QDF_STATUS scheduler_post_msg_by_priority(CDS_MQ_ID qid,
* @qid: queue id to to post message
* @msg: mesage pointer
*
* IMPORTANT NOTE:
* 1) Legacy MCL modules continue posting messages to following legacy
* message queue IDs:
* a) CDS_MQ_ID_SME : SME module message queue
* b) CDS_MQ_ID_PE : PE module message queue
* c) CDS_MQ_ID_WMA : WMA module message queue
* d) CDS_MQ_ID_SYS : SYS module message queue
* 2) All new components like SCM, P2P, TDLS, etc. needs to post messages
* to following new message queue ids:
* a) CDS_MQ_ID_OS_IF : North interface message queue for request comign
* from operating systems
* b) CDS_MQ_ID_TARGET_IF : South interface message queue for messages
* and events coming from target(firmware)
*
* Return: QDF status
*/
static inline QDF_STATUS scheduler_post_msg(CDS_MQ_ID qid,
static inline QDF_STATUS scheduler_post_msg(QDF_MODULE_ID qid,
struct scheduler_msg *msg)
{
return scheduler_post_msg_by_priority(qid, msg, false);

View file

@ -172,7 +172,7 @@ QDF_STATUS scheduler_deinit(void)
}
QDF_STATUS scheduler_post_msg_by_priority(CDS_MQ_ID qid,
QDF_STATUS scheduler_post_msg_by_priority(QDF_MODULE_ID qid,
struct scheduler_msg *pMsg, bool is_high_priority)
{
uint8_t qidx;
@ -199,10 +199,10 @@ QDF_STATUS scheduler_post_msg_by_priority(CDS_MQ_ID qid,
* legacy WMA message queue id to target_if queue such that its always
* handled in right order.
*/
if (CDS_MQ_ID_WMA == qid) {
if (QDF_MODULE_ID_WMA == qid) {
pMsg->callback = NULL;
/* change legacy WMA message id to new target_if mq id */
qid = CDS_MQ_ID_TARGET_IF;
qid = QDF_MODULE_ID_TARGET_IF;
}
qidx = sched_ctx->queue_ctx.scheduler_msg_qid_to_qidx[qid];
@ -550,7 +550,7 @@ void scheduler_mc_timer_callback(unsigned long data)
msg.bodyptr = user_data;
msg.bodyval = 0;
if (scheduler_post_msg(CDS_MQ_ID_SYS, &msg) == QDF_STATUS_SUCCESS)
if (scheduler_post_msg(QDF_MODULE_ID_SYS, &msg) == QDF_STATUS_SUCCESS)
return;
QDF_TRACE(QDF_MODULE_ID_SCHEDULER, QDF_TRACE_LEVEL_ERROR,
"%s: Could not enqueue timer to timer queue", __func__);