mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 03:10:30 -04:00
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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user