Skip to content

Commit

Permalink
mt76: mt7915: use ieee80211_free_txskb to free tx skbs
Browse files Browse the repository at this point in the history
Using dev_kfree_skb for tx skbs breaks AQL. This worked until now only
by accident, because a mac80211 issue breaks AQL on drivers with firmware
rate control that report the rate via ieee80211_tx_status_ext as struct
rate_info.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Aug 12, 2020
1 parent 2767051 commit 34aed01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions mt7915/init.c
Expand Up @@ -709,8 +709,12 @@ void mt7915_unregister_device(struct mt7915_dev *dev)
spin_lock_bh(&dev->token_lock);
idr_for_each_entry(&dev->token, txwi, id) {
mt7915_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);
Expand Down
2 changes: 1 addition & 1 deletion mt7915/mac.c
Expand Up @@ -843,7 +843,7 @@ mt7915_tx_complete_status(struct mt76_dev *mdev, struct sk_buff *skb,
if (sta || !(info->flags & IEEE80211_TX_CTL_NO_ACK))
mt7915_tx_status(sta, hw, info, NULL);

dev_kfree_skb(skb);
ieee80211_free_txskb(hw, skb);
}

void mt7915_txp_skb_unmap(struct mt76_dev *dev,
Expand Down

0 comments on commit 34aed01

Please sign in to comment.