summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7615/main.c
diff options
context:
space:
mode:
authorXing Song <xing.song@mediatek.com>2022-01-24 04:28:11 +0100
committerFelix Fietkau <nbd@nbd.name>2022-02-03 13:57:59 +0100
commit4e58ef4b6d727abdb071f7799aef763f8d6f2ad8 (patch)
tree0d0430ea32aaad76b882817b86d2ad1f27e59725 /drivers/net/wireless/mediatek/mt76/mt7615/main.c
parentmt76: mt7615: check sta_rates pointer in mt7615_sta_rate_tbl_update (diff)
downloadlinux-4e58ef4b6d727abdb071f7799aef763f8d6f2ad8.tar.xz
linux-4e58ef4b6d727abdb071f7799aef763f8d6f2ad8.zip
mt76: stop the radar detector after leaving dfs channel
The radar detctor is used for dfs channel. So it will start after switching to dfs channel and will stop after leaving. The TX will be blocked if radar detctor isn't stopped in non-dfs channel. This patch resets the dfs state to indicate the radar detector needs to be stopped. Signed-off-by: Xing Song <xing.song@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7615/main.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7615/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/main.c b/drivers/net/wireless/mediatek/mt76/mt7615/main.c
index fca38f0e1a27..7dcf1fb97eca 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/main.c
@@ -291,7 +291,8 @@ static void mt7615_init_dfs_state(struct mt7615_phy *phy)
if (hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
return;
- if (!(chandef->chan->flags & IEEE80211_CHAN_RADAR))
+ if (!(chandef->chan->flags & IEEE80211_CHAN_RADAR) &&
+ !(mphy->chandef.chan->flags & IEEE80211_CHAN_RADAR))
return;
if (mphy->chandef.chan->center_freq == chandef->chan->center_freq &&