Search Linux Wireless

Re: [PATCH v2 1/3] wifi: rtl8xxxu: Move burst init to a function

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

 



On 07/11/2022 04:40, Ping-Ke Shih wrote:
> 
> 
>> -----Original Message-----
>> From: Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx>
>> Sent: Sunday, November 6, 2022 6:53 AM
>> To: linux-wireless@xxxxxxxxxxxxxxx
>> Cc: Jes Sorensen <Jes.Sorensen@xxxxxxxxx>
>> Subject: [PATCH v2 1/3] wifi: rtl8xxxu: Move burst init to a function
>>
>> No changes to functionality, just moving code to make
>> rtl8xxxu_init_device look nicer.
>>
>> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx>
>> ---
>> v2:
>>  - No change.
>> ---
>>  .../net/wireless/realtek/rtl8xxxu/rtl8xxxu.h  |  2 +
>>  .../realtek/rtl8xxxu/rtl8xxxu_8188f.c         |  1 +
>>  .../realtek/rtl8xxxu/rtl8xxxu_8723b.c         |  1 +
>>  .../wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 89 ++++++++++---------
>>  4 files changed, 52 insertions(+), 41 deletions(-)
>>
> 
> [...]
> 
>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
>> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
>> index 019f8ddd418b..282ad8a9b73d 100644
>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
>> @@ -3886,6 +3886,52 @@ static void rtl8xxxu_init_queue_reserved_page(struct rtl8xxxu_priv *priv)
>>  	rtl8xxxu_write32(priv, REG_RQPN, val32);
>>  }
>>
>> +void rtl8xxxu_init_burst(struct rtl8xxxu_priv *priv)
>> +{
>> +	u8 val8;
>> +
>> +	/*
>> +	 * For USB high speed set 512B packets
>> +	 */
>> +	val8 = rtl8xxxu_read8(priv, REG_RXDMA_PRO_8723B);
>> +	val8 &= ~(BIT(4) | BIT(5));
>> +	val8 |= BIT(4);
>> +	val8 |= BIT(1) | BIT(2) | BIT(3);
> 
> I think we can fix these magic numbers along with your patch.
> 
> #define DMA_MODE BIT(1)  // set 0x1
> #define DMA_BURST_CNT GENMASK(3, 2) // set 0x3
> #define DMA_BURST_SIZE GENMASK(5, 4) // set 0x1
> 

Thanks, but I think the bit definitions should be added in a separate patch,
which I will send soon. Same for the changes you suggested for patch 2/3.



[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