diff options
| author | bings <bings@codeaurora.org> | 2019-03-21 18:14:18 +0800 |
|---|---|---|
| committer | bings <bings@codeaurora.org> | 2019-03-22 11:18:54 +0800 |
| commit | 8d439d41709daaddc74c33aa81647c146b7c96f2 (patch) | |
| tree | ec105a4f926c08d1370c32c723d539fa91a777bd | |
| parent | 113510449f09f9f1795ceb44838006e0afc499c6 (diff) | |
qcacld-2.0: Do unmap dma only for mapped and non ipa dma
Do unmap only for mapped and non ipa in ol_txrx_vdev_flush, otherwise
wlan driver may unmap non mapped buffer.
Change-Id: If3d6307068c63233aadbd05b6c3804d9e5401437
CRs-Fixed: 2418855
| -rw-r--r-- | CORE/CLD_TXRX/TXRX/ol_tx_desc.c | 5 | ||||
| -rw-r--r-- | CORE/CLD_TXRX/TXRX/ol_tx_queue.c | 8 |
2 files changed, 8 insertions, 5 deletions
diff --git a/CORE/CLD_TXRX/TXRX/ol_tx_desc.c b/CORE/CLD_TXRX/TXRX/ol_tx_desc.c index 1689ac3d5c12..aeb63449a80e 100644 --- a/CORE/CLD_TXRX/TXRX/ol_tx_desc.c +++ b/CORE/CLD_TXRX/TXRX/ol_tx_desc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, 2016-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2011, 2014, 2016-2017, 2019 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -303,7 +303,8 @@ void ol_tx_desc_frame_list_free( #ifdef QCA_SUPPORT_SW_TXRX_ENCAP OL_TX_RESTORE_HDR(tx_desc, msdu); /* restore original hdr offset */ #endif - adf_nbuf_unmap(pdev->osdev, msdu, ADF_OS_DMA_TO_DEVICE); + if (!adf_nbuf_is_ipa_nbuf(msdu)) + adf_nbuf_unmap(pdev->osdev, msdu, ADF_OS_DMA_TO_DEVICE); /* free the tx desc */ ol_tx_desc_free(pdev, tx_desc); /* link the netbuf into a list to free as a batch */ diff --git a/CORE/CLD_TXRX/TXRX/ol_tx_queue.c b/CORE/CLD_TXRX/TXRX/ol_tx_queue.c index 2158fc80f2e9..ece6da7ad106 100644 --- a/CORE/CLD_TXRX/TXRX/ol_tx_queue.c +++ b/CORE/CLD_TXRX/TXRX/ol_tx_queue.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1261,8 +1261,10 @@ ol_txrx_vdev_flush(ol_txrx_vdev_handle vdev) while (vdev->ll_pause.txq.head) { adf_nbuf_t next = adf_nbuf_next(vdev->ll_pause.txq.head); adf_nbuf_set_next(vdev->ll_pause.txq.head, NULL); - adf_nbuf_unmap(vdev->pdev->osdev, vdev->ll_pause.txq.head, - ADF_OS_DMA_TO_DEVICE); + if (NBUF_MAPPED_PADDR_LO(vdev->ll_pause.txq.head) && + !adf_nbuf_is_ipa_nbuf(vdev->ll_pause.txq.head)) + adf_nbuf_unmap(vdev->pdev->osdev, vdev->ll_pause.txq.head, + ADF_OS_DMA_TO_DEVICE); adf_nbuf_tx_free(vdev->ll_pause.txq.head, ADF_NBUF_PKT_ERROR); vdev->ll_pause.txq.head = next; } |
