diff options
| author | Himanshu Agarwal <himanaga@qti.qualcomm.com> | 2016-05-11 14:01:38 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-05-17 15:01:21 +0530 |
| commit | 030d352d49b1b9da0adfe45b5b84a537ec13651e (patch) | |
| tree | 0a28c73d81abff310191c17d9cfe5ea12853809b | |
| parent | f285402597dc45c0aa2e57f82c729f5494c00119 (diff) | |
qcacld-2.0: Add retry logic if HTCIssuePackets fails
Fix WMI command path Tx failure case as current WMI command path
frees the packet with dummy completion when hif fails to send the
packet down.
Fix it by putting back wmi cmd to endpoint Tx queue for retry.
Change-Id: Ic7753b1961c005dfee5ac2c43d4df6c2d598a4f5
CRs-Fixed: 1013264
| -rw-r--r-- | CORE/SERVICES/HTC/htc_send.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/CORE/SERVICES/HTC/htc_send.c b/CORE/SERVICES/HTC/htc_send.c index b644340a0643..bcff00c5d2d4 100644 --- a/CORE/SERVICES/HTC/htc_send.c +++ b/CORE/SERVICES/HTC/htc_send.c @@ -675,19 +675,10 @@ static A_STATUS HTCIssuePackets(HTC_TARGET *target, } } - if (adf_os_unlikely(A_FAILED(status))) { - while (!HTC_QUEUE_EMPTY(pPktQueue)) { - if (status != A_NO_RESOURCE) { - AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HTCIssuePackets, failed pkt:0x%p status:%d \n",pPacket,status)); - } - pPacket = HTC_PACKET_DEQUEUE(pPktQueue); - if (pPacket) { - pPacket->Status = status; - hif_pm_runtime_put(target->hif_dev); - SendPacketCompletion(target,pPacket); - } - } - } + if (adf_os_unlikely(A_FAILED(status))) + AR_DEBUG_PRINTF(ATH_DEBUG_ERR, + ("htc_issue_packets, failed pkt:0x%p status:%d", + pPacket, status)); AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("-HTCIssuePackets \n")); @@ -1147,7 +1138,16 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, UNLOCK_HTC_TX(target); /* send what we can */ - HTCIssuePackets(target,pEndpoint,&sendQueue); + result = HTCIssuePackets(target,pEndpoint,&sendQueue); + if (result) { + AR_DEBUG_PRINTF(ATH_DEBUG_ERR, + ("htc_issue_packets, failed status:%d put it back to head of callers SendQueue", + result)); + HTC_PACKET_QUEUE_TRANSFER_TO_HEAD(&pEndpoint->TxQueue, + &sendQueue); + LOCK_HTC_TX(target); + break; + } if (!IS_TX_CREDIT_FLOW_ENABLED(pEndpoint)) { tx_resources = HIFGetFreeQueueNumber(target->hif_dev,pEndpoint->UL_PipeID); |
