From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <echuang@realtek.com>, <phhuang@realtek.com>
Subject: [PATCH rtw-next 11/12] wifi: rtw89: phy: fix incorrect power limit by mac_id
Date: Wed, 14 Jan 2026 09:39:49 +0800 [thread overview]
Message-ID: <20260114013950.19704-12-pkshih@realtek.com> (raw)
In-Reply-To: <20260114013950.19704-1-pkshih@realtek.com>
From: Po-Hao Huang <phhuang@realtek.com>
Modify the power register range based on chip ability. When not set, the
default value is random. This fixes incorrect power limit on some ICs.
Signed-off-by: Po-Hao Huang <phhuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/phy_be.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/phy_be.c b/drivers/net/wireless/realtek/rtw89/phy_be.c
index 2dbc194eb329..08fd24a55d85 100644
--- a/drivers/net/wireless/realtek/rtw89/phy_be.c
+++ b/drivers/net/wireless/realtek/rtw89/phy_be.c
@@ -455,7 +455,8 @@ void rtw89_phy_bb_wrap_pwr_by_macid_init(struct rtw89_dev *rtwdev)
{
const struct rtw89_phy_gen_def *phy = rtwdev->chip->phy_def;
const struct rtw89_bb_wrap_regs *bb_wrap = phy->bb_wrap;
- u32 macid_idx, cr, base_macid_lmt, max_macid = 32;
+ u32 max_macid = rtwdev->chip->support_macid_num;
+ u32 macid_idx, cr, base_macid_lmt;
base_macid_lmt = bb_wrap->pwr_macid_lmt;
@@ -470,8 +471,9 @@ void rtw89_phy_bb_wrap_tx_path_by_macid_init(struct rtw89_dev *rtwdev)
{
const struct rtw89_phy_gen_def *phy = rtwdev->chip->phy_def;
const struct rtw89_bb_wrap_regs *bb_wrap = phy->bb_wrap;
+ u32 max_macid = rtwdev->chip->support_macid_num;
u32 cr = bb_wrap->pwr_macid_path;
- int i, max_macid = 32;
+ int i;
for (i = 0; i < max_macid; i++, cr += 4)
rtw89_write_bb_wrap_flush(rtwdev, cr, 0);
--
2.25.1
next prev parent reply other threads:[~2026-01-14 1:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 1:39 [PATCH rtw-next 00/12] wifi: rtw89: refactor PHY flow/setting for RTL8922D Ping-Ke Shih
2026-01-14 1:39 ` [PATCH rtw-next 01/12] wifi: rtw89: mac: clear global interrupt right after power-on Ping-Ke Shih
2026-01-22 1:54 ` Ping-Ke Shih
2026-01-14 1:39 ` [PATCH rtw-next 02/12] wifi: rtw89: phy: add {read,write}_rf_v3 for RTL8922D Ping-Ke Shih
2026-01-14 1:39 ` [PATCH rtw-next 03/12] wifi: rtw89: phy: add ops rtw89_phy_gen_be_v1 " Ping-Ke Shih
2026-01-14 1:39 ` [PATCH rtw-next 04/12] wifi: rtw89: phy: abstract start address and EHT of PHY status bitmap Ping-Ke Shih
2026-01-14 1:39 ` [PATCH rtw-next 05/12] wifi: rtw89: phy: extend register to read history 2 of PHY env_monitor Ping-Ke Shih
2026-01-14 1:39 ` [PATCH rtw-next 06/12] wifi: rtw89: phy: abstract BB wrap registers to share initial flow Ping-Ke Shih
2026-01-14 1:39 ` [PATCH rtw-next 07/12] wifi: rtw89: phy: update bb wrapper TPU init Ping-Ke Shih
2026-01-14 1:39 ` [PATCH rtw-next 08/12] wifi: rtw89: phy: update BB wrapper RFSI Ping-Ke Shih
2026-01-14 1:39 ` [PATCH rtw-next 09/12] wifi: rtw89: phy: write BB wrapper registers with flush Ping-Ke Shih
2026-01-14 1:39 ` [PATCH rtw-next 10/12] wifi: rtw89: phy: refine initial flow of BB wrapper Ping-Ke Shih
2026-01-14 1:39 ` Ping-Ke Shih [this message]
2026-01-14 1:39 ` [PATCH rtw-next 12/12] wifi: rtw89: fix unable to receive probe responses under MLO connection Ping-Ke Shih
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=20260114013950.19704-12-pkshih@realtek.com \
--to=pkshih@realtek.com \
--cc=echuang@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=phhuang@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