Skip to content

Commit

Permalink
mt76: mt7915: add offchannel condition in switch channel command
Browse files Browse the repository at this point in the history
Add a missing offchannel condition for channel switch reason, which
bypasses DPD calibration to reduce scanning time.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
csyuanc authored and nbd168 committed Sep 23, 2020
1 parent 7330106 commit 8c47ed1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mt7915/mcu.c
Expand Up @@ -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;
Expand Down

0 comments on commit 8c47ed1

Please sign in to comment.