Search Linux Wireless

Re: [PATCH v2 1/4] rtw89: fill regd field of limit/limit_ru tables by enum

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

 



On Mon, Nov 01, 2021 at 05:31:03PM +0800, Ping-Ke Shih wrote:
> From: Zong-Zhe Yang <kevin_yang@xxxxxxxxxxx>
> 
> 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@xxxxxxxxxxx>
> Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
> ---
>  .../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@xxxxxxxxxxxx>

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.

But that's food for thought for the future.

Brian



[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