diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-01-23 10:03:24 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-24 17:17:35 +0200 |
commit | ba9797b2a7a5c1dfaa1cc189bbb9493a6d8f03cf (patch) | |
tree | 096581114dd1fab21cbe3e389dc9a24e218fc5f8 /drivers/net/wireless | |
parent | 634e99f0d4dab19228d7d6c7c6dcf04f30a80a6a (diff) |
mt76x2: init: disable all pending tasklets during device removal
There is a possible race in mt76x2_stop_hardware() since pre_tbtt and
dfs tasklets could run during driver cleanup. Fix it disabling all
pending tasklets during device removal
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Acked-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c index 9f20a308ff76..7b4851481dd6 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c @@ -614,6 +614,8 @@ void mt76x2_stop_hardware(struct mt76x2_dev *dev) void mt76x2_cleanup(struct mt76x2_dev *dev) { + tasklet_disable(&dev->dfs_pd.dfs_tasklet); + tasklet_disable(&dev->pre_tbtt_tasklet); mt76x2_stop_hardware(dev); mt76x2_dma_cleanup(dev); mt76x2_mcu_cleanup(dev); |