Skip to contentSkip to conversation

mt76: mt7915: add offchannel condition in switch channel command

PATCH New Shayne Chen 1 participant 1 message Sep 22, 2020

Subsystems (2)
lore
Share & tools
lore

Shayne Chen

author reviewer
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +4 -2
index fa3ea46..742e085 100644
@@ -3212,8 +3212,10 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
 		.channel_band = chandef->chan->band,
 	};
 
-	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;
Signature · 1 line
2.17.1