2023-01-10 15:49:07

by Bitterblue Smith

[permalink] [raw]
Subject: [PATCH 1/2] wifi: rtl8xxxu: Print the ROM version too

Make rtl8xxxu_print_chipinfo() print the ROM version. This is relevant
at least for the RTL8723AU and possibly relevant for the RTL8710BU.

Signed-off-by: Bitterblue Smith <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index fd97c040948a..d521435e1c07 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -1582,10 +1582,11 @@ static void rtl8xxxu_print_chipinfo(struct rtl8xxxu_priv *priv)
cut = 'A' + priv->chip_cut;

dev_info(dev,
- "RTL%s rev %c (%s) %iT%iR, TX queues %i, WiFi=%i, BT=%i, GPS=%i, HI PA=%i\n",
- priv->chip_name, cut, priv->chip_vendor, priv->tx_paths,
- priv->rx_paths, priv->ep_tx_count, priv->has_wifi,
- priv->has_bluetooth, priv->has_gps, priv->hi_pa);
+ "RTL%s rev %c (%s) romver %d, %iT%iR, TX queues %i, WiFi=%i, BT=%i, GPS=%i, HI PA=%i\n",
+ priv->chip_name, cut, priv->chip_vendor, priv->rom_rev,
+ priv->tx_paths, priv->rx_paths, priv->ep_tx_count,
+ priv->has_wifi, priv->has_bluetooth, priv->has_gps,
+ priv->hi_pa);

dev_info(dev, "RTL%s MAC: %pM\n", priv->chip_name, priv->mac_addr);
}
--
2.38.0


2023-01-10 15:49:56

by Bitterblue Smith

[permalink] [raw]
Subject: [PATCH 2/2] wifi: rtl8xxxu: Dump the efuse only for untested devices

It appears this was the intention all along, but commit 3307d84024d2
("rtl8xxxu: Add initial code to parse rtl8192eu efuse") initialised
rtl8xxxu_debug with RTL8XXXU_DEBUG_EFUSE for no apparent reason, which
made it dump the efuse for all devices, even the tested ones.

Signed-off-by: Bitterblue Smith <[email protected]>
---
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index d521435e1c07..07c3af5d0374 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -34,7 +34,7 @@

#define DRIVER_NAME "rtl8xxxu"

-int rtl8xxxu_debug = RTL8XXXU_DEBUG_EFUSE;
+int rtl8xxxu_debug;
static bool rtl8xxxu_ht40_2g;
static bool rtl8xxxu_dma_aggregation;
static int rtl8xxxu_dma_agg_timeout = -1;
--
2.38.0

2023-01-11 01:35:22

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: [PATCH 1/2] wifi: rtl8xxxu: Print the ROM version too



> -----Original Message-----
> From: Bitterblue Smith <[email protected]>
> Sent: Tuesday, January 10, 2023 11:42 PM
> To: [email protected]
> Cc: Jes Sorensen <[email protected]>; Ping-Ke Shih <[email protected]>
> Subject: [PATCH 1/2] wifi: rtl8xxxu: Print the ROM version too
>
> Make rtl8xxxu_print_chipinfo() print the ROM version. This is relevant
> at least for the RTL8723AU and possibly relevant for the RTL8710BU.
>
> Signed-off-by: Bitterblue Smith <[email protected]>

Reviewed-by: Ping-Ke Shih <[email protected]>

> ---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index fd97c040948a..d521435e1c07 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -1582,10 +1582,11 @@ static void rtl8xxxu_print_chipinfo(struct rtl8xxxu_priv *priv)
> cut = 'A' + priv->chip_cut;
>
> dev_info(dev,
> - "RTL%s rev %c (%s) %iT%iR, TX queues %i, WiFi=%i, BT=%i, GPS=%i, HI PA=%i\n",
> - priv->chip_name, cut, priv->chip_vendor, priv->tx_paths,
> - priv->rx_paths, priv->ep_tx_count, priv->has_wifi,
> - priv->has_bluetooth, priv->has_gps, priv->hi_pa);
> + "RTL%s rev %c (%s) romver %d, %iT%iR, TX queues %i, WiFi=%i, BT=%i, GPS=%i, HI PA=%i\n",
> + priv->chip_name, cut, priv->chip_vendor, priv->rom_rev,
> + priv->tx_paths, priv->rx_paths, priv->ep_tx_count,
> + priv->has_wifi, priv->has_bluetooth, priv->has_gps,
> + priv->hi_pa);
>
> dev_info(dev, "RTL%s MAC: %pM\n", priv->chip_name, priv->mac_addr);
> }
> --
> 2.38.0
>
> ------Please consider the environment before printing this e-mail.

2023-01-11 01:36:56

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: [PATCH 2/2] wifi: rtl8xxxu: Dump the efuse only for untested devices


> -----Original Message-----
> From: Bitterblue Smith <[email protected]>
> Sent: Tuesday, January 10, 2023 11:43 PM
> To: [email protected]
> Cc: Jes Sorensen <[email protected]>; Ping-Ke Shih <[email protected]>
> Subject: [PATCH 2/2] wifi: rtl8xxxu: Dump the efuse only for untested devices

From the content of this patch, I don't know why "only for untested devices",
so I dig the code and find rtl8xxxu_debug could be changed at usb_probe().
Not sure if it is worth to write into commit message, but I think this information
is helpful for other reviewers.

>
> It appears this was the intention all along, but commit 3307d84024d2
> ("rtl8xxxu: Add initial code to parse rtl8192eu efuse") initialised
> rtl8xxxu_debug with RTL8XXXU_DEBUG_EFUSE for no apparent reason, which
> made it dump the efuse for all devices, even the tested ones.
>
> Signed-off-by: Bitterblue Smith <[email protected]>

Reviewed-by: Ping-Ke Shih <[email protected]>

> ---
> drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index d521435e1c07..07c3af5d0374 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -34,7 +34,7 @@
>
> #define DRIVER_NAME "rtl8xxxu"
>
> -int rtl8xxxu_debug = RTL8XXXU_DEBUG_EFUSE;
> +int rtl8xxxu_debug;
> static bool rtl8xxxu_ht40_2g;
> static bool rtl8xxxu_dma_aggregation;
> static int rtl8xxxu_dma_agg_timeout = -1;
> --
> 2.38.0
>
> ------Please consider the environment before printing this e-mail.

2023-01-16 16:40:53

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 1/2] wifi: rtl8xxxu: Print the ROM version too

Bitterblue Smith <[email protected]> wrote:

> Make rtl8xxxu_print_chipinfo() print the ROM version. This is relevant
> at least for the RTL8723AU and possibly relevant for the RTL8710BU.
>
> Signed-off-by: Bitterblue Smith <[email protected]>
> Reviewed-by: Ping-Ke Shih <[email protected]>

2 patches applied to wireless-next.git, thanks.

aa1a49268951 wifi: rtl8xxxu: Print the ROM version too
de7d0ff301fc wifi: rtl8xxxu: Dump the efuse only for untested devices

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches