Commit 062d62e3 authored by Shayne Chen's avatar Shayne Chen Committed by Felix Fietkau
Browse files

mt76: mt7915: add offchannel condition in switch channel command



Add a missing offchannel condition for channel switch reason, which
bypasses DPD calibration to reduce scanning time.

Signed-off-by: default avatarShayne Chen <shayne.chen@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 59283d09
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -3148,7 +3148,9 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
		.channel_band = chandef->chan->band,
	};

	if ((chandef->chan->flags & IEEE80211_CHAN_RADAR) &&
	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