From: Giuseppe Piscitelli <ooonea@gmail.com>
To: ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, jjohnson@kernel.org
Subject: [PATCH ath-next 2/2] wifi: ath11k: dump TX data before DMA mapping
Date: Sun, 29 Nov 2026 23:43:27 +0100 [thread overview]
Message-ID: <20261129224327.744212-2-ooonea@gmail.com> (raw)
In-Reply-To: <20261129224327.744212-1-ooonea@gmail.com>
The device can complete the descriptor once the ring head is
published. Completion can release the skb before the late debug dump
reads skb->data and skb->len. Dump the frame before mapping it for DMA,
while the host still owns the buffer.
OpenAI Codex helped trace skb ownership and verify the AArch64 build.
Fixes: aa2092a9bab3 ("ath11k: add raw mode and software crypto support")
Signed-off-by: Giuseppe Piscitelli <ooonea@gmail.com>
---
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -209,6 +209,9 @@
goto fail_remove_idr;
}
+ ath11k_dbg_dump(ab, ATH11K_DBG_DP_TX, NULL, "dp tx msdu: ",
+ skb->data, skb->len);
+
ti.paddr = dma_map_single(ab->dev, skb->data, skb->len, DMA_TO_DEVICE);
if (unlikely(dma_mapping_error(ab->dev, ti.paddr))) {
atomic_inc(&ab->soc_stats.tx_err.misc_fail);
@@ -262,9 +265,6 @@
ath11k_dp_shadow_start_timer(ab, tcl_ring, &dp->tx_ring_timer[ti.ring_id]);
spin_unlock_bh(&tcl_ring->lock);
-
- ath11k_dbg_dump(ab, ATH11K_DBG_DP_TX, NULL, "dp tx msdu: ",
- skb->data, skb->len);
return 0;
prev parent reply other threads:[~2026-11-29 22:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 22:43 [PATCH ath-next 1/2] wifi: ath11k: account TX before TCL publication Giuseppe Piscitelli
2026-11-29 22:43 ` Giuseppe Piscitelli [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261129224327.744212-2-ooonea@gmail.com \
--to=ooonea@gmail.com \
--cc=ath11k@lists.infradead.org \
--cc=jjohnson@kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox