mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7915: reset token when mac_reset happens
Reset buffering token in mt7915_mac_reset_work() to avoid possible leakege, which leads to Tx stop after mac reset. Tested-by: Bo Jiao <[email protected]> Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+1
-17
@@ -682,28 +682,12 @@ int mt7915_register_device(struct mt7915_dev *dev)
|
||||
|
||||
void mt7915_unregister_device(struct mt7915_dev *dev)
|
||||
{
|
||||
struct mt76_txwi_cache *txwi;
|
||||
int id;
|
||||
|
||||
mt7915_unregister_ext_phy(dev);
|
||||
mt76_unregister_device(&dev->mt76);
|
||||
mt7915_mcu_exit(dev);
|
||||
mt7915_dma_cleanup(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) {
|
||||
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);
|
||||
dev->token_count--;
|
||||
}
|
||||
spin_unlock_bh(&dev->token_lock);
|
||||
idr_destroy(&dev->token);
|
||||
mt7915_tx_token_put(dev);
|
||||
|
||||
mt76_free_device(&dev->mt76);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user