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 v2 1/4] rtw89: fill regd field of limit/limit_ru tables by enum
Date: Wed, 3 Nov 2021 01:24:03 +0000 [thread overview]
Message-ID: <fa8da20fa061418089571e2fcbc84b1e@realtek.com> (raw)
In-Reply-To: <YYCdQwCo3E8hH4c3@google.com>
> -----Original Message-----
> From: Brian Norris <briannorris@chromium.org>
> Sent: Tuesday, November 2, 2021 10:07 AM
> To: Pkshih <pkshih@realtek.com>
> Cc: kvalo@codeaurora.org; linux-wireless@vger.kernel.org; Kevin Yang <kevin_yang@realtek.com>
> Subject: Re: [PATCH v2 1/4] rtw89: fill regd field of limit/limit_ru tables by enum
>
> On Mon, Nov 01, 2021 at 05:31:03PM +0800, Ping-Ke Shih wrote:
> > From: Zong-Zhe Yang <kevin_yang@realtek.com>
> >
> > This modification just replaces the number filled in the regd field
> > with the corresponding enum. No assignment of a value in a table is
> > changed. Doing this first is because the follow-up patches may adjust
> > the order of enum declarations.
> >
> > Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
> > Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> > ---
> > .../wireless/realtek/rtw89/rtw8852a_table.c | 10458 ++++++++--------
> > 1 file changed, 5229 insertions(+), 5229 deletions(-)
> >
> > diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852a_table.c
> b/drivers/net/wireless/realtek/rtw89/rtw8852a_table.c
> > index 3a4fe7207420..c7ebeed043c5 100644
> > --- a/drivers/net/wireless/realtek/rtw89/rtw8852a_table.c
> > +++ b/drivers/net/wireless/realtek/rtw89/rtw8852a_table.c
> > @@ -43384,5248 +43384,5248 @@ static const u8 _txpwr_track_delta_swingidx_2g_cck_a_p[] = {
> > const s8 rtw89_8852a_txpwr_lmt_2g[RTW89_2G_BW_NUM][RTW89_NTX_NUM]
> > [RTW89_RS_LMT_NUM][RTW89_BF_NUM]
> > [RTW89_REGD_NUM][RTW89_2G_CH_NUM] = {
> > - [0][0][0][0][0][0] = 56,
>
> FWIW, these transformations worked out for me:
>
> Reviewed-by: Brian Norris <briannorris@chromium.org>
>
> These files are still enormous though, which an enormous amount of
> repetition. I can't help but think there's a better way to do these
> things. For instance, if there's a repeated/shared pattern, one could
> just save that array once, and generate the repeated copies at runtime.
> Or instead of exposing an enormous const array directly to the "core",
> add some kind of abstraction function, where the function can perform
> more custom (and presumably more targeted, with less duplication?) logic
> to determine the answer.
>
Our RF team measure the combinations of output power one by one for each
regulatory domain, so I think there is no a rule or pattern to generate
one from another one.
More, if we convert it to a reduced table and use the table, it will
be hard to align with our internal tables. Even, it becomes harder
to understand the patch if we "compress" the table in some ways.
I will discuss with our RF team if we can have any improvement of the size,
but still readable.
--
Ping-Ke
next prev parent reply other threads:[~2021-11-03 1:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 9:31 [PATCH v2 0/4] rtw89: update power limit and regulatory map tables Ping-Ke Shih
2021-11-01 9:31 ` [PATCH v2 1/4] rtw89: fill regd field of limit/limit_ru tables by enum Ping-Ke Shih
2021-11-02 2:06 ` Brian Norris
2021-11-03 1:24 ` Pkshih [this message]
2021-11-26 16:10 ` Kalle Valo
2021-11-01 9:31 ` [PATCH v2 2/4] rtw89: update rtw89 regulation definition to R58-R31 Ping-Ke Shih
2021-11-01 9:31 ` [PATCH v2 3/4] rtw89: update tx power limit/limit_ru tables to R54 Ping-Ke Shih
2021-11-01 9:31 ` [PATCH v2 4/4] rtw89: update rtw89_regulatory map to R58-R31 Ping-Ke Shih
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=fa8da20fa061418089571e2fcbc84b1e@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.