summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorRyder Lee <ryder.lee@mediatek.com>2021-04-13 11:00:07 +0300
committerFelix Fietkau <nbd@nbd.name>2021-04-21 12:42:20 +0300
commit06991d1f73a9bdbc5f234ee96737b9102705b89c (patch)
tree81724fd9b664c1c6bb8c16b091f94e3b7b6c6b9a /drivers/net/wireless
parent91577ccae6461506a06889849dd944d9bdec09dd (diff)
downloadlinux-06991d1f73a9bdbc5f234ee96737b9102705b89c.tar.xz
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: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7615/mac.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
index 005c2829d3df..0b386030dbd8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c
@@ -1976,8 +1976,12 @@ void mt7615_tx_token_put(struct mt7615_dev *dev)
spin_lock_bh(&dev->token_lock);
idr_for_each_entry(&dev->token, txwi, id) {
mt7615_txp_skb_unmap(&dev->mt76, txwi);
- if (txwi->skb)
- dev_kfree_skb_any(txwi->skb);
+ if (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);
}
spin_unlock_bh(&dev->token_lock);