From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <kevin_yang@realtek.com>
Subject: [PATCH rtw-next 3/7] wifi: rtw89: 8922d: support new digital power compensation format
Date: Wed, 20 May 2026 20:38:19 +0800 [thread overview]
Message-ID: <20260520123823.1792954-4-pkshih@realtek.com> (raw)
In-Reply-To: <20260520123823.1792954-1-pkshih@realtek.com>
The new format shared the base set (7 elements). As there are total 40
sets, save 7 * 39 elements.
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/rtw8922d.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8922d.c b/drivers/net/wireless/realtek/rtw89/rtw8922d.c
index af2df4adfa85..18af9211c2df 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8922d.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8922d.c
@@ -2127,6 +2127,12 @@ static void rtw8922d_set_digital_pwr_comp(struct rtw89_dev *rtwdev,
__le32 vals[DIGITAL_PWR_COMP_VALS_NUM];
} sets[2][RTW89_TX_COMP_BAND_NR][BB_PATH_NUM_8922D];
} *pwr_comp_v0;
+ const struct {
+ __le32 base[DIGITAL_PWR_COMP_BASE_NUM];
+ struct {
+ __le32 vals[DIGITAL_PWR_COMP_VALS_NUM];
+ } sets[2][RTW89_TX_COMP_BAND_NR][BB_PATH_NUM_8922D];
+ } *pwr_comp;
struct rtw89_fw_elm_info *elm_info = &rtwdev->fw.elm_info;
const struct rtw89_fw_element_hdr *txcomp_elm = elm_info->tx_comp;
const __le32 (*comp_base)[DIGITAL_PWR_COMP_BASE_NUM];
@@ -2134,7 +2140,11 @@ static void rtw8922d_set_digital_pwr_comp(struct rtw89_dev *rtwdev,
u32 addr, val;
u32 i;
- if (sizeof(*pwr_comp_v0) == le32_to_cpu(txcomp_elm->size)) {
+ if (sizeof(*pwr_comp) == le32_to_cpu(txcomp_elm->size)) {
+ pwr_comp = (const void *)txcomp_elm->u.common.contents;
+ comp_base = &pwr_comp->base;
+ comp_vals = &pwr_comp->sets[nss][chan->tx_comp_band][path].vals;
+ } else if (sizeof(*pwr_comp_v0) == le32_to_cpu(txcomp_elm->size)) {
pwr_comp_v0 = (const void *)txcomp_elm->u.common.contents;
comp_base = &pwr_comp_v0->sets[nss][chan->tx_comp_band][path].base;
comp_vals = &pwr_comp_v0->sets[nss][chan->tx_comp_band][path].vals;
--
2.25.1
next prev parent reply other threads:[~2026-05-20 12:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 12:38 [PATCH rtw-next 0/7] wifi: rtw89: update firmware elements formats of power track, compensation and MRU Ping-Ke Shih
2026-05-20 12:38 ` [PATCH rtw-next 1/7] wifi: rtw89: fw: load TX power track element according to AID Ping-Ke Shih
2026-05-27 8:42 ` Ping-Ke Shih
2026-05-20 12:38 ` [PATCH rtw-next 2/7] wifi: rtw89: 8922d: refactor digital power compensation to support new format Ping-Ke Shih
2026-05-20 12:38 ` Ping-Ke Shih [this message]
2026-05-20 12:38 ` [PATCH rtw-next 4/7] wifi: rtw89: fw: load TX compensation element by RFE type Ping-Ke Shih
2026-05-20 12:38 ` [PATCH rtw-next 5/7] wifi: rtw89: Wi-Fi 7 configure TX power limit for large MRU Ping-Ke Shih
2026-05-20 12:38 ` [PATCH rtw-next 6/7] wifi: rtw89: debug: show large MRU in txpwr_table dbgfs Ping-Ke Shih
2026-05-20 12:38 ` [PATCH rtw-next 7/7] wifi: rtw89: 8922d: configure TX shape settings 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=20260520123823.1792954-4-pkshih@realtek.com \
--to=pkshih@realtek.com \
--cc=kevin_yang@realtek.com \
--cc=linux-wireless@vger.kernel.org \
/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