All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Jes Sorensen <Jes.Sorensen@gmail.com>,
	Andrea Merello <andrea.merello@gmail.com>,
	Taehee Yoo <ap420073@gmail.com>
Subject: Re: [PATCH v2 1/5] wifi: rtl8xxxu: Deduplicate the efuse dumping code
Date: Wed, 14 Dec 2022 13:23:32 +0200	[thread overview]
Message-ID: <1e366190-eb84-3cdb-6408-18dfa8da18c0@gmail.com> (raw)
In-Reply-To: <40b9a6949d22484493e49af0200ca65d@realtek.com>

On 14/12/2022 05:58, Ping-Ke Shih wrote:
> 
> 
>> -----Original Message-----
>> From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
>> Sent: Wednesday, December 14, 2022 1:27 AM
>> To: linux-wireless@vger.kernel.org
>> Cc: Jes Sorensen <Jes.Sorensen@gmail.com>; Ping-Ke Shih <pkshih@realtek.com>; Andrea Merello
>> <andrea.merello@gmail.com>; Taehee Yoo <ap420073@gmail.com>
>> Subject: [PATCH v2 1/5] wifi: rtl8xxxu: Deduplicate the efuse dumping code
>>
>> Every chip family except RTL8723AU has a copy of the efuse dumping
>> code. Remove this and dump the efuse from a single place using a new
>> function rtl8xxxu_dump_efuse().
>>
>> Also, use print_hex_dump() to print the efuse instead of a loop and
>> dev_info(). It shows the ASCII interpretation of the bytes, which is
>> nice.
>>
>> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
>> ---
>> v2:
>>  - Patch is new in v2.
>> ---
>>  .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 11 -----------
>>  .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192c.c | 10 ----------
>>  .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c |  9 ---------
>>  .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_8723b.c | 11 -----------
>>  .../net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c  | 14 ++++++++++++++
>>  5 files changed, 14 insertions(+), 41 deletions(-)
>>
> 
> [...]
> 
>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
>> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
>> index 3ed435401e57..827672ce953d 100644
>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
>> @@ -1813,6 +1813,17 @@ static int rtl8xxxu_read_efuse(struct rtl8xxxu_priv *priv)
>>  	return ret;
>>  }
>>
>> +static void rtl8xxxu_dump_efuse(struct rtl8xxxu_priv *priv)
>> +{
>> +	dev_info(&priv->udev->dev,
>> +		 "Dumping efuse for RTL%s (0x%02x bytes):\n",
>> +		 priv->chip_name, EFUSE_REAL_CONTENT_LEN_8723A);
>> +
>> +	print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1,
>> +		       priv->efuse_wifi.raw, EFUSE_REAL_CONTENT_LEN_8723A,
> 
> EFUSE_MAP_LEN seems to be more suitable, because:
> 
> 	union {
> 		u8 raw[EFUSE_MAP_LEN];
> 		...
> 	} efuse_wifi;
> 
> and, suffix _8723A is weird to me.
> 
Yes, that's better. I didn't notice EFUSE_MAP_LEN.

>> +		       true);
>> +}
>> +
>>  void rtl8xxxu_reset_8051(struct rtl8xxxu_priv *priv)
>>  {
>>  	u8 val8;
>> @@ -6839,6 +6850,9 @@ static int rtl8xxxu_probe(struct usb_interface *interface,
>>  		goto err_set_intfdata;
>>  	}
>>
>> +	if (rtl8xxxu_debug & RTL8XXXU_DEBUG_EFUSE)
>> +		rtl8xxxu_dump_efuse(priv);
>> +
>>  	rtl8xxxu_print_chipinfo(priv);
>>
>>  	ret = priv->fops->load_firmware(priv);
>> --
>> 2.38.0
>>
>> ------Please consider the environment before printing this e-mail.


      reply	other threads:[~2022-12-14 11:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 17:27 [PATCH v2 1/5] wifi: rtl8xxxu: Deduplicate the efuse dumping code Bitterblue Smith
2022-12-13 17:28 ` [PATCH v2 2/5] wifi: rtl8xxxu: Make rtl8xxxu_load_firmware take const char* Bitterblue Smith
2022-12-14  8:57   ` Ping-Ke Shih
2022-12-13 17:29 ` [PATCH v2 3/5] wifi: rtl8xxxu: Define masks for cck_agc_rpt bits Bitterblue Smith
2022-12-14  8:58   ` Ping-Ke Shih
2022-12-13 17:31 ` [PATCH v2 4/5] wifi: rtl8xxxu: Support new chip RTL8188EU Bitterblue Smith
2022-12-13 20:10   ` kernel test robot
2022-12-15 13:00   ` Ping-Ke Shih
2022-12-17 12:30     ` Bitterblue Smith
2022-12-13 17:33 ` [PATCH v2 5/5] wifi: rtl8xxxu: Add rate control code for RTL8188EU Bitterblue Smith
2022-12-14  8:07   ` kernel test robot
2022-12-15 13:14   ` Ping-Ke Shih
2022-12-17 12:43     ` Bitterblue Smith
2022-12-14  3:58 ` [PATCH v2 1/5] wifi: rtl8xxxu: Deduplicate the efuse dumping code Ping-Ke Shih
2022-12-14 11:23   ` Bitterblue Smith [this message]

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=1e366190-eb84-3cdb-6408-18dfa8da18c0@gmail.com \
    --to=rtl8821cerfe2@gmail.com \
    --cc=Jes.Sorensen@gmail.com \
    --cc=andrea.merello@gmail.com \
    --cc=ap420073@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    /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.