qcacmn: Fix WMI command stuck issue
There is race condition in HTCTrySend() where it is clearing TxProcessCount after releasing target lock which is resulting it in WMI command stuck as other thread check TxProcessCount and returns after putting command in queue. Fix above race condition by unlocking target lock after clearing TxProcessCount. Change-Id: I80d69bf583d3eb3c9800c69d7917921aa959f866 CRs-Fixed: 991142
This commit is contained in:

committato da
Gerrit - the friendly Code Review server

parent
3537500cc0
commit
e37820ebd2
@@ -1042,8 +1042,7 @@ static HTC_SEND_QUEUE_RESULT htc_try_send(HTC_TARGET *target,
|
||||
}
|
||||
|
||||
/* increment tx processing count on entry */
|
||||
qdf_atomic_inc(&pEndpoint->TxProcessCount);
|
||||
if (qdf_atomic_read(&pEndpoint->TxProcessCount) > 1) {
|
||||
if (qdf_atomic_inc_return(&pEndpoint->TxProcessCount) > 1) {
|
||||
/* another thread or task is draining the TX queues on this endpoint
|
||||
* that thread will reset the tx processing count when the queue is drained */
|
||||
qdf_atomic_dec(&pEndpoint->TxProcessCount);
|
||||
@@ -1122,10 +1121,11 @@ static HTC_SEND_QUEUE_RESULT htc_try_send(HTC_TARGET *target,
|
||||
|
||||
}
|
||||
|
||||
UNLOCK_HTC_TX(target);
|
||||
/* done with this endpoint, we can clear the count */
|
||||
qdf_atomic_init(&pEndpoint->TxProcessCount);
|
||||
|
||||
UNLOCK_HTC_TX(target);
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("-htc_try_send: \n"));
|
||||
|
||||
return HTC_SEND_QUEUE_OK;
|
||||
|
Fai riferimento in un nuovo problema
Block a user