qcacmn: Drop beacon/probe frames posted on Scan Queue if queue is full
Drop beacon/probe frames before posting on Scan queue if the queue already has too many beacon/probes to process. Also add scheduler API to get the queue size given the module ID. Change-Id: I9153c7e77e74377863774b68e8163839e992358d CRs-Fixed: 2298584
This commit is contained in:

committed by
nshrivas

parent
cbc53dd023
commit
87a8e44583
@@ -619,3 +619,30 @@ void scheduler_mc_timer_callback(unsigned long data)
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
sched_err("Could not enqueue timer to timer queue");
|
||||
}
|
||||
|
||||
QDF_STATUS scheduler_get_queue_size(QDF_MODULE_ID qid, uint32_t *size)
|
||||
{
|
||||
uint8_t qidx;
|
||||
struct scheduler_mq_type *target_mq;
|
||||
struct scheduler_ctx *sched_ctx;
|
||||
|
||||
sched_ctx = scheduler_get_context();
|
||||
if (!sched_ctx)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
/* WMA also uses the target_if queue, so replace the QID */
|
||||
if (QDF_MODULE_ID_WMA == qid)
|
||||
qid = QDF_MODULE_ID_TARGET_IF;
|
||||
|
||||
qidx = sched_ctx->queue_ctx.scheduler_msg_qid_to_qidx[qid];
|
||||
if (qidx >= SCHEDULER_NUMBER_OF_MSG_QUEUE) {
|
||||
sched_err("Scheduler is deinitialized");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
target_mq = &(sched_ctx->queue_ctx.sch_msg_q[qidx]);
|
||||
|
||||
*size = qdf_list_size(&target_mq->mq_list);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user