diff options
author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2018-01-09 14:13:10 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-24 17:15:33 +0200 |
commit | 8c9f6491a313b5b83f6f395b5cd195f261124fe5 (patch) | |
tree | 94fe17e4dca7263f8ceb817e8efe949d3afb7e74 | |
parent | 23405236460b90b263775bd4b5eb331aaae1e8f4 (diff) | |
download | blackbird-op-linux-8c9f6491a313b5b83f6f395b5cd195f261124fe5.tar.gz blackbird-op-linux-8c9f6491a313b5b83f6f395b5cd195f261124fe5.zip |
mt76x2: dfs: avoid tasklet scheduling during mt76x2_dfs_init_params()
Substitute tasklet_kill with tasklet_disable/tasklet_enable in order to
guarantee dfs tasklet can not be executed during dfs parameter
initialization
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c index 5b452a596016..1a6282a8b64b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_dfs.c @@ -460,7 +460,6 @@ void mt76x2_dfs_init_params(struct mt76x2_dev *dev) { struct cfg80211_chan_def *chandef = &dev->mt76.chandef; - tasklet_kill(&dev->dfs_pd.dfs_tasklet); if (chandef->chan->flags & IEEE80211_CHAN_RADAR) { mt76x2_dfs_set_bbp_params(dev); /* enable debug mode */ diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c index fb9c2dbc040e..aa5fbb64e218 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c @@ -127,6 +127,7 @@ mt76x2_set_channel(struct mt76x2_dev *dev, struct cfg80211_chan_def *chandef) mt76_set_channel(&dev->mt76); tasklet_disable(&dev->pre_tbtt_tasklet); + tasklet_disable(&dev->dfs_pd.dfs_tasklet); cancel_delayed_work_sync(&dev->cal_work); mt76x2_mac_stop(dev, true); @@ -139,6 +140,7 @@ mt76x2_set_channel(struct mt76x2_dev *dev, struct cfg80211_chan_def *chandef) mt76x2_dfs_init_params(dev); mt76x2_mac_resume(dev); + tasklet_enable(&dev->dfs_pd.dfs_tasklet); tasklet_enable(&dev->pre_tbtt_tasklet); return ret; |