Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa870efa authored by Jinwei Chen's avatar Jinwei Chen Committed by Gerrit - the friendly Code Review server
Browse files

qcacmn: handle IPA buffer smmu map/unmap correctly

Handle ipa buffer smmu map/unmap with below changes,
(1) Do IPA smmu unmap for RX buffer received from REO
exception/WBM RX release/REO DST/RXDMA DST ring.
(2) Align IPA smmu map length to qdf_nbuf_map_nytes_single()
with fixed length.

Change-Id: I1ed46b31ed31f5b7e4e2484d519bc85d35ce1e69
CRs-Fixed: 2728644
parent ba6aca82
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1931,6 +1931,7 @@ uint32_t dp_rx_process(struct dp_intr *int_ctx, void *hal_ring,
		 * move unmap after scattered msdu waiting break logic
		 * in case double skb unmap happened.
		 */
		dp_ipa_handle_rx_buf_smmu_mapping(soc, rx_desc->nbuf, false);
		qdf_nbuf_unmap_single(soc->osdev, rx_desc->nbuf,
				      QDF_DMA_FROM_DEVICE);
		rx_desc->unmapped = 1;
+1 −0
Original line number Diff line number Diff line
@@ -1704,6 +1704,7 @@ uint32_t dp_rx_frag_handle(struct dp_soc *soc, void *ring_desc,

	msdu = rx_desc->nbuf;

	dp_ipa_handle_rx_buf_smmu_mapping(soc, msdu, false);
	qdf_nbuf_unmap_single(soc->osdev, msdu,	QDF_DMA_FROM_DEVICE);
	rx_desc->unmapped = 1;

+7 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include <cds_ieee80211_common.h>
#endif
#include "dp_rx_defrag.h"
#include "dp_ipa.h"
#ifdef FEATURE_WDS
#include "dp_txrx_wds.h"
#endif
@@ -289,6 +290,7 @@ static uint32_t dp_rx_msdus_drop(struct dp_soc *soc, void *ring_desc,
			return rx_bufs_used;
		}

		dp_ipa_handle_rx_buf_smmu_mapping(soc, rx_desc->nbuf, false);
		qdf_nbuf_unmap_single(soc->osdev,
				      rx_desc->nbuf, QDF_DMA_FROM_DEVICE);

@@ -480,6 +482,7 @@ dp_rx_reo_err_entry_process(struct dp_soc *soc,
		pdev = soc->pdev_list[rx_desc->pool_id];

		nbuf = rx_desc->nbuf;
		dp_ipa_handle_rx_buf_smmu_mapping(soc, nbuf, false);
		qdf_nbuf_unmap_single(soc->osdev,
				      nbuf, QDF_DMA_FROM_DEVICE);

@@ -1629,6 +1632,7 @@ dp_rx_wbm_err_process(struct dp_intr *int_ctx, struct dp_soc *soc,
		}

		nbuf = rx_desc->nbuf;
		dp_ipa_handle_rx_buf_smmu_mapping(soc, nbuf, false);
		qdf_nbuf_unmap_single(soc->osdev, nbuf,	QDF_DMA_FROM_DEVICE);

		/*
@@ -1948,6 +1952,9 @@ dp_rx_err_mpdu_pop(struct dp_soc *soc, uint32_t mac_id,
						continue;
					}

					dp_ipa_handle_rx_buf_smmu_mapping(soc,
									  msdu,
									  false);
					qdf_nbuf_unmap_single(soc->osdev, msdu,
						QDF_DMA_FROM_DEVICE);