Search Linux Wireless

Re: [PATCH 1/2] rtw89: update tx power limit/limit_ru tables to R54

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

 



Hi,

On Thu, Oct 28, 2021 at 04:40:53PM +0800, Ping-Ke Shih wrote:
> From: Zong-Zhe Yang <kevin_yang@xxxxxxxxxxx>
> 
> 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@xxxxxxxxxxx>
> Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
> ---
>  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.

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