Search Linux Wireless

RE: [PATCH v5 01/11] wifi: rtlwifi: Add rtl8192du/table.{c,h}

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

 



Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> wrote:
> These contain the MAC, BB, RF, and AGC initialisation tables for
> RTL8192DU.
> 
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx>
> ---
> v5:
>  - No change.
> 
> v4:
>  - Fix table.h header guard.
>  - Make the arrays static const and add accessor functions as suggested
>    by Jeff Johnson.
> 
> v3:
>  - No change.
> 
> v2:
>  - Patch is new in v2, split from patch 3/3 in v1.
> ---
>  .../realtek/rtlwifi/rtl8192du/table.c         | 1725 +++++++++++++++++
>  .../realtek/rtlwifi/rtl8192du/table.h         |   29 +
>  2 files changed, 1754 insertions(+)
>  create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/table.c
>  create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/table.h
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/table.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/table.c
> new file mode 100644
> index 000000000000..efc96db55057
> --- /dev/null
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/table.c
> @@ -0,0 +1,1725 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/* Copyright(c) 2009-2012  Realtek Corporation.*/

The year should be 2024.

> +
> +#include <linux/types.h>
> +
> +#include "table.h"
> +
> +static const u32 rtl8192du_phy_reg_2tarray[PHY_REG_2T_ARRAYLENGTH] = {
> +       0x800, 0x80040002,
> +       0x804, 0x00000003,

[...]

> +       0xf4c, 0x00000004,
> +       0xf00, 0x00000300,
> +};
> +
> +const u32 *rtl8192du_get_phy_reg_2tarray(void)
> +{
> +       return rtl8192du_phy_reg_2tarray;
> +}

Change 'static const u32' array to 'const u32', and then you don't need this
get-helper function. Instead, 'extern const u32' in header file. Please
apply this rule to all arrays. 

[...]

> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/table.h
> b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/table.h
> new file mode 100644
> index 000000000000..95e0367abb5a
> --- /dev/null
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/table.h
> @@ -0,0 +1,29 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/* Copyright(c) 2009-2012  Realtek Corporation.*/

Copyright year. 

> +
> +#ifndef __RTL92DU_TABLE_H__
> +#define __RTL92DU_TABLE_H__
> +
> +#define PHY_REG_2T_ARRAYLENGTH 372
> +#define PHY_REG_ARRAY_PG_LENGTH 624
> +#define RADIOA_2T_ARRAYLENGTH 378
> +#define RADIOB_2T_ARRAYLENGTH 384
> +#define RADIOA_2T_INT_PA_ARRAYLENGTH 378
> +#define RADIOB_2T_INT_PA_ARRAYLENGTH 384
> +#define MAC_2T_ARRAYLENGTH 192
> +#define AGCTAB_ARRAYLENGTH 386
> +#define AGCTAB_5G_ARRAYLENGTH 194
> +#define AGCTAB_2G_ARRAYLENGTH 194
> +
> +const u32 *rtl8192du_get_phy_reg_2tarray(void);
> +const u32 *rtl8192du_get_phy_reg_array_pg(void);
> +const u32 *rtl8192du_get_radioa_2tarray(void);
> +const u32 *rtl8192du_get_radiob_2tarray(void);
> +const u32 *rtl8192du_get_radioa_2t_int_paarray(void);
> +const u32 *rtl8192du_get_radiob_2t_int_paarray(void);
> +const u32 *rtl8192du_get_mac_2tarray(void);
> +const u32 *rtl8192du_get_agctab_array(void);
> +const u32 *rtl8192du_get_agctab_5garray(void);
> +const u32 *rtl8192du_get_agctab_2garray(void);

As comments above, please
  extern const u32 xxxx[]; 

> +
> +#endif
> --
> 2.44.0





[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