From 60e6dd9978d0dc0ecf53b56d6cc3d2efa95fde30 Mon Sep 17 00:00:00 2001 From: chenguo Date: Fri, 30 Nov 2018 20:20:47 +0800 Subject: [PATCH] qcacmn: Add missed error handling in dp_tx_send_msdu_single If there is anything wrong, the caller of dp_tx_send_msdu_single will only handle skb free, but not skb unmapping. So inside of dp_tx_send_msdu_single, it is needed to make sure unmap operation is performed after map operation. CRs-Fixed: 2358266 Change-Id: I6379305e84f70b5b978e9504b758c7a6ccf328ee --- dp/wifi3.0/dp_tx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index c437a0dc6343..1d9bb662eb57 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -1327,6 +1327,7 @@ static qdf_nbuf_t dp_tx_send_msdu_single(struct dp_vdev *vdev, qdf_nbuf_t nbuf, __func__, __LINE__, hal_srng); DP_STATS_INC(vdev, tx_i.dropped.ring_full, 1); dp_tx_desc_release(tx_desc, tx_q->desc_pool_id); + qdf_nbuf_unmap(vdev->osdev, nbuf, QDF_DMA_TO_DEVICE); goto fail_return; } @@ -1355,6 +1356,7 @@ static qdf_nbuf_t dp_tx_send_msdu_single(struct dp_vdev *vdev, qdf_nbuf_t nbuf, "%s Tx_hw_enqueue Fail tx_desc %pK queue %d", __func__, tx_desc, tx_q->ring_id); dp_tx_desc_release(tx_desc, tx_q->desc_pool_id); + qdf_nbuf_unmap(vdev->osdev, nbuf, QDF_DMA_TO_DEVICE); goto fail_return; }