diff options
| author | Tiger Yu <tfyu@codeaurora.org> | 2018-02-06 14:45:57 +0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-02-08 23:52:42 -0800 |
| commit | 6207cf286a82de390df338e75b64986f171d85a4 (patch) | |
| tree | 76768c2a37a43f7825a125c266ceea7fefb25c83 | |
| parent | 645c05a5b755a774d8ece11e9574c51f6a800e39 (diff) | |
qcacld-3.0: only unmap the mapped nbuf in the ol_txrx_vdev_flush
The TX buffers in the vdev->ll_pause pending queue, which haven't mapped
the physical address.
Adding nbuf physical address checking to avoid the mis-matching unmap
especially when the MEMORY_DEBUG is enabled.
Change-Id: I6b0fcd1c7d07ca358d07b9931dea321ee8c6169a
CRs-Fixed: 2183678
| -rw-r--r-- | core/dp/txrx/ol_tx_queue.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/core/dp/txrx/ol_tx_queue.c b/core/dp/txrx/ol_tx_queue.c index afed800847b0..c2193b4c0e06 100644 --- a/core/dp/txrx/ol_tx_queue.c +++ b/core/dp/txrx/ol_tx_queue.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -1776,9 +1776,11 @@ void ol_txrx_vdev_flush(ol_txrx_vdev_handle vdev) qdf_nbuf_t next = qdf_nbuf_next(vdev->ll_pause.txq.head); qdf_nbuf_set_next(vdev->ll_pause.txq.head, NULL); - qdf_nbuf_unmap(vdev->pdev->osdev, - vdev->ll_pause.txq.head, - QDF_DMA_TO_DEVICE); + if (QDF_NBUF_CB_PADDR(vdev->ll_pause.txq.head)) { + qdf_nbuf_unmap(vdev->pdev->osdev, + vdev->ll_pause.txq.head, + QDF_DMA_TO_DEVICE); + } qdf_nbuf_tx_free(vdev->ll_pause.txq.head, QDF_NBUF_PKT_ERROR); vdev->ll_pause.txq.head = next; |
