Commit 06991d1f authored by Ryder Lee's avatar Ryder Lee Committed by Felix Fietkau

mt76: mt7615: use ieee80211_free_txskb() in mt7615_tx_token_put()

We should use ieee80211_free_txskb() to report skb status avoid wrong
aql accounting after reset.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 91577cca
...@@ -1976,8 +1976,12 @@ void mt7615_tx_token_put(struct mt7615_dev *dev) ...@@ -1976,8 +1976,12 @@ void mt7615_tx_token_put(struct mt7615_dev *dev)
spin_lock_bh(&dev->token_lock); spin_lock_bh(&dev->token_lock);
idr_for_each_entry(&dev->token, txwi, id) { idr_for_each_entry(&dev->token, txwi, id) {
mt7615_txp_skb_unmap(&dev->mt76, txwi); mt7615_txp_skb_unmap(&dev->mt76, txwi);
if (txwi->skb) if (txwi->skb) {
dev_kfree_skb_any(txwi->skb); struct ieee80211_hw *hw;
hw = mt76_tx_status_get_hw(&dev->mt76, txwi->skb);
ieee80211_free_txskb(hw, txwi->skb);
}
mt76_put_txwi(&dev->mt76, txwi); mt76_put_txwi(&dev->mt76, txwi);
} }
spin_unlock_bh(&dev->token_lock); spin_unlock_bh(&dev->token_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment