From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <kevin_yang@realtek.com>
Subject: [PATCH rtw-next 6/7] wifi: rtw89: debug: show large MRU in txpwr_table dbgfs
Date: Wed, 20 May 2026 20:38:22 +0800 [thread overview]
Message-ID: <20260520123823.1792954-7-pkshih@realtek.com> (raw)
In-Reply-To: <20260520123823.1792954-1-pkshih@realtek.com>
From: Zong-Zhe Yang <kevin_yang@realtek.com>
Read and print the CR settings of large MRU.
For now, only RTL8922D_CID7090 support it.
For example,
[TX power limit_large_mru]
RU484_242 1TX - IDX_0 IDX_1 IDX_2 IDX_3 | 17, 0, 0, 0, dBm
RU484_242 2TX - IDX_0 IDX_1 IDX_2 IDX_3 | 16, 0, 0, 0, dBm
RU996_484 1TX - IDX_0 IDX_1 | 0, 0, dBm
RU996_484 2TX - IDX_0 IDX_1 | 0, 0, dBm
RU996_484_242 1TX - IDX_0 IDX_1 | 0, 0, dBm
RU996_484_242 2TX - IDX_0 IDX_1 | 0, 0, dBm
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/debug.c | 76 ++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c
index 8ee800c76cfe..eb9106932187 100644
--- a/drivers/net/wireless/realtek/rtw89/debug.c
+++ b/drivers/net/wireless/realtek/rtw89/debug.c
@@ -767,6 +767,45 @@ static const struct txpwr_map __txpwr_map_lmt_ru_be = {
.addr_to_1ss = 0, /* not support */
};
+static const struct txpwr_ent __txpwr_ent_lmt_ru484_242_be[] = {
+ __GEN_TXPWR_ENT4("RU484_242 1TX ", "IDX_0 ", "IDX_1 ", "IDX_2 ", "IDX_3 "),
+ __GEN_TXPWR_ENT4("RU484_242 2TX ", "IDX_0 ", "IDX_1 ", "IDX_2 ", "IDX_3 "),
+};
+
+static const struct txpwr_map __txpwr_map_lmt_ru484_242_be = {
+ .ent = __txpwr_ent_lmt_ru484_242_be,
+ .size = ARRAY_SIZE(__txpwr_ent_lmt_ru484_242_be),
+ .addr_from = R_BE_TXAGC_MAX_1TX_RU484_242_0,
+ .addr_to = R_BE_TXAGC_MAX_1TX_RU484_242_0 + 4,
+ .addr_to_1ss = 0, /* not support */
+};
+
+static const struct txpwr_ent __txpwr_ent_lmt_ru996_484_be[] = {
+ __GEN_TXPWR_ENT2("RU996_484 1TX ", "IDX_0 ", "IDX_1 "),
+ __GEN_TXPWR_ENT2("RU996_484 2TX ", "IDX_0 ", "IDX_1 "),
+};
+
+static const struct txpwr_map __txpwr_map_lmt_ru996_484_be = {
+ .ent = __txpwr_ent_lmt_ru996_484_be,
+ .size = ARRAY_SIZE(__txpwr_ent_lmt_ru996_484_be),
+ .addr_from = R_BE_TXAGC_MAX_1TX_RU996_484_0,
+ .addr_to = R_BE_TXAGC_MAX_1TX_RU996_484_0,
+ .addr_to_1ss = 0, /* not support */
+};
+
+static const struct txpwr_ent __txpwr_ent_lmt_ru996_484_242_be[] = {
+ __GEN_TXPWR_ENT2("RU996_484_242 1TX ", "IDX_0 ", "IDX_1 "),
+ __GEN_TXPWR_ENT2("RU996_484_242 2TX ", "IDX_0 ", "IDX_1 "),
+};
+
+static const struct txpwr_map __txpwr_map_lmt_ru996_484_242_be = {
+ .ent = __txpwr_ent_lmt_ru996_484_242_be,
+ .size = ARRAY_SIZE(__txpwr_ent_lmt_ru996_484_242_be),
+ .addr_from = R_BE_TXAGC_MAX_1TX_RU996_484_242_0,
+ .addr_to = R_BE_TXAGC_MAX_1TX_RU996_484_242_0,
+ .addr_to_1ss = 0, /* not support */
+};
+
static unsigned int
__print_txpwr_ent(char *buf, size_t bufsz, const struct txpwr_ent *ent,
const s8 *bufp, const unsigned int cur, unsigned int *ate)
@@ -882,6 +921,9 @@ struct dbgfs_txpwr_table {
const struct txpwr_map *byr;
const struct txpwr_map *lmt;
const struct txpwr_map *lmt_ru;
+ const struct txpwr_map *lmt_ru484_242;
+ const struct txpwr_map *lmt_ru996_484;
+ const struct txpwr_map *lmt_ru996_484_242;
};
static const struct dbgfs_txpwr_table dbgfs_txpwr_table_ax = {
@@ -894,6 +936,9 @@ static const struct dbgfs_txpwr_table dbgfs_txpwr_table_be = {
.byr = &__txpwr_map_byr_be,
.lmt = &__txpwr_map_lmt_be,
.lmt_ru = &__txpwr_map_lmt_ru_be,
+ .lmt_ru484_242 = &__txpwr_map_lmt_ru484_242_be,
+ .lmt_ru996_484 = &__txpwr_map_lmt_ru996_484_be,
+ .lmt_ru996_484_242 = &__txpwr_map_lmt_ru996_484_242_be,
};
static const struct dbgfs_txpwr_table *dbgfs_txpwr_tables[RTW89_CHIP_GEN_NUM] = {
@@ -934,6 +979,8 @@ ssize_t rtw89_debug_priv_txpwr_table_get(struct rtw89_dev *rtwdev,
char *buf, size_t bufsz)
{
enum rtw89_chip_gen chip_gen = rtwdev->chip->chip_gen;
+ const struct rtw89_chip_info *chip = rtwdev->chip;
+ struct rtw89_hal *hal = &rtwdev->hal;
struct rtw89_sar_parm sar_parm = {};
const struct dbgfs_txpwr_table *tbl;
const struct rtw89_chan *chan;
@@ -979,6 +1026,35 @@ ssize_t rtw89_debug_priv_txpwr_table_get(struct rtw89_dev *rtwdev,
return n;
p += n;
+ switch (chip_gen) {
+ case RTW89_CHIP_AX:
+ goto out;
+ case RTW89_CHIP_BE:
+ if (!(chip->chip_id == RTL8922D && hal->cid == RTL8922D_CID7090))
+ goto out;
+ break;
+ default:
+ return -EOPNOTSUPP;
+ }
+
+ p += scnprintf(p, end - p, "\n[TX power limit_large_mru]\n");
+
+ n = __print_txpwr_map(rtwdev, p, end - p, tbl->lmt_ru484_242);
+ if (n < 0)
+ return n;
+ p += n;
+
+ n = __print_txpwr_map(rtwdev, p, end - p, tbl->lmt_ru996_484);
+ if (n < 0)
+ return n;
+ p += n;
+
+ n = __print_txpwr_map(rtwdev, p, end - p, tbl->lmt_ru996_484_242);
+ if (n < 0)
+ return n;
+ p += n;
+
+out:
return p - buf;
}
--
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 ` [PATCH rtw-next 3/7] wifi: rtw89: 8922d: support new digital power compensation format Ping-Ke Shih
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 ` Ping-Ke Shih [this message]
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-7-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