diff --git a/dp/wifi3.0/dp_tx_flow_control.c b/dp/wifi3.0/dp_tx_flow_control.c index 78338b5188..288ebc24c1 100644 --- a/dp/wifi3.0/dp_tx_flow_control.c +++ b/dp/wifi3.0/dp_tx_flow_control.c @@ -550,6 +550,7 @@ static QDF_STATUS dp_tx_page_pool_init(struct dp_soc *soc, qdf_spinlock_create(&tx_pp->pp_lock); qdf_atomic_init(&tx_pp->ref_cnt); tx_pp->page_pool_init = true; + soc->osdev->no_dma_map = true; return QDF_STATUS_SUCCESS; } diff --git a/qdf/linux/src/i_qdf_nbuf_m.h b/qdf/linux/src/i_qdf_nbuf_m.h index 3b554e72b5..8cc1e10374 100644 --- a/qdf/linux/src/i_qdf_nbuf_m.h +++ b/qdf/linux/src/i_qdf_nbuf_m.h @@ -740,7 +740,7 @@ static inline QDF_STATUS __qdf_nbuf_map_nbytes_single( qdf_dma_addr_t paddr; QDF_STATUS ret; - if (__qdf_is_pp_nbuf(buf)) { + if (osdev->no_dma_map && __qdf_is_pp_nbuf(buf)) { dma_sync_single_for_device(osdev->dev, QDF_NBUF_CB_PADDR(buf), nbytes, __qdf_dma_dir_to_os(dir)); return QDF_STATUS_SUCCESS; diff --git a/qdf/linux/src/i_qdf_types.h b/qdf/linux/src/i_qdf_types.h index 59f20956a9..8c5d33d467 100644 --- a/qdf/linux/src/i_qdf_types.h +++ b/qdf/linux/src/i_qdf_types.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -286,6 +286,7 @@ enum qdf_bus_type { * @smmu_s1_enabled: SMMU S1 enabled or not * @domain: domain type * @iommu_mapping: DMA iommu mapping pointer + * @no_dma_map: Flag to check whether DMA mapping for TX buffers is needed */ struct __qdf_device { void *drv; @@ -307,6 +308,7 @@ struct __qdf_device { struct dma_iommu_mapping *iommu_mapping; #endif #endif + bool no_dma_map; }; typedef struct __qdf_device *__qdf_device_t; diff --git a/qdf/linux/src/qdf_nbuf.c b/qdf/linux/src/qdf_nbuf.c index 5c36791a85..766eb386ac 100644 --- a/qdf/linux/src/qdf_nbuf.c +++ b/qdf/linux/src/qdf_nbuf.c @@ -1493,7 +1493,7 @@ __qdf_nbuf_map_single(qdf_device_t osdev, qdf_nbuf_t buf, qdf_dma_dir_t dir) qdf_dma_addr_t paddr; QDF_STATUS ret; - if (__qdf_is_pp_nbuf(buf)) { + if (osdev->no_dma_map && __qdf_is_pp_nbuf(buf)) { dma_sync_single_for_device(osdev->dev, QDF_NBUF_CB_PADDR(buf), skb_end_pointer(buf) - buf->data, __qdf_dma_dir_to_os(dir));