developer | 8bb192d | 2023-08-31 11:46:57 +0800 | [diff] [blame] | 1 | From c521ab8836a3e1a4e4f71896e364802c3cf2d6e7 Mon Sep 17 00:00:00 2001 |
| 2 | From: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 3 | Date: Wed, 17 May 2023 17:34:55 +0800 |
| 4 | Subject: [PATCH 04/15] wifi: mt76: mt7915: get rid of false alamrs of tx |
| 5 | emission issues |
| 6 | |
| 7 | When mt7915_mcu_set_chan_info() is set with CH_SWITCH_NORMAL reason, |
| 8 | even if the action is UNI_CHANNEL_RX_PATH, it'll still generate some |
| 9 | unexpected tones, which might confuse DFS CAC tests that there are some |
| 10 | tone leakages. To get rid of these kinds of false alarms, always bypass |
| 11 | DPD calibration when IEEE80211_CONF_IDLE is set. |
| 12 | |
| 13 | Reviewed-by: Evelyn Tsai <evelyn.tsai@mediatek.com> |
| 14 | Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 15 | Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> |
| 16 | --- |
| 17 | mt7915/mcu.c | 6 +++--- |
| 18 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 19 | |
| 20 | diff --git a/mt7915/mcu.c b/mt7915/mcu.c |
| 21 | index 74fafedb..9ee65fa5 100644 |
| 22 | --- a/mt7915/mcu.c |
| 23 | +++ b/mt7915/mcu.c |
| 24 | @@ -2742,10 +2742,10 @@ int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd) |
| 25 | if (mt76_connac_spe_idx(phy->mt76->antenna_mask)) |
| 26 | req.tx_path_num = fls(phy->mt76->antenna_mask); |
| 27 | |
| 28 | - if (cmd == MCU_EXT_CMD(SET_RX_PATH) || |
| 29 | - dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR) |
| 30 | + if (dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR) |
| 31 | req.switch_reason = CH_SWITCH_NORMAL; |
| 32 | - else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL) |
| 33 | + else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL || |
| 34 | + phy->mt76->hw->conf.flags & IEEE80211_CONF_IDLE) |
| 35 | req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD; |
| 36 | else if (!cfg80211_reg_can_beacon(phy->mt76->hw->wiphy, chandef, |
| 37 | NL80211_IFTYPE_AP)) |
| 38 | -- |
| 39 | 2.39.2 |
| 40 | |