Define mt76x2_dfs_cleanup() routine since it will be helpful to add the support for dfs sw detector Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@xxxxxxxxxx> --- 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(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c index f936dc9a5476..19ac6edd672a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c @@ -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); +} diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.h b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.h index 8dbc783cc6bc..f70220615bbc 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.h @@ -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, diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c index 66d4bfc70977..2bf861058658 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c @@ -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) -- 2.13.6