qcacmn: Check if the scheduler thread is already flushed
During the module initialization the scheduler thread and the init thread run in parallel if there is a failure in the error path, the scheduler thread is not aware and still sending the messages to firmware resulting in system instability. So, Disable the scheduler as soon as there is an error in the init path and the same scheduler thread in the normal existing error path. If the scheduler_disable is called multiple times the infinite wait for result will get the init thread struck. Change-Id: I39782bc88d49dac2e2138c235c4666ea4f4f2faf CRs-Fixed: 2754023
This commit is contained in:
parent
279435cff4
commit
45a38684b0
@ -33,6 +33,11 @@ QDF_STATUS scheduler_disable(void)
|
||||
if (!sched_ctx)
|
||||
return QDF_STATUS_E_INVAL;
|
||||
|
||||
if (!sched_ctx->sch_thread) {
|
||||
sched_debug("Scheduler already disabled");
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* send shutdown signal to scheduler thread */
|
||||
qdf_atomic_set_bit(MC_SHUTDOWN_EVENT_MASK, &sched_ctx->sch_event_flag);
|
||||
qdf_atomic_set_bit(MC_POST_EVENT_MASK, &sched_ctx->sch_event_flag);
|
||||
|
Loading…
Reference in New Issue
Block a user