From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Subject: [PATCH v3 8/8] wifi: rtw88: Extend rtw_debugfs_get_tx_pwr_tbl() for RTL8814AU
Date: Tue, 18 Feb 2025 01:32:49 +0200 [thread overview]
Message-ID: <ea65a978-a735-4c97-af82-d7fe26f95da1@gmail.com> (raw)
In-Reply-To: <3908a496-d687-40fb-a1af-6add5c7e1dd4@gmail.com>
Make it print the TX power details for all RF paths, not just A and B,
and for all the rates supported by the chip, not just 1SS and 2SS
rates.
Also skip the RF paths and rates not supported by the chip.
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
---
v2:
- Print only information about the RF paths and spatial streams the
chip actually has.
v3:
- Add Acked-by.
---
drivers/net/wireless/realtek/rtw88/debug.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c
index 1adb03d1210a..b67d69b01f87 100644
--- a/drivers/net/wireless/realtek/rtw88/debug.c
+++ b/drivers/net/wireless/realtek/rtw88/debug.c
@@ -692,9 +692,11 @@ static int rtw_debugfs_get_tx_pwr_tbl(struct seq_file *m, void *v)
{
struct rtw_debugfs_priv *debugfs_priv = m->private;
struct rtw_dev *rtwdev = debugfs_priv->rtwdev;
+ struct rtw_power_params pwr_param = {0};
struct rtw_hal *hal = &rtwdev->hal;
+ u8 nss = rtwdev->efuse.hw_cap.nss;
u8 path, rate, bw, ch, regd;
- struct rtw_power_params pwr_param = {0};
+ u8 max_ht_rate, max_rate;
mutex_lock(&rtwdev->mutex);
bw = hal->current_band_width;
@@ -707,19 +709,23 @@ static int rtw_debugfs_get_tx_pwr_tbl(struct seq_file *m, void *v)
seq_printf(m, "%-4s %-10s %-9s %-9s (%-4s %-4s %-4s) %-4s\n",
"path", "rate", "pwr", "base", "byr", "lmt", "sar", "rem");
+ max_ht_rate = DESC_RATEMCS0 + nss * 8 - 1;
+
+ if (rtwdev->chip->vht_supported)
+ max_rate = DESC_RATEVHT1SS_MCS0 + nss * 10 - 1;
+ else
+ max_rate = max_ht_rate;
+
mutex_lock(&hal->tx_power_mutex);
- for (path = RF_PATH_A; path <= RF_PATH_B; path++) {
+ for (path = RF_PATH_A; path < hal->rf_path_num; path++) {
/* there is no CCK rates used in 5G */
if (hal->current_band_type == RTW_BAND_5G)
rate = DESC_RATE6M;
else
rate = DESC_RATE1M;
- /* now, not support vht 3ss and vht 4ss*/
- for (; rate <= DESC_RATEVHT2SS_MCS9; rate++) {
- /* now, not support ht 3ss and ht 4ss*/
- if (rate > DESC_RATEMCS15 &&
- rate < DESC_RATEVHT1SS_MCS0)
+ for (; rate <= max_rate; rate++) {
+ if (rate > max_ht_rate && rate <= DESC_RATEMCS31)
continue;
rtw_get_tx_power_params(rtwdev, path, rate, bw,
--
2.48.1
prev parent reply other threads:[~2025-02-17 23:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 23:27 [PATCH v3 0/8] wifi: rtw88: Prepare to support RTL8814AU (part 2/2) Bitterblue Smith
2025-02-17 23:28 ` [PATCH v3 1/8] wifi: rtw88: Fix rtw_mac_power_switch() for RTL8814AU Bitterblue Smith
2025-02-21 2:11 ` Ping-Ke Shih
2025-02-17 23:29 ` [PATCH v3 2/8] wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31 Bitterblue Smith
2025-02-18 0:12 ` Ping-Ke Shih
2025-02-17 23:30 ` [PATCH v3 3/8] wifi: rtw88: Fix rtw_init_ht_cap() for RTL8814AU Bitterblue Smith
2025-02-17 23:30 ` [PATCH v3 4/8] wifi: rtw88: Fix rtw_init_vht_cap() " Bitterblue Smith
2025-02-17 23:31 ` [PATCH v3 5/8] wifi: rtw88: Fix rtw_rx_phy_stat() " Bitterblue Smith
2025-02-17 23:31 ` [PATCH v3 6/8] wifi: rtw88: Extend rtw_phy_config_swing_table() " Bitterblue Smith
2025-02-17 23:32 ` [PATCH v3 7/8] wifi: rtw88: Extend rtw_debugfs_get_phy_info() " Bitterblue Smith
2025-02-17 23:32 ` Bitterblue Smith [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=ea65a978-a735-4c97-af82-d7fe26f95da1@gmail.com \
--to=rtl8821cerfe2@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.