diff options
author | Shayne Chen | 2020-09-22 19:36:01 +0800 |
---|---|---|
committer | Felix Fietkau | 2020-09-24 18:10:20 +0200 |
commit | 062d62e3976d20b6610a47bf8f829274cf7bbf89 (patch) | |
tree | 9c2122b1cc4a37a99a49f5aac6de7e598545500c /drivers/net | |
parent | 59283d0987783f3d1dd9a7b0a1f2527a424c7a6b (diff) |
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: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index 985504771346..a3ccc1785661 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -3148,8 +3148,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; |