diff mbox series

[8/8] wifi: rtw88: Extend rtw_debugfs_get_tx_pwr_tbl() for RTL8814AU

Message ID 6bb6443a-3e2a-4cd4-83b9-34d2eb235654@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Ping-Ke Shih
Headers show
Series wifi: rtw88: Prepare to support RTL8814AU (part 2/2) | expand

Commit Message

Bitterblue Smith Feb. 11, 2025, 10:26 p.m. UTC
Make it print the TX power details for RF paths C and D, and for 3SS and
4SS rates.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
 drivers/net/wireless/realtek/rtw88/debug.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Ping-Ke Shih Feb. 13, 2025, 7:52 a.m. UTC | #1
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> Make it print the TX power details for RF paths C and D, and for 3SS and
> 4SS rates.
> 
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> ---
>  drivers/net/wireless/realtek/rtw88/debug.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c
> index 1adb03d1210a..0efb5c19b90e 100644
> --- a/drivers/net/wireless/realtek/rtw88/debug.c
> +++ b/drivers/net/wireless/realtek/rtw88/debug.c
> @@ -708,20 +708,14 @@ static int rtw_debugfs_get_tx_pwr_tbl(struct seq_file *m, void *v)
>                    "path", "rate", "pwr", "base", "byr", "lmt", "sar", "rem");
> 
>         mutex_lock(&hal->tx_power_mutex);
> -       for (path = RF_PATH_A; path <= RF_PATH_B; path++) {
> +       for (path = RF_PATH_A; path <= RF_PATH_D; path++) {

Can we limit path and rate by efuse->hw_cap.nss or rf_path?
Only showing two paths and 2SS rate for 2SS chips would avoid confusing. 

>                 /* 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)
> -                               continue;
> -
> +               for (; rate <= DESC_RATEVHT4SS_MCS9; rate++) {
>                         rtw_get_tx_power_params(rtwdev, path, rate, bw,
>                                                 ch, regd, &pwr_param);
> 
> --
> 2.48.1
Bitterblue Smith Feb. 13, 2025, 4:13 p.m. UTC | #2
On 13/02/2025 09:52, Ping-Ke Shih wrote:
> Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
>> Make it print the TX power details for RF paths C and D, and for 3SS and
>> 4SS rates.
>>
>> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
>> ---
>>  drivers/net/wireless/realtek/rtw88/debug.c | 10 ++--------
>>  1 file changed, 2 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c
>> index 1adb03d1210a..0efb5c19b90e 100644
>> --- a/drivers/net/wireless/realtek/rtw88/debug.c
>> +++ b/drivers/net/wireless/realtek/rtw88/debug.c
>> @@ -708,20 +708,14 @@ static int rtw_debugfs_get_tx_pwr_tbl(struct seq_file *m, void *v)
>>                    "path", "rate", "pwr", "base", "byr", "lmt", "sar", "rem");
>>
>>         mutex_lock(&hal->tx_power_mutex);
>> -       for (path = RF_PATH_A; path <= RF_PATH_B; path++) {
>> +       for (path = RF_PATH_A; path <= RF_PATH_D; path++) {
> 
> Can we limit path and rate by efuse->hw_cap.nss or rf_path?
> Only showing two paths and 2SS rate for 2SS chips would avoid confusing. 
> 

Oh, right. That is a lot of unnecessary output with the 1SS and 2SS chips.

>>                 /* 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)
>> -                               continue;
>> -
>> +               for (; rate <= DESC_RATEVHT4SS_MCS9; rate++) {
>>                         rtw_get_tx_power_params(rtwdev, path, rate, bw,
>>                                                 ch, regd, &pwr_param);
>>
>> --
>> 2.48.1
>
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c
index 1adb03d1210a..0efb5c19b90e 100644
--- a/drivers/net/wireless/realtek/rtw88/debug.c
+++ b/drivers/net/wireless/realtek/rtw88/debug.c
@@ -708,20 +708,14 @@  static int rtw_debugfs_get_tx_pwr_tbl(struct seq_file *m, void *v)
 		   "path", "rate", "pwr", "base", "byr", "lmt", "sar", "rem");
 
 	mutex_lock(&hal->tx_power_mutex);
-	for (path = RF_PATH_A; path <= RF_PATH_B; path++) {
+	for (path = RF_PATH_A; path <= RF_PATH_D; 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)
-				continue;
-
+		for (; rate <= DESC_RATEVHT4SS_MCS9; rate++) {
 			rtw_get_tx_power_params(rtwdev, path, rate, bw,
 						ch, regd, &pwr_param);