mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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:
parent
cbc53dd023
commit
87a8e44583
5 changed files with 84 additions and 16 deletions
|
|
@ -283,4 +283,14 @@ QDF_STATUS scheduler_deregister_wma_legacy_handler(void);
|
|||
*/
|
||||
void scheduler_mc_timer_callback(unsigned long data);
|
||||
|
||||
/**
|
||||
* scheduler_get_queue_size() - Get the current size of the scheduler queue
|
||||
* @qid: Queue ID for which the size is requested
|
||||
* @size: Pointer to size where the size would be returned to the caller
|
||||
*
|
||||
* This API finds the size of the scheduler queue for the given Queue ID
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS scheduler_get_queue_size(QDF_MODULE_ID qid, uint32_t *size);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue