Search Linux Wireless

RE: [PATCH 11/11] rtw88: debug: dump tx power indexes in use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Subject: Re: [PATCH 11/11] rtw88: debug: dump tx power indexes in use
> 
> On Wed, 2019-05-29 at 15:54 +0800, yhchuang@xxxxxxxxxxx wrote:
> > From: Zong-Zhe Yang <kevin_yang@xxxxxxxxxxx>
> >
> > 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@xxxxxxxxxxx>
> > Signed-off-by: Yan-Hsuan Chuang <yhchuang@xxxxxxxxxxx>
> > ---
> >  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]);
> 

Ok, it is better.
Will send a v2 later :)
Thanks

Yan-Hsuan



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux