From: Alexander Wetzel Date: Tue, 4 Feb 2025 12:31:29 +0000 (+0100) Subject: wifi: mac80211: Cleanup sta TXQs on flush X-Git-Tag: v6.12.23~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d42a34137243b1d86acf02b49963c529ff6ea3e;p=thirdparty%2Fkernel%2Fstable.git wifi: mac80211: Cleanup sta TXQs on flush [ Upstream commit 5b999006e35ea9c11116ddff7e375b256421d0af ] Drop the sta TXQs on flush when the drivers is not supporting flush. ieee80211_set_disassoc() tries to clean up everything for the sta. But it ignored queued frames in the sta TX queues when the driver isn't supporting the flush driver ops. Signed-off-by: Alexander Wetzel Link: https://patch.msgid.link/20250204123129.9162-1-Alexander@wetzel-home.de Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 2b6e8e7307ee5..a98ae563613c0 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -685,7 +685,7 @@ void __ieee80211_flush_queues(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata, unsigned int queues, bool drop) { - if (!local->ops->flush) + if (!local->ops->flush && !drop) return; /* @@ -712,7 +712,8 @@ void __ieee80211_flush_queues(struct ieee80211_local *local, } } - drv_flush(local, sdata, queues, drop); + if (local->ops->flush) + drv_flush(local, sdata, queues, drop); ieee80211_wake_queues_by_reason(&local->hw, queues, IEEE80211_QUEUE_STOP_REASON_FLUSH,