Search Linux Wireless

Re: [PATCH v2 1/5] wifi: rtl8xxxu: Deduplicate the efuse dumping code

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

 



On 14/12/2022 05:58, Ping-Ke Shih wrote:
> 
> 
>> -----Original Message-----
>> From: Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx>
>> Sent: Wednesday, December 14, 2022 1:27 AM
>> To: linux-wireless@xxxxxxxxxxxxxxx
>> Cc: Jes Sorensen <Jes.Sorensen@xxxxxxxxx>; Ping-Ke Shih <pkshih@xxxxxxxxxxx>; Andrea Merello
>> <andrea.merello@xxxxxxxxx>; Taehee Yoo <ap420073@xxxxxxxxx>
>> 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@xxxxxxxxx>
>> ---
>> 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.




[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