From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <gary.chang@realtek.com>, <sc.lee@realtek.com>,
<wenjie.tsai@realtek.com>
Subject: [PATCH rtw-next 9/9] wifi: rtw89: phy: set CFR to manual mode for some 2GHz channels
Date: Fri, 17 Jul 2026 14:19:10 +0800 [thread overview]
Message-ID: <20260717061910.54466-10-pkshih@realtek.com> (raw)
In-Reply-To: <20260717061910.54466-1-pkshih@realtek.com>
The CFR (Channel Frequency Response) manual mode condition for 2GHz is
missing to limit on bandwidth for specific channels, which are channel
13 with 20MHz bandwidth and channel 11 with 40MHz bandwidth. Also add
a band check to avoid affecting 5GHz/6GHz bands.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/phy_be.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw89/phy_be.c b/drivers/net/wireless/realtek/rtw89/phy_be.c
index e471409a4b8f..c06927d1dc78 100644
--- a/drivers/net/wireless/realtek/rtw89/phy_be.c
+++ b/drivers/net/wireless/realtek/rtw89/phy_be.c
@@ -707,13 +707,19 @@ void rtw89_phy_bb_wrap_set_rfsi_bandedge_ch(struct rtw89_dev *rtwdev,
const struct rtw89_chan *chan,
enum rtw89_phy_idx phy_idx)
{
+ bool cfr_manual_en = false;
u32 reg;
u32 val;
val = rtw89_phy_bb_wrap_be_bandedge_decision(rtwdev, chan);
+ if (chan->band_type == RTW89_BAND_2G &&
+ ((chan->primary_channel == 13 && chan->band_width == RTW89_CHANNEL_WIDTH_20) ||
+ (chan->primary_channel == 11 && chan->band_width == RTW89_CHANNEL_WIDTH_40)))
+ cfr_manual_en = true;
+
rtw89_phy_write32_idx(rtwdev, R_TX_CFR_MANUAL_EN_BE4, B_TX_CFR_MANUAL_EN_BE4_M,
- chan->primary_channel == 13, phy_idx);
+ cfr_manual_en, phy_idx);
reg = rtw89_mac_reg_by_idx(rtwdev, R_BANDEDGE_DBWX_BE4, phy_idx);
rtw89_write32_mask(rtwdev, reg, B_BANDEDGE_DBW20_BE4, val & BIT(0));
--
2.25.1
prev parent reply other threads:[~2026-07-17 6:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 6:19 [PATCH rtw-next 0/9] wifi: rtw89: add LED support and update some random settings Ping-Ke Shih
2026-07-17 6:19 ` [PATCH rtw-next 1/9] wifi: rtw89: add LED support to reflect the wireless association status Ping-Ke Shih
2026-07-17 6:19 ` [PATCH rtw-next 2/9] wifi: rtw89: add multicolor LED support for RTL8852CU valve board Ping-Ke Shih
2026-07-17 6:19 ` [PATCH rtw-next 3/9] wifi: rtw89: 8852cu: add quirk to disable 2.4 GHz band Ping-Ke Shih
2026-07-17 6:19 ` [PATCH rtw-next 4/9] wifi: rtw89: rfk: update TXIQK H2C command format to v1 Ping-Ke Shih
2026-07-17 6:19 ` [PATCH rtw-next 5/9] wifi: rtw89: 8922d: bypass TXIQK when scan Ping-Ke Shih
2026-07-17 6:19 ` [PATCH rtw-next 6/9] wifi: rtw89: wow: extend timeout unit to avoid SER false alarm Ping-Ke Shih
2026-07-17 6:19 ` [PATCH rtw-next 7/9] wifi: rtw89: pci: set PCIe maximum TS1 for RTL8922DE Ping-Ke Shih
2026-07-17 6:19 ` [PATCH rtw-next 8/9] wifi: rtw89: 8922d: reduce IO in power-on function Ping-Ke Shih
2026-07-17 6:19 ` Ping-Ke Shih [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260717061910.54466-10-pkshih@realtek.com \
--to=pkshih@realtek.com \
--cc=gary.chang@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=sc.lee@realtek.com \
--cc=wenjie.tsai@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox