tx: purge frames from retry queue when removing a txq

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2015-06-13 09:26:41 +02:00
parent bca9b7c3a3
commit dbcda50b22
+5
View File
@@ -452,6 +452,7 @@ void mt76_txq_remove(struct mt76_dev *dev, struct ieee80211_txq *txq)
{ {
struct mt76_txq *mtxq; struct mt76_txq *mtxq;
struct mt76_queue *hwq; struct mt76_queue *hwq;
struct sk_buff *skb;
if (!txq) if (!txq)
return; return;
@@ -462,5 +463,9 @@ void mt76_txq_remove(struct mt76_dev *dev, struct ieee80211_txq *txq)
spin_lock_bh(&hwq->lock); spin_lock_bh(&hwq->lock);
if (!list_empty(&mtxq->list)) if (!list_empty(&mtxq->list))
list_del(&mtxq->list); list_del(&mtxq->list);
while ((skb = skb_dequeue(&mtxq->retry_q)) != NULL)
ieee80211_free_txskb(dev->hw, skb);
spin_unlock_bh(&hwq->lock); spin_unlock_bh(&hwq->lock);
} }