blob: 80f8e1dfcb89cd81b39d5b2ead5cb869e921fe3b [file] [log] [blame]
developer8bb192d2023-08-31 11:46:57 +08001From c521ab8836a3e1a4e4f71896e364802c3cf2d6e7 Mon Sep 17 00:00:00 2001
2From: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
3Date: Wed, 17 May 2023 17:34:55 +0800
4Subject: [PATCH 04/15] wifi: mt76: mt7915: get rid of false alamrs of tx
5 emission issues
6
7When mt7915_mcu_set_chan_info() is set with CH_SWITCH_NORMAL reason,
8even if the action is UNI_CHANNEL_RX_PATH, it'll still generate some
9unexpected tones, which might confuse DFS CAC tests that there are some
10tone leakages. To get rid of these kinds of false alarms, always bypass
11DPD calibration when IEEE80211_CONF_IDLE is set.
12
13Reviewed-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
14Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>
15Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
16---
17 mt7915/mcu.c | 6 +++---
18 1 file changed, 3 insertions(+), 3 deletions(-)
19
20diff --git a/mt7915/mcu.c b/mt7915/mcu.c
21index 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--
392.39.2
40