From: Pkshih <pkshih@realtek.com>
To: Brian Norris <briannorris@chromium.org>
Cc: "kvalo@codeaurora.org" <kvalo@codeaurora.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Kevin Yang <kevin_yang@realtek.com>
Subject: RE: [PATCH 1/2] rtw89: update tx power limit/limit_ru tables to R54
Date: Fri, 29 Oct 2021 01:30:34 +0000 [thread overview]
Message-ID: <cbbc33c377be42c18b850d0322ad22af@realtek.com> (raw)
In-Reply-To: <YXsW2K1BWQjX1w4x@google.com>
> -----Original Message-----
> From: Brian Norris <briannorris@chromium.org>
> Sent: Friday, October 29, 2021 5:32 AM
> To: Pkshih <pkshih@realtek.com>
> Cc: kvalo@codeaurora.org; linux-wireless@vger.kernel.org; Kevin Yang <kevin_yang@realtek.com>
> Subject: Re: [PATCH 1/2] rtw89: update tx power limit/limit_ru tables to R54
>
> Hi,
>
> On Thu, Oct 28, 2021 at 04:40:53PM +0800, Ping-Ke Shih wrote:
> > From: Zong-Zhe Yang <kevin_yang@realtek.com>
> >
> > Support QATAR in rtw89_regulation_type and reorder the enum.
> > Update tx power limit table and tx power limit_ru table to configure QATAR
> > and adjust indexes to align rtw89_regulation_type enum.
> >
> > Besides, if an unassigned entry of limit/limit_ru tables is read,
> > return the corresponding WW value for the unconfigured case.
> >
> > Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
> > Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> > ---
> > drivers/net/wireless/realtek/rtw89/core.h | 9 +-
> > drivers/net/wireless/realtek/rtw89/phy.c | 12 +
> > .../wireless/realtek/rtw89/rtw8852a_table.c | 5199 +++++++++++------
> > 3 files changed, 3488 insertions(+), 1732 deletions(-)
> >
> > diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h
> > index c2885e4dd882..3729abda04f9 100644
> > --- a/drivers/net/wireless/realtek/rtw89/core.h
> > +++ b/drivers/net/wireless/realtek/rtw89/core.h
> > @@ -411,12 +411,13 @@ enum rtw89_regulation_type {
> > RTW89_NA = 4,
> > RTW89_IC = 5,
> > RTW89_KCC = 6,
> > - RTW89_NCC = 7,
> > - RTW89_CHILE = 8,
> > - RTW89_ACMA = 9,
> > - RTW89_MEXICO = 10,
> > + RTW89_ACMA = 7,
> > + RTW89_NCC = 8,
> > + RTW89_MEXICO = 9,
> > + RTW89_CHILE = 10,
> > RTW89_UKRAINE = 11,
> > RTW89_CN = 12,
> > + RTW89_QATAR = 13,
> > RTW89_REGD_NUM,
> > };
> >
> > diff --git a/drivers/net/wireless/realtek/rtw89/phy.c b/drivers/net/wireless/realtek/rtw89/phy.c
> > index ab134856baac..0620ef02e275 100644
> > --- a/drivers/net/wireless/realtek/rtw89/phy.c
> > +++ b/drivers/net/wireless/realtek/rtw89/phy.c
>
> > diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852a_table.c
> b/drivers/net/wireless/realtek/rtw89/rtw8852a_table.c
> > index 3a4fe7207420..6a61549ffac7 100644
> > --- a/drivers/net/wireless/realtek/rtw89/rtw8852a_table.c
> > +++ b/drivers/net/wireless/realtek/rtw89/rtw8852a_table.c
> > @@ -43556,1346 +43556,1850 @@ const s8 rtw89_8852a_txpwr_lmt_2g[RTW89_2G_BW_NUM][RTW89_NTX_NUM]
> > [0][0][0][0][1][0] = 56,
> > [0][0][0][0][3][0] = 68,
> > [0][0][0][0][5][0] = 76,
> > - [0][0][0][0][6][0] = 56,
> > - [0][0][0][0][9][0] = 56,
> > - [0][0][0][0][8][0] = 60,
> > + [0][0][0][0][6][0] = 76,
> > + [0][0][0][0][7][0] = 56,
> > + [0][0][0][0][10][0] = 60,
> ...
>
> If one of these colums is based on an enum, you should probably *use*
> the enum in the table. Then this patch would probably much much smaller,
> and it would be clear what parts are changes and what parts are just
> renumbering...
>
> I'd suggest splitting this into at least one more patch, where the first
> patch should replace all the magic numbers (0..12) with the appropriate
> rtw89_regulation_type values.
>
Got it.
Thanks for the suggestion. We'll do it.
--
Ping-Ke
prev parent reply other threads:[~2021-10-29 1:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-28 8:40 [PATCH 1/2] rtw89: update tx power limit/limit_ru tables to R54 Ping-Ke Shih
2021-10-28 8:40 ` [PATCH 2/2] rtw89: update rtw89_regulatory map to R58-R31 Ping-Ke Shih
2021-10-28 21:32 ` [PATCH 1/2] rtw89: update tx power limit/limit_ru tables to R54 Brian Norris
2021-10-29 1:30 ` Pkshih [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=cbbc33c377be42c18b850d0322ad22af@realtek.com \
--to=pkshih@realtek.com \
--cc=briannorris@chromium.org \
--cc=kevin_yang@realtek.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
/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