wifi: mt76: get rid of false alamrs of tx emission issues
authorStanleyYP Wang <StanleyYP.Wang@mediatek.com>
Thu, 31 Aug 2023 06:22:17 +0000 (14:22 +0800)
committerFelix Fietkau <nbd@nbd.name>
Sat, 30 Sep 2023 18:03:05 +0000 (20:03 +0200)
When the set_chan_info command is set with CH_SWITCH_NORMAL reason,
even if the action is UNI_CHANNEL_RX_PATH, it'll still generate some
unexpected tones, which might confuse DFS CAC tests that there are some
tone leakages. To get rid of these kinds of false alarms, always bypass
DPD calibration when IEEE80211_CONF_IDLE is set.

Reviewed-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c

index f18dc777edcbb95d9f85cd4a63559250f3a37745..94a091dd155e8777c0b5e31bc846c60993e311b6 100644 (file)
@@ -2742,10 +2742,10 @@ 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 (cmd == MCU_EXT_CMD(SET_RX_PATH) ||
-           dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
+       if (dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
                req.switch_reason = CH_SWITCH_NORMAL;
-       else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
+       else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL ||
+                phy->mt76->hw->conf.flags & IEEE80211_CONF_IDLE)
                req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
        else if (!cfg80211_reg_can_beacon(phy->mt76->hw->wiphy, chandef,
                                          NL80211_IFTYPE_AP))
index 4de0c4a97fc4b500e9885bed53f0a971dddb53c3..ebd0a9a6310e2d195cef67a10fa9f624d49b4d74 100644 (file)
@@ -3182,10 +3182,10 @@ int mt7996_mcu_set_chan_info(struct mt7996_phy *phy, u16 tag)
                .channel_band = ch_band[chandef->chan->band],
        };
 
-       if (tag == UNI_CHANNEL_RX_PATH ||
-           dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
+       if (dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR)
                req.switch_reason = CH_SWITCH_NORMAL;
-       else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
+       else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL ||
+                phy->mt76->hw->conf.flags & IEEE80211_CONF_IDLE)
                req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD;
        else if (!cfg80211_reg_can_beacon(phy->mt76->hw->wiphy, chandef,
                                          NL80211_IFTYPE_AP))