projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c38cbba
)
mt76: mt7615: rearrange cleanup operations in mt7615_unregister_device
author
Lorenzo Bianconi
<lorenzo@kernel.org>
Sun, 5 May 2019 15:17:00 +0000
(17:17 +0200)
committer
Felix Fietkau
<nbd@nbd.name>
Tue, 25 Jun 2019 10:55:27 +0000
(12:55 +0200)
Cleanup tx/rx napi before releasing pending idrs.
Moreover unmap txwi_cache running mt76_free_device routine
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/init.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/mediatek/mt76/mt7615/init.c
b/drivers/net/wireless/mediatek/mt76/mt7615/init.c
index
3ab3ff5
..
369b9a8
100644
(file)
--- a/
drivers/net/wireless/mediatek/mt76/mt7615/init.c
+++ b/
drivers/net/wireless/mediatek/mt76/mt7615/init.c
@@
-212,6
+212,10
@@
void mt7615_unregister_device(struct mt7615_dev *dev)
struct mt76_txwi_cache *txwi;
int id;
+ mt76_unregister_device(&dev->mt76);
+ mt7615_mcu_exit(dev);
+ mt7615_dma_cleanup(dev);
+
spin_lock_bh(&dev->token_lock);
idr_for_each_entry(&dev->token, txwi, id) {
mt7615_txp_skb_unmap(&dev->mt76, txwi);
@@
-221,9
+225,6
@@
void mt7615_unregister_device(struct mt7615_dev *dev)
}
spin_unlock_bh(&dev->token_lock);
idr_destroy(&dev->token);
- mt76_unregister_device(&dev->mt76);
- mt7615_mcu_exit(dev);
- mt7615_dma_cleanup(dev);
-
ieee80211_free_hw(mt76_hw(dev)
);
+
mt76_free_device(&dev->mt76
);
}