qcacmn: Restore the correct credit for EP

qcacld-2.0 to qcacmn propagation

Restore the correct credit for the flow control endpoint, add back
all the credits consumed by the queue, if fail to send packet by
HIFSend_head.

Change-Id: I480f7aba5ce8c8d1e57caaae5b2bfcd77209091c
CRs-Fixed: 2360669
This commit is contained in:
Frank Liu
2018-12-06 16:03:26 +08:00
committed by nshrivas
부모 fbf6d922d6
커밋 d2cc13ede9

파일 보기

@@ -646,12 +646,15 @@ static QDF_STATUS htc_issue_packets(HTC_TARGET *target,
target->ce_send_cnt--;
pEndpoint->ul_outstanding_cnt--;
HTC_PACKET_REMOVE(&pEndpoint->TxLookupQueue, pPacket);
/* reclaim credits */
pEndpoint->TxCredits +=
pPacket->PktInfo.AsTx.CreditsUsed;
htc_packet_set_magic_cookie(pPacket, 0);
/* put it back into the callers queue */
HTC_PACKET_ENQUEUE_TO_HEAD(pPktQueue, pPacket);
/* reclaim credits */
HTC_PACKET_QUEUE_ITERATE_ALLOW_REMOVE(pPktQueue,
pPacket) {
pEndpoint->TxCredits +=
pPacket->PktInfo.AsTx.CreditsUsed;
} HTC_PACKET_QUEUE_ITERATE_END;
if (!pEndpoint->async_update) {
UNLOCK_HTC_TX(target);
}