wifi: rtw88: Extend rtw_debugfs_get_tx_pwr_tbl() for RTL8814AU
JIRA: https://issues.redhat.com/browse/RHEL-89168 commit c374281f828545b3698cf936b584249c2f9e40c5 Author: Bitterblue Smith <rtl8821cerfe2@gmail.com> Date: Tue Feb 18 01:32:49 2025 +0200 wifi: rtw88: Extend rtw_debugfs_get_tx_pwr_tbl() for RTL8814AU 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> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/ea65a978-a735-4c97-af82-d7fe26f95da1@gmail.com Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
This commit is contained in:
parent
d3af8bfcbd
commit
b64d82ddfd
|
@ -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_hal *hal = &rtwdev->hal;
|
||||
u8 path, rate, bw, ch, regd;
|
||||
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;
|
||||
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,
|
||||
|
|
Loading…
Reference in New Issue