mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
qcacmn: Initialize qid to qidx mapping to max value
By default qid to qidx mapping gets value zero as default initialization which creates issue to identify whether zero is valid or invalid index. Initializing to maximum value will eliminate above mentioned issue. Change-Id: I4c0e2ba45e67fe6e167bd965bdb7ab901c3828a8 CRs-Fixed: 2001133
This commit is contained in:
parent
ae7f3cfb74
commit
ba5d80ca81
1 changed files with 10 additions and 1 deletions
|
|
@ -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.
|
||||
*
|
||||
|
|
@ -90,6 +90,10 @@ static QDF_STATUS scheduler_all_queues_init(
|
|||
if (QDF_STATUS_SUCCESS != status)
|
||||
return status;
|
||||
}
|
||||
/* Initialize all qid to qidx mapping to invalid values */
|
||||
for (i = 0; i < QDF_MODULE_ID_MAX; i++)
|
||||
sched_ctx->queue_ctx.scheduler_msg_qid_to_qidx[i] =
|
||||
SCHEDULER_NUMBER_OF_MSG_QUEUE;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SCHEDULER, QDF_TRACE_LEVEL_ERROR, FL("exit"));
|
||||
|
||||
|
|
@ -120,6 +124,11 @@ static QDF_STATUS scheduler_all_queues_deinit(
|
|||
for (i = 0; i < SCHEDULER_NUMBER_OF_MSG_QUEUE; i++)
|
||||
scheduler_mq_deinit(&sched_ctx->queue_ctx.sch_msg_q[i]);
|
||||
|
||||
/* Initialize all qid to qidx mapping to invalid values */
|
||||
for (i = 0; i < QDF_MODULE_ID_MAX; i++)
|
||||
sched_ctx->queue_ctx.scheduler_msg_qid_to_qidx[i] =
|
||||
SCHEDULER_NUMBER_OF_MSG_QUEUE;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_SCHEDULER, QDF_TRACE_LEVEL_ERROR, FL("exit"));
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue