summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrhan K AKYILDIZ <oka@codeaurora.org>2017-12-02 22:43:26 -0800
committersnandini <snandini@codeaurora.org>2017-12-05 16:37:08 -0800
commit4acc0b6d7c64d5ceb6cc6b7ceac081dc1b45cdf2 (patch)
treeab8988be7bfca06f95dce2656c2bc8baafeba8f1
parentb733fb97fcc60f1a8b12017256f208822e9ba249 (diff)
qcacmn: Fix double dmap problem in htc
For control messages, a path in HTC was performing double dmamaps and this was, in time, causing dmamap failures on SMMU. Change-Id: I19f7e13a0a19404fe1161127b10f52225b6a4248 CRs-Fixed: 2151773
-rw-r--r--htc/htc_send.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/htc/htc_send.c b/htc/htc_send.c
index 1dca2f517dc7..7fd1bfb248ce 100644
--- a/htc/htc_send.c
+++ b/htc/htc_send.c
@@ -1464,15 +1464,20 @@ static inline QDF_STATUS __htc_send_pkt(HTC_HANDLE HTCHandle,
* Now that the HTC frame header has been added, the netbuf can
* be mapped. This only applies to non-data frames, since data
* frames were already mapped as they entered into the driver.
+ * For flow control enabled endpoints mapping is done in
+ * htc_issue_packets and for non flow control enabled endpoints
+ * its done here.
*/
- status = qdf_nbuf_map(target->osdev,
- GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket),
- QDF_DMA_TO_DEVICE);
- if (status != QDF_STATUS_SUCCESS) {
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
- ("%s: nbuf map failed, endpoint %pK, seq_no. %d\n",
- __func__, pEndpoint, pEndpoint->SeqNo));
- return status;
+ if (!IS_TX_CREDIT_FLOW_ENABLED(pEndpoint)) {
+ status = qdf_nbuf_map(target->osdev,
+ GET_HTC_PACKET_NET_BUF_CONTEXT(pPacket),
+ QDF_DMA_TO_DEVICE);
+ if (status != QDF_STATUS_SUCCESS) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
+ ("%s: nbuf map failed, endpoint %pK, seq_no. %d\n",
+ __func__, pEndpoint, pEndpoint->SeqNo));
+ return status;
+ }
}
pPacket->PktInfo.AsTx.Flags |= HTC_TX_PACKET_FLAG_FIXUP_NETBUF;