mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
mt76: dfs: run mt76x02_dfs_set_domain atomically
Grab mt76_dev mutex in mt76x02_dfs_set_domain since it runs
concurrently with mt76x{0,2}_set_channel routines
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
bf349ce16e
commit
35c572818c
1 changed files with 2 additions and 0 deletions
|
|
@ -881,12 +881,14 @@ mt76x02_dfs_set_domain(struct mt76x02_dev *dev,
|
|||
{
|
||||
struct mt76x02_dfs_pattern_detector *dfs_pd = &dev->dfs_pd;
|
||||
|
||||
mutex_lock(&dev->mt76.mutex);
|
||||
if (dfs_pd->region != region) {
|
||||
tasklet_disable(&dfs_pd->dfs_tasklet);
|
||||
dfs_pd->region = region;
|
||||
mt76x02_dfs_init_params(dev);
|
||||
tasklet_enable(&dfs_pd->dfs_tasklet);
|
||||
}
|
||||
mutex_unlock(&dev->mt76.mutex);
|
||||
}
|
||||
|
||||
void mt76x02_regd_notifier(struct wiphy *wiphy,
|
||||
|
|
|
|||
Loading…
Reference in a new issue