diff options
author | Felix Fietkau <nbd@nbd.name> | 2022-02-03 13:41:54 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-02-03 16:15:05 +0100 |
commit | 5b7cc6d17a0657490f310ce42fcc24d527f293c8 (patch) | |
tree | a2a7326050fd78c559d079aa7f797bcea6c43467 /drivers | |
parent | 2c86f6752046da72b1643c5647dabff82db407a2 (diff) | |
download | linux-5b7cc6d17a0657490f310ce42fcc24d527f293c8.tar.gz |
mt76: mt76x02: use mt76_phy_dfs_state to determine radar detector state
Fixes corner cases in enabling/disabling detector
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c b/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c index a601350531cd..024a5c0a5a57 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c @@ -823,10 +823,7 @@ EXPORT_SYMBOL_GPL(mt76x02_phy_dfs_adjust_agc); void mt76x02_dfs_init_params(struct mt76x02_dev *dev) { - struct cfg80211_chan_def *chandef = &dev->mphy.chandef; - - if ((chandef->chan->flags & IEEE80211_CHAN_RADAR) && - dev->mt76.region != NL80211_DFS_UNSET) { + if (mt76_phy_dfs_state(&dev->mphy) > MT_DFS_STATE_DISABLED) { mt76x02_dfs_init_sw_detector(dev); mt76x02_dfs_set_bbp_params(dev); /* enable debug mode */ |