wifi: mt76: bypass DPD on a scan channel while a monitor is active
Subsystems (2)
Felix Fietkau
maintainerPATCH 1/1 wifi: mt76: bypass DPD on a scan channel while a monitor is active
Commit "mt76: fix monitor rx FCS error in DFS channel" set CH_SWITCH_NORMAL for every channel switch while a monitor interface is active, to keep CH_SWITCH_DFS away from a monitored DFS channel. The monitor check comes before the offchannel check, so a scan channel also gets CH_SWITCH_NORMAL instead of CH_SWITCH_SCAN_BYPASS_DPD, and the firmware runs the full calibration on each scan channel.
On an MT7981 with a monitor on the 5 GHz phy, a scan on that phy took 10.8 to 11.0 s instead of 2.9 to 3.1 s. hostapd aborts its first scan after 10 s, so ACS never completes a scan there.
Apply the monitor rule only on the operating channel.
Fixes 24e69f6bc3ca ("mt76: fix monitor rx FCS error in DFS channel")
Signed-off-by Felix Fietkau <[email protected]>
--- drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 ++- drivers/net/wireless/mediatek/mt76/mt7996/mcu.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +2 -1
@@ -2156,7 +2156,8 @@ int mt7615_mcu_set_chan_info(struct mt7615_phy *phy, int cmd) };if (cmd ==MCU_EXT_CMD (SET_RX_PATH ) || - phy->mt76->hw->conf.flags &IEEE80211_CONF_MONITOR ) + (phy->mt76->hw->conf.flags &IEEE80211_CONF_MONITOR && + !phy->mt76->offchannel)) req.switch_reason =CH_SWITCH_NORMAL ;else if (phy->mt76->offchannel) req.switch_reason =CH_SWITCH_SCAN_BYPASS_DPD ;
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +2 -1
@@ -2838,7 +2838,8 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)if (mt76_connac_spe_idx (phy->mt76->antenna_mask)) req.tx_path_num =fls (phy->mt76->antenna_mask); -if (phy->mt76->hw->conf.flags &IEEE80211_CONF_MONITOR ) +if (phy->mt76->hw->conf.flags &IEEE80211_CONF_MONITOR && + !phy->mt76->offchannel) req.switch_reason =CH_SWITCH_NORMAL ;else if (phy->mt76->offchannel || phy->mt76->hw->conf.flags &IEEE80211_CONF_IDLE )
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +2 -1
@@ -927,7 +927,8 @@ int mt7921_mcu_set_chan_info(struct mt792x_phy *phy, int cmd) req.channel_band = chandef->chan->band;if (cmd ==MCU_EXT_CMD (SET_RX_PATH ) || - dev->mt76.hw->conf.flags &IEEE80211_CONF_MONITOR ) + (dev->mt76.hw->conf.flags &IEEE80211_CONF_MONITOR && + !phy->mt76->offchannel)) req.switch_reason =CH_SWITCH_NORMAL ;else if (phy->mt76->offchannel) req.switch_reason =CH_SWITCH_SCAN_BYPASS_DPD ;
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c +2 -1
@@ -4199,7 +4199,8 @@ int mt7996_mcu_set_chan_info(struct mt7996_phy *phy, u16 tag) .channel_band = ch_band[chandef->chan->band], }; -if (phy->mt76->hw->conf.flags &IEEE80211_CONF_MONITOR ) +if (phy->mt76->hw->conf.flags &IEEE80211_CONF_MONITOR && + !phy->mt76->offchannel) req.switch_reason =CH_SWITCH_NORMAL ;else if (phy->mt76->offchannel || !phy->mt76->chanctx) req.switch_reason =CH_SWITCH_SCAN_BYPASS_DPD ;
Signature · 1 line
2.47.3