Commit 5b7cc6d1 authored by Felix Fietkau's avatar Felix Fietkau

mt76: mt76x02: use mt76_phy_dfs_state to determine radar detector state

Fixes corner cases in enabling/disabling detector
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 2c86f675
...@@ -823,10 +823,7 @@ EXPORT_SYMBOL_GPL(mt76x02_phy_dfs_adjust_agc); ...@@ -823,10 +823,7 @@ EXPORT_SYMBOL_GPL(mt76x02_phy_dfs_adjust_agc);
void mt76x02_dfs_init_params(struct mt76x02_dev *dev) void mt76x02_dfs_init_params(struct mt76x02_dev *dev)
{ {
struct cfg80211_chan_def *chandef = &dev->mphy.chandef; if (mt76_phy_dfs_state(&dev->mphy) > MT_DFS_STATE_DISABLED) {
if ((chandef->chan->flags & IEEE80211_CHAN_RADAR) &&
dev->mt76.region != NL80211_DFS_UNSET) {
mt76x02_dfs_init_sw_detector(dev); mt76x02_dfs_init_sw_detector(dev);
mt76x02_dfs_set_bbp_params(dev); mt76x02_dfs_set_bbp_params(dev);
/* enable debug mode */ /* enable debug mode */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment