summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2019-11-02 01:21:07 +0300
committerFelix Fietkau <nbd@nbd.name>2019-11-20 15:23:51 +0300
commit2b5d1b91e1741c48f00682dec7b1a0845f9792f3 (patch)
tree7434b01f2396c255c95784d2533c7f4bd3b00ab2 /drivers/net/wireless/mediatek
parent0eb8c104fd8dfc2a8636b09b3f908170f7c9d037 (diff)
downloadlinux-2b5d1b91e1741c48f00682dec7b1a0845f9792f3.tar.xz
mt76: mt7615: disable radar pattern detector during scanning
Set switch_reason to CH_SWITCH_SCAN_BYPASS_DPD during frequency scanning in order to disable radar pattern detector Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7615/mcu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 8371387ca772..f229c9ce9f65 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -1305,8 +1305,10 @@ int mt7615_mcu_set_channel(struct mt7615_dev *dev)
};
int ret;
- if ((chandef->chan->flags & IEEE80211_CHAN_RADAR) &&
- chandef->chan->dfs_state != NL80211_DFS_AVAILABLE)
+ if (dev->mt76.hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
+ req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
+ else if ((chandef->chan->flags & IEEE80211_CHAN_RADAR) &&
+ chandef->chan->dfs_state != NL80211_DFS_AVAILABLE)
req.switch_reason = CH_SWITCH_DFS;
else
req.switch_reason = CH_SWITCH_NORMAL;