developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame] | 1 | From 39893cc863213984a9ab0ae279dbfe433a6fe90e Mon Sep 17 00:00:00 2001 |
| 2 | From: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 3 | Date: Tue, 23 May 2023 21:18:59 +0800 |
| 4 | Subject: [PATCH 38/39] wifi: mt76: mt7996: fix DFS CAC tx emission issue after |
| 5 | 2nd interface up |
| 6 | |
| 7 | FW's channel state is set during the first wifi interface setup. If the switch reason for |
| 8 | setting the tx/rx path during second-time wifi interface setup is CH_SWITCH_NORMAL, |
| 9 | then the FW would perform runtime dpd channel calibration during DFS CAC, which leads to |
| 10 | tx emission. Therefore, in order to bypass tx calibration during DFS CAC, set the switch reason |
| 11 | to CH_SWITCH_DFS whenever chandef is set to DFS channel. |
| 12 | |
| 13 | Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 14 | --- |
| 15 | mt7996/mcu.c | 6 +++--- |
| 16 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 17 | |
| 18 | diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
| 19 | index b34c6b7..be5c908 100644 |
| 20 | --- a/mt7996/mcu.c |
| 21 | +++ b/mt7996/mcu.c |
| 22 | @@ -3211,12 +3211,12 @@ int mt7996_mcu_set_chan_info(struct mt7996_phy *phy, u16 tag) |
| 23 | .channel_band = ch_band[chandef->chan->band], |
| 24 | }; |
| 25 | |
| 26 | - if (tag == UNI_CHANNEL_RX_PATH || |
| 27 | - dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR) |
| 28 | + if (dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR) |
| 29 | req.switch_reason = CH_SWITCH_NORMAL; |
| 30 | else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL) |
| 31 | req.switch_reason = CH_SWITCH_SCAN_BYPASS_DPD; |
| 32 | - else if (!cfg80211_reg_can_beacon(phy->mt76->hw->wiphy, chandef, |
| 33 | + else if (cfg80211_chandef_valid(chandef) && |
| 34 | + !cfg80211_reg_can_beacon(phy->mt76->hw->wiphy, chandef, |
| 35 | NL80211_IFTYPE_AP)) |
| 36 | req.switch_reason = CH_SWITCH_DFS; |
| 37 | else |
| 38 | -- |
| 39 | 2.18.0 |
| 40 | |