mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
mt76: introduce mt76_free_device routine
Move mt76_tx_free in mt76_free_device routine in order to unmap all txwi descriptors at module unload Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
e5fc742f92
commit
def34a2f4f
@ -369,10 +369,16 @@ void mt76_unregister_device(struct mt76_dev *dev)
|
||||
|
||||
mt76_tx_status_check(dev, NULL, true);
|
||||
ieee80211_unregister_hw(hw);
|
||||
mt76_tx_free(dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_unregister_device);
|
||||
|
||||
void mt76_free_device(struct mt76_dev *dev)
|
||||
{
|
||||
mt76_tx_free(dev);
|
||||
ieee80211_free_hw(dev->hw);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_free_device);
|
||||
|
||||
void mt76_rx(struct mt76_dev *dev, enum mt76_rxq_id q, struct sk_buff *skb)
|
||||
{
|
||||
if (!test_bit(MT76_STATE_RUNNING, &dev->state)) {
|
||||
|
@ -605,6 +605,7 @@ struct mt76_dev *mt76_alloc_device(struct device *pdev, unsigned int size,
|
||||
int mt76_register_device(struct mt76_dev *dev, bool vht,
|
||||
struct ieee80211_rate *rates, int n_rates);
|
||||
void mt76_unregister_device(struct mt76_dev *dev);
|
||||
void mt76_free_device(struct mt76_dev *dev);
|
||||
|
||||
struct dentry *mt76_register_debugfs(struct mt76_dev *dev);
|
||||
void mt76_seq_puts_array(struct seq_file *file, const char *str,
|
||||
|
@ -576,5 +576,5 @@ void mt7603_unregister_device(struct mt7603_dev *dev)
|
||||
mt76_unregister_device(&dev->mt76);
|
||||
mt7603_mcu_exit(dev);
|
||||
mt7603_dma_cleanup(dev);
|
||||
ieee80211_free_hw(mt76_hw(dev));
|
||||
mt76_free_device(&dev->mt76);
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ mt76x0e_remove(struct pci_dev *pdev)
|
||||
|
||||
mt76_unregister_device(mdev);
|
||||
mt76x0e_cleanup(dev);
|
||||
ieee80211_free_hw(mdev->hw);
|
||||
mt76_free_device(mdev);
|
||||
}
|
||||
|
||||
static const struct pci_device_id mt76x0e_device_table[] = {
|
||||
|
@ -107,7 +107,7 @@ mt76pci_remove(struct pci_dev *pdev)
|
||||
|
||||
mt76_unregister_device(mdev);
|
||||
mt76x2_cleanup(dev);
|
||||
ieee80211_free_hw(mdev->hw);
|
||||
mt76_free_device(mdev);
|
||||
}
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, mt76pci_device_table);
|
||||
|
Loading…
Reference in New Issue
Block a user