[PATCH ath-next v5 1/9] wifi: ath11k: free tx skbs through ieee80211_free_txskb()
From: Julius Bairaktaris
Date: Sun Oct 18 2026 - 13:49:39 EST
ath11k_dp_tx_free_txbuf(), reached for the HTT REINJ and INSPECT
statuses, frees the frame with dev_kfree_skb_any(), unlike every other
tx completion path in dp_tx.c. This leaks the tx status clone and idr
entry mac80211 keeps for a frame whose socket asked for status, as
commit 29d15589f084 ("wifi: ath11k: Cleanup mac80211 references on
failure during tx_complete") fixed on three sibling paths. With
NL80211_EXT_FEATURE_AQL, set by the next patch, it also keeps the
frame's airtime charge, and an access category at its limit is never
scheduled again.
Free the frame with ieee80211_free_txskb(). Neither status occurred on
the hardware below; the change is by inspection.
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julius Bairaktaris <julius@xxxxxxxxxxxxxx>
---
drivers/net/wireless/ath/ath11k/dp_tx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index 083aca8ff355b..f7d3cf0ff0358 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -305,9 +305,10 @@ static void ath11k_dp_tx_free_txbuf(struct ath11k_base *ab, u8 mac_id,
skb_cb = ATH11K_SKB_CB(msdu);
dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE);
- dev_kfree_skb_any(msdu);
ar = ab->pdevs[mac_id].ar;
+ ieee80211_free_txskb(ar->hw, msdu);
+
if (atomic_dec_and_test(&ar->dp.num_tx_pending))
wake_up(&ar->dp.tx_empty_waitq);
}
--
2.53.0