From ee538efba542ec34371fd25167effdc8ccff0593 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 26 Aug 2025 10:47:55 +0200 Subject: [PATCH] wifi: mt76: free pending offchannel tx frames on wcid cleanup Avoid leaking them or keeping the wcid on the tx list Fixes: 0b3be9d1d34e ("wifi: mt76: add separate tx scheduling queue for off-channel tx") Signed-off-by: Felix Fietkau --- mac80211.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mac80211.c b/mac80211.c index c9b7a060..8f02a806 100644 --- a/mac80211.c +++ b/mac80211.c @@ -1708,6 +1708,10 @@ void mt76_wcid_cleanup(struct mt76_dev *dev, struct mt76_wcid *wcid) skb_queue_splice_tail_init(&wcid->tx_pending, &list); spin_unlock(&wcid->tx_pending.lock); + spin_lock(&wcid->tx_offchannel.lock); + skb_queue_splice_tail_init(&wcid->tx_offchannel, &list); + spin_unlock(&wcid->tx_offchannel.lock); + spin_unlock_bh(&phy->tx_lock); while ((skb = __skb_dequeue(&list)) != NULL) {