Commit 4e58ef4b authored by Xing Song's avatar Xing Song Committed by Felix Fietkau
Browse files

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: default avatarXing Song <xing.song@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 6a6f457e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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 &&
+2 −1
Original line number Diff line number Diff line
@@ -311,7 +311,8 @@ static void mt7915_init_dfs_state(struct mt7915_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 &&