qcacmn: dp: hl: Read tx resources after single thread check
Bus TX resources are being read before the single thread check. If the thread is pre-empted, the tx_resource variable may not match with actual TX resources. Change-Id: I7e8af58a5702172a4cfbea9175f333aad4a57238 CRs-Fixed: 2459253
This commit is contained in:
@@ -1139,14 +1139,6 @@ static enum HTC_SEND_QUEUE_RESULT htc_try_send(HTC_TARGET *target,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IS_TX_CREDIT_FLOW_ENABLED(pEndpoint)) {
|
|
||||||
tx_resources =
|
|
||||||
hif_get_free_queue_number(target->hif_dev,
|
|
||||||
pEndpoint->UL_PipeID);
|
|
||||||
} else {
|
|
||||||
tx_resources = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
LOCK_HTC_TX(target);
|
LOCK_HTC_TX(target);
|
||||||
|
|
||||||
if (!HTC_QUEUE_EMPTY(&sendQueue)) {
|
if (!HTC_QUEUE_EMPTY(&sendQueue)) {
|
||||||
@@ -1185,6 +1177,14 @@ static enum HTC_SEND_QUEUE_RESULT htc_try_send(HTC_TARGET *target,
|
|||||||
/* now drain the endpoint TX queue for transmission as long as we have
|
/* now drain the endpoint TX queue for transmission as long as we have
|
||||||
* enough transmit resources
|
* enough transmit resources
|
||||||
*/
|
*/
|
||||||
|
if (!IS_TX_CREDIT_FLOW_ENABLED(pEndpoint)) {
|
||||||
|
tx_resources =
|
||||||
|
hif_get_free_queue_number(target->hif_dev,
|
||||||
|
pEndpoint->UL_PipeID);
|
||||||
|
} else {
|
||||||
|
tx_resources = 0;
|
||||||
|
}
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
if (HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue) == 0)
|
if (HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue) == 0)
|
||||||
|
Reference in New Issue
Block a user