linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: yhchuang@realtek.com, kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 11/11] rtw88: debug: dump tx power indexes in use
Date: Sat, 01 Jun 2019 15:51:43 -0700	[thread overview]
Message-ID: <39d56df83cc8de95969c6ba3003d8101caedc045.camel@perches.com> (raw)
In-Reply-To: <1559116487-5244-12-git-send-email-yhchuang@realtek.com>

On Wed, 2019-05-29 at 15:54 +0800, yhchuang@realtek.com wrote:
> From: Zong-Zhe Yang <kevin_yang@realtek.com>
> 
> Add a read entry in debugfs to dump current tx power
> indexes in use for each path and each rate section.
> The corresponding power bases, power by rate, and
> power limit are also included.
> 
> Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
> Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
> ---
>  drivers/net/wireless/realtek/rtw88/debug.c | 112 +++++++++++++++++++++++++++++
>  1 file changed, 112 insertions(+)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c
> index f0ae260..ee2937c2 100644
> --- a/drivers/net/wireless/realtek/rtw88/debug.c
> +++ b/drivers/net/wireless/realtek/rtw88/debug.c
> @@ -8,6 +8,7 @@
>  #include "sec.h"
>  #include "fw.h"
>  #include "debug.h"
> +#include "phy.h"
>  
>  #ifdef CONFIG_RTW88_DEBUGFS
>  
> @@ -460,6 +461,112 @@ static int rtw_debug_get_rf_dump(struct seq_file *m, void *v)
>  	return 0;
>  }
>  
> +static void rtw_print_cck_rate_txt(struct seq_file *m, u8 rate)
> +{
> +	static const char * const
> +	cck_rate[] = {"1M", "2M", "5.5M", "11M"};
> +	u8 idx = rate - DESC_RATE1M;
> +
> +	seq_printf(m, "%5s%-5s", "CCK_", cck_rate[idx]);

Why use %5s instead of just embedding the prefix directly?
Also why use %5s at all when the length is 4?

I think it'd be more sensible as:

	seq_printf(m, " CCK_%-5s", cck_rate[idx]);

> +}
> +
> +static void rtw_print_ofdm_rate_txt(struct seq_file *m, u8 rate)
> +{
> +	static const char * const
> +	ofdm_rate[] = {"6M", "9M", "12M", "18M", "24M", "36M", "48M", "54M"};
> +	u8 idx = rate - DESC_RATE6M;
> +
> +	seq_printf(m, "%6s%-4s", "OFDM_", ofdm_rate[idx]);

here too

> +}
> +
> +static void rtw_print_ht_rate_txt(struct seq_file *m, u8 rate)
> +{
> +	u8 mcs_n = rate - DESC_RATEMCS0;
> +
> +	seq_printf(m, "%4s%-6u", "MCS", mcs_n);

and here, etc...




  reply	other threads:[~2019-06-01 22:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29  7:54 [PATCH 00/11] rtw88: power index setting routine updates and fixes yhchuang
2019-05-29  7:54 ` [PATCH 01/11] rtw88: resolve order of tx power setting routines yhchuang
2019-05-29 15:16   ` Larry Finger
2019-05-30  2:29     ` Tony Chuang
2019-05-30  2:57       ` Larry Finger
2019-05-30  4:59       ` Kalle Valo
2019-05-30  5:05         ` Tony Chuang
2019-05-30  5:11           ` Kalle Valo
2019-05-30  5:15             ` Tony Chuang
2019-06-27 17:27   ` Kalle Valo
2019-05-29  7:54 ` [PATCH 02/11] rtw88: do not use (void *) as argument yhchuang
2019-05-29  7:54 ` [PATCH 03/11] rtw88: unify prefixes for tx power setting routine yhchuang
2019-05-29  7:54 ` [PATCH 04/11] rtw88: remove unused variable yhchuang
2019-05-29  7:54 ` [PATCH 05/11] rtw88: fix incorrect tx power limit at 5G yhchuang
2019-05-29  7:54 ` [PATCH 06/11] rtw88: choose the lowest as world-wide power limit yhchuang
2019-05-29  7:54 ` [PATCH 07/11] rtw88: correct power limit selection yhchuang
2019-05-29  7:54 ` [PATCH 08/11] rtw88: update tx power limit table to RF v20 yhchuang
2019-05-29  7:54 ` [PATCH 09/11] rtw88: remove all RTW_MAX_POWER_INDEX macro yhchuang
2019-07-11 22:05   ` Brian Norris
2019-07-16  8:15     ` Tony Chuang
2019-05-29  7:54 ` [PATCH 10/11] rtw88: refine flow to get tx power index yhchuang
2019-05-29  7:54 ` [PATCH 11/11] rtw88: debug: dump tx power indexes in use yhchuang
2019-06-01 22:51   ` Joe Perches [this message]
2019-06-04  8:18     ` Tony Chuang
2019-06-11 10:07 ` [PATCH 00/11] rtw88: power index setting routine updates and fixes Tony Chuang
2019-06-11 13:39   ` Kalle Valo

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=39d56df83cc8de95969c6ba3003d8101caedc045.camel@perches.com \
    --to=joe@perches.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=yhchuang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).