qcacmn: Add support for src, dest in scheduler
Currently the scheduler is unaware of the source module which posts the message to another layer. To trace the src, dest, and the message under ML logging, modify current infra, to include the src, dest in the qip argument of the API scheduler_post_msg_by_priority Change-Id: Ia234f60cc33fcc37ab741c462052a6e50993e3bd CRs-Fixed: 2300537
This commit is contained in:

committed by
nshrivas

vanhempi
3eab5b1b92
commit
6e4b9c54b6
@@ -216,7 +216,7 @@ QDF_STATUS scheduler_deinit(void)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS scheduler_post_msg_by_priority(QDF_MODULE_ID qid,
|
||||
QDF_STATUS scheduler_post_msg_by_priority(uint32_t qid,
|
||||
struct scheduler_msg *msg,
|
||||
bool is_high_priority)
|
||||
{
|
||||
@@ -224,6 +224,8 @@ QDF_STATUS scheduler_post_msg_by_priority(QDF_MODULE_ID qid,
|
||||
struct scheduler_mq_type *target_mq;
|
||||
struct scheduler_msg *queue_msg;
|
||||
struct scheduler_ctx *sched_ctx;
|
||||
uint16_t src_id;
|
||||
uint16_t dest_id;
|
||||
|
||||
QDF_BUG(msg);
|
||||
if (!msg)
|
||||
@@ -244,6 +246,13 @@ QDF_STATUS scheduler_post_msg_by_priority(QDF_MODULE_ID qid,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
dest_id = scheduler_get_dest_id(qid);
|
||||
src_id = scheduler_get_src_id(qid);
|
||||
|
||||
if (dest_id >= QDF_MODULE_ID_MAX || src_id >= QDF_MODULE_ID_MAX) {
|
||||
sched_err("Src_id/Dest_id invalid, cannot post message");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
/* Target_If is a special message queue in phase 3 convergence beacause
|
||||
* its used by both legacy WMA and as well as new UMAC components which
|
||||
* directly populate callback handlers in message body.
|
||||
@@ -255,20 +264,20 @@ QDF_STATUS scheduler_post_msg_by_priority(QDF_MODULE_ID qid,
|
||||
* legacy WMA message queue id to target_if queue such that its always
|
||||
* handled in right order.
|
||||
*/
|
||||
if (QDF_MODULE_ID_WMA == qid) {
|
||||
if (QDF_MODULE_ID_WMA == dest_id) {
|
||||
msg->callback = NULL;
|
||||
/* change legacy WMA message id to new target_if mq id */
|
||||
qid = QDF_MODULE_ID_TARGET_IF;
|
||||
dest_id = QDF_MODULE_ID_TARGET_IF;
|
||||
}
|
||||
|
||||
qidx = sched_ctx->queue_ctx.scheduler_msg_qid_to_qidx[qid];
|
||||
qidx = sched_ctx->queue_ctx.scheduler_msg_qid_to_qidx[dest_id];
|
||||
if (qidx >= SCHEDULER_NUMBER_OF_MSG_QUEUE) {
|
||||
sched_err("Scheduler is deinitialized ignore msg");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!sched_ctx->queue_ctx.scheduler_msg_process_fn[qidx]) {
|
||||
QDF_DEBUG_PANIC("callback not registered for qid[%d]", qid);
|
||||
QDF_DEBUG_PANIC("callback not registered for qid[%d]", dest_id);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
|
Viittaa uudesa ongelmassa
Block a user