Skip to contentSkip to conversation

disable all pending tasklets during device removal

PATCH Superseded Lorenzo Bianconi 2 participants 5 messages Jan 18, 2018 – Jan 19, 2018

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover disable all pending tasklets during device removal

This patchset is based on 'add set_domain routine to reconfigure mt76x2 dfs pd' patchset

Lorenzo Bianconi (2):
mt76x2: init: disable tbtt tasklet during device cleanup
mt76x2: dfs: disable dfs tasklet during device cleanup

 drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c  | 6 ++++++
 drivers/net/wireless/mediatek/mt76/mt76x2_dfs.h  | 1 +
 drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 2 ++
 3 files changed, 9 insertions(+)
Signature · 1 line
2.13.6
#1 lore raw

PATCH 1/2 mt76x2: init: disable tbtt tasklet during device cleanup

---
 drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/wireless/mediatek/mt76/mt76x2_init.c +1 -0
index 9f20a308ff76..66d4bfc70977 100644
@@ -614,6 +614,7 @@ void mt76x2_stop_hardware(struct mt76x2_dev *dev)
 
 void mt76x2_cleanup(struct mt76x2_dev *dev)
 {
+	tasklet_disable(&dev->pre_tbtt_tasklet);
 	mt76x2_stop_hardware(dev);
 	mt76x2_dma_cleanup(dev);
 	mt76x2_mcu_cleanup(dev);
Signature · 1 line
2.13.6
#2 lore raw

Re: [PATCH 1/2] mt76x2: init: disable tbtt tasklet during device cleanup

Quoted 1 line · Lorenzo Bianconi

No empty commit logs, please. At least the commit log should answer the question "Why?". For example, are you fixing a reported bug or are you fixing is a theoretical issue you found during code review? What kind of symtomps does this bug have?

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#commit_log_does_not_answer_why

Signature · 1 line
Kalle Valo
#3 lore raw

Re: [PATCH 1/2] mt76x2: init: disable tbtt tasklet during device cleanup

Quoted 10 lines
Quoted 1 line · Lorenzo Bianconi

No empty commit logs, please. At least the commit log should answer the question "Why?". For example, are you fixing a reported bug or are you fixing is a theoretical issue you found during code review? What kind of symtomps does this bug have?

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#commit_log_does_not_answer_why

Ack, I will wait for some feedbacks and then I will respin a v2 with a proper commit log. Thanks.
Regards,

Lorenzo

Quoted 3 lines

--
Kalle Valo

#4 lore raw

PATCH 2/2 mt76x2: dfs: disable dfs tasklet during device cleanup

In reply to Lorenzo Bianconi

Define mt76x2_dfs_cleanup() routine since it will be helpful to add the support for dfs sw detector

---
 drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c  | 6 ++++++
 drivers/net/wireless/mediatek/mt76/mt76x2_dfs.h  | 1 +
 drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 1 +
 3 files changed, 8 insertions(+)
drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c +6 -0
index f936dc9a5476..19ac6edd672a 100644
@@ -504,3 +504,9 @@ void mt76x2_dfs_set_domain(struct mt76x2_dev *dev,
 	}
 }
 
+void mt76x2_dfs_cleanup(struct mt76x2_dev *dev)
+{
+	struct mt76x2_dfs_pattern_detector *dfs_pd = &dev->dfs_pd;
+
+	tasklet_disable(&dfs_pd->dfs_tasklet);
+}
drivers/net/wireless/mediatek/mt76/mt76x2_dfs.h +1 -0
index 8dbc783cc6bc..f70220615bbc 100644
@@ -74,6 +74,7 @@ struct mt76x2_dfs_pattern_detector {
 };
 
 void mt76x2_dfs_init_params(struct mt76x2_dev *dev);
+void mt76x2_dfs_cleanup(struct mt76x2_dev *dev);
 void mt76x2_dfs_init_detector(struct mt76x2_dev *dev);
 void mt76x2_dfs_adjust_agc(struct mt76x2_dev *dev);
 void mt76x2_dfs_set_domain(struct mt76x2_dev *dev,
drivers/net/wireless/mediatek/mt76/mt76x2_init.c +1 -0
index 66d4bfc70977..2bf861058658 100644
@@ -618,6 +618,7 @@ void mt76x2_cleanup(struct mt76x2_dev *dev)
 	mt76x2_stop_hardware(dev);
 	mt76x2_dma_cleanup(dev);
 	mt76x2_mcu_cleanup(dev);
+	mt76x2_dfs_cleanup(dev);
 }
 
 struct mt76x2_dev *mt76x2_alloc_device(struct device *pdev)
Signature · 1 line
2.13.6