wlan-ap-Telecominfraproject/feeds/ipq95xx/mac80211/patches/qca/664-l-ath12k-skip-cache-synchronization-in-tx-completion-path.patch
John Crispin b9b03a6e38 ipq95xx: add Qualcomm wifi-7 support
Signed-off-by: John Crispin <john@phrozen.org>
2023-04-10 14:25:48 +02:00

61 lines
2.2 KiB
Diff

From 08d43051d1e441def9e2535fcad96fd094f41932 Mon Sep 17 00:00:00 2001
From: Balamurugan Mahalingam <quic_bmahalin@quicinc.com>
Date: Mon, 5 Sep 2022 20:26:03 -0700
Subject: [PATCH] ath12k: skip cache synchronization in the tx completion path
Skip buffer cache synchronization in the tx completion path
as the buffer is not modified.
Signed-off-by: Balamurugan Mahalingam <quic_bmahalin@quicinc.com>
---
drivers/net/wireless/ath/ath12k/dp_tx.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c
index fd908f9..3f7d433 100644
--- a/drivers/net/wireless/ath/ath12k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_tx.c
@@ -10,6 +10,7 @@
#include "debugfs_sta.h"
#include "hw.h"
#include "peer.h"
+#include <linux/dma-mapping.h>
static enum hal_tcl_encap_type
ath12k_dp_tx_get_encap_type(struct ath12k_vif *arvif, struct sk_buff *skb)
@@ -347,10 +348,12 @@ static void ath12k_dp_tx_free_txbuf(struct ath12k_base *ab,
skb_cb = ATH12K_SKB_CB(msdu);
- dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE);
+ dma_unmap_single_attrs(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE,
+ DMA_ATTR_SKIP_CPU_SYNC);
if (unlikely(skb_cb->paddr_ext_desc))
- dma_unmap_single(ab->dev, skb_cb->paddr_ext_desc,
- sizeof(struct hal_tx_msdu_ext_desc), DMA_TO_DEVICE);
+ dma_unmap_single_attrs(ab->dev, skb_cb->paddr_ext_desc,
+ sizeof(struct hal_tx_msdu_ext_desc),
+ DMA_TO_DEVICE, DMA_ATTR_SKIP_CPU_SYNC);
dev_kfree_skb_any(msdu);
@@ -642,10 +645,12 @@ static void ath12k_dp_tx_complete_msdu(struct ath12k *ar,
skb_cb = ATH12K_SKB_CB(msdu);
- dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE);
+ dma_unmap_single_attrs(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE,
+ DMA_ATTR_SKIP_CPU_SYNC);
if (unlikely(skb_cb->paddr_ext_desc))
- dma_unmap_single(ab->dev, skb_cb->paddr_ext_desc,
- sizeof(struct hal_tx_msdu_ext_desc), DMA_TO_DEVICE);
+ dma_unmap_single_attrs(ab->dev, skb_cb->paddr_ext_desc,
+ sizeof(struct hal_tx_msdu_ext_desc),
+ DMA_TO_DEVICE, DMA_ATTR_SKIP_CPU_SYNC);
flags = skb_cb->flags;
--
2.17.1