mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH ath-next] wifi: ath9k_htc: free an unsent frame with ieee80211_free_txskb()
@ 2026-11-18  8:52 Mehmet Fide
  0 siblings, 0 replies; only message in thread
From: Mehmet Fide @ 2026-11-18  8:52 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen
  Cc: John W . Linville, Sujith Manoharan, linux-wireless,
	linux-kernel, mehmet.fide

From: Mehmet Fide <mehmet.fide@screeningeagle.com>

When ath9k_htc_tx() cannot send a frame, for example because the USB
send fails or no TX slot is free, it frees the frame with
dev_kfree_skb_any(). mac80211 keeps a copy of a frame whose TX status
was asked for, such as an authentication response of hostapd, until
the driver reports that frame. Freed this way, the frame is never
reported: the sender gets no TX status, and mac80211 holds the copy
until the device is unregistered, where it warns:

  Have pending ack frames!
  WARNING: net/mac80211/main.c:1761 at ieee80211_free_ack_frame+0x4c/0x70 [mac80211]

Free the frame with ieee80211_free_txskb(), which reports it as not
acknowledged.

Fixes: fb9987d0f748 ("ath9k_htc: Support for AR9271 chipset.")
Signed-off-by: Mehmet Fide <mehmet.fide@screeningeagle.com>
---

Notes:
    Tested on an i.MX8MP board with an AR9271 as AP (hostapd), ath9k_htc of
    this base. A test hook in htc_issue_send() fails the send of the first
    two frames with a TX status request while a station joins, after the
    driver headers are pushed; both are authentication responses. Without
    the patch no TX status event is reported for them (iw event) and the
    unload of the driver warns as above. With it both are reported as not
    acknowledged and the unload does not warn, 2 of 2 runs each. The
    station joins in both cases.
    
    This applies on top of "wifi: ath9k_htc: count a frame as queued before
    it is sent" v2, both change the end of ath9k_htc_tx():
    https://lore.kernel.org/r/20261117071620.1650281-1-mehmet.fide@gmail.com/

 drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 3c52e66c79f4..7f85e980fc81 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -902,7 +902,7 @@ static void ath9k_htc_tx(struct ieee80211_hw *hw,
 	__ath9k_htc_check_wake_queues(priv, true);
 	ath9k_htc_tx_clear_slot(priv, slot);
 fail_tx:
-	dev_kfree_skb_any(skb);
+	ieee80211_free_txskb(hw, skb);
 }
 
 static int ath9k_htc_start(struct ieee80211_hw *hw)

base-commit: 465fcc982a221f774594aa7d7351fde8c03a3deb
prerequisite-patch-id: 9b2187facf209488bb53b815bff10f3731764adc
-- 
2.56.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-18  8:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18  8:52 [PATCH ath-next] wifi: ath9k_htc: free an unsent frame with ieee80211_free_txskb() Mehmet Fide

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®