netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
@ 2022-12-17  3:06 Jun ASAKA
  2022-12-20  5:44 ` Ping-Ke Shih
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Jun ASAKA @ 2022-12-17  3:06 UTC (permalink / raw)
  To: Jes.Sorensen
  Cc: kvalo, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
	linux-kernel, Jun ASAKA

Fixing transmission failure which results in
"authentication with ... timed out". This can be
fixed by disable the REG_TXPAUSE.

Signed-off-by: Jun ASAKA <JunASAKA@zzy040330.moe>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
index a7d76693c02d..9d0ed6760cb6 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
@@ -1744,6 +1744,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv)
 	val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
 	val8 &= ~BIT(0);
 	rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
+
+	/*
+	 * Fix transmission failure of rtl8192e.
+	 */
+	rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
 }
 
 static s8 rtl8192e_cck_rssi(struct rtl8xxxu_priv *priv, u8 cck_agc_rpt)
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* RE: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  2022-12-17  3:06 [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu Jun ASAKA
@ 2022-12-20  5:44 ` Ping-Ke Shih
  2022-12-20  6:02   ` Jun ASAKA
  2022-12-20 13:03   ` Bitterblue Smith
  2022-12-21 18:52 ` Kalle Valo
  2023-01-07 14:17 ` Bitterblue Smith
  2 siblings, 2 replies; 12+ messages in thread
From: Ping-Ke Shih @ 2022-12-20  5:44 UTC (permalink / raw)
  To: Jun ASAKA, Jes.Sorensen
  Cc: kvalo, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
	linux-kernel



> -----Original Message-----
> From: Jun ASAKA <JunASAKA@zzy040330.moe>
> Sent: Saturday, December 17, 2022 11:07 AM
> To: Jes.Sorensen@gmail.com
> Cc: kvalo@kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
> linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Jun ASAKA
> <JunASAKA@zzy040330.moe>
> Subject: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
> 
> Fixing transmission failure which results in
> "authentication with ... timed out". This can be
> fixed by disable the REG_TXPAUSE.
> 
> Signed-off-by: Jun ASAKA <JunASAKA@zzy040330.moe>
> ---
>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
> index a7d76693c02d..9d0ed6760cb6 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
> @@ -1744,6 +1744,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv)
>  	val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
>  	val8 &= ~BIT(0);
>  	rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
> +
> +	/*
> +	 * Fix transmission failure of rtl8192e.
> +	 */
> +	rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);

I trace when rtl8xxxu set REG_TXPAUSE=0xff that will stop TX.
The occasions include RF calibration, LPS mode (called by power off), and
going to stop. So, I think RF calibration does TX pause but not restore
settings after calibration, and causes TX stuck. As the flow I traced,
this patch looks reasonable. But, I wonder why other people don't meet
this problem.

Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>

>  }
> 
>  static s8 rtl8192e_cck_rssi(struct rtl8xxxu_priv *priv, u8 cck_agc_rpt)
> --
> 2.31.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  2022-12-20  5:44 ` Ping-Ke Shih
@ 2022-12-20  6:02   ` Jun ASAKA
  2022-12-20 13:03   ` Bitterblue Smith
  1 sibling, 0 replies; 12+ messages in thread
From: Jun ASAKA @ 2022-12-20  6:02 UTC (permalink / raw)
  To: Ping-Ke Shih, Jes.Sorensen
  Cc: kvalo, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
	linux-kernel


On 20/12/2022 13:44, Ping-Ke Shih wrote:
>
>> -----Original Message-----
>> From: Jun ASAKA <JunASAKA@zzy040330.moe>
>> Sent: Saturday, December 17, 2022 11:07 AM
>> To: Jes.Sorensen@gmail.com
>> Cc: kvalo@kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
>> linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Jun ASAKA
>> <JunASAKA@zzy040330.moe>
>> Subject: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
>>
>> Fixing transmission failure which results in
>> "authentication with ... timed out". This can be
>> fixed by disable the REG_TXPAUSE.
>>
>> Signed-off-by: Jun ASAKA <JunASAKA@zzy040330.moe>
>> ---
>>   drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>> index a7d76693c02d..9d0ed6760cb6 100644
>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>> @@ -1744,6 +1744,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv)
>>   	val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
>>   	val8 &= ~BIT(0);
>>   	rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
>> +
>> +	/*
>> +	 * Fix transmission failure of rtl8192e.
>> +	 */
>> +	rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
> I trace when rtl8xxxu set REG_TXPAUSE=0xff that will stop TX.
> The occasions include RF calibration, LPS mode (called by power off), and
> going to stop. So, I think RF calibration does TX pause but not restore
> settings after calibration, and causes TX stuck. As the flow I traced,
> this patch looks reasonable. But, I wonder why other people don't meet
> this problem.
>
> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
>
>>   }
>>
>>   static s8 rtl8192e_cck_rssi(struct rtl8xxxu_priv *priv, u8 cck_agc_rpt)
>> --
>> 2.31.1

For my occasion, one of my rtl8192ru device which is Tenda U1 doesn't 
work originally with this module, it prints "authentication with ... 
timed out" in dmesg. And this change can fix the problem.

Thanks for your review.


Jun ASAKA.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  2022-12-20  5:44 ` Ping-Ke Shih
  2022-12-20  6:02   ` Jun ASAKA
@ 2022-12-20 13:03   ` Bitterblue Smith
  2022-12-20 13:48     ` Jun ASAKA
  2022-12-21  1:42     ` Ping-Ke Shih
  1 sibling, 2 replies; 12+ messages in thread
From: Bitterblue Smith @ 2022-12-20 13:03 UTC (permalink / raw)
  To: Ping-Ke Shih, Jun ASAKA, Jes.Sorensen
  Cc: kvalo, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
	linux-kernel

On 20/12/2022 07:44, Ping-Ke Shih wrote:
> 
> 
>> -----Original Message-----
>> From: Jun ASAKA <JunASAKA@zzy040330.moe>
>> Sent: Saturday, December 17, 2022 11:07 AM
>> To: Jes.Sorensen@gmail.com
>> Cc: kvalo@kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
>> linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Jun ASAKA
>> <JunASAKA@zzy040330.moe>
>> Subject: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
>>
>> Fixing transmission failure which results in
>> "authentication with ... timed out". This can be
>> fixed by disable the REG_TXPAUSE.
>>
>> Signed-off-by: Jun ASAKA <JunASAKA@zzy040330.moe>
>> ---
>>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>> index a7d76693c02d..9d0ed6760cb6 100644
>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>> @@ -1744,6 +1744,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv)
>>  	val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
>>  	val8 &= ~BIT(0);
>>  	rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
>> +
>> +	/*
>> +	 * Fix transmission failure of rtl8192e.
>> +	 */
>> +	rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
> 
> I trace when rtl8xxxu set REG_TXPAUSE=0xff that will stop TX.
> The occasions include RF calibration, LPS mode (called by power off), and
> going to stop. So, I think RF calibration does TX pause but not restore
> settings after calibration, and causes TX stuck. As the flow I traced,
> this patch looks reasonable. But, I wonder why other people don't meet
> this problem.
> 
Other people have this problem too:
https://bugzilla.kernel.org/show_bug.cgi?id=196769
https://bugzilla.kernel.org/show_bug.cgi?id=216746

The RF calibration does restore REG_TXPAUSE at the end. What happens is
when you plug in the device, something (mac80211? wpa_supplicant?) calls
rtl8xxxu_start(), then rtl8xxxu_stop(), then rtl8xxxu_start() again.
rtl8xxxu_stop() sets REG_TXPAUSE to 0xff and nothing sets it back to 0.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  2022-12-20 13:03   ` Bitterblue Smith
@ 2022-12-20 13:48     ` Jun ASAKA
  2022-12-21  1:42     ` Ping-Ke Shih
  1 sibling, 0 replies; 12+ messages in thread
From: Jun ASAKA @ 2022-12-20 13:48 UTC (permalink / raw)
  To: Bitterblue Smith, Ping-Ke Shih, Jes.Sorensen
  Cc: kvalo, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
	linux-kernel

On 20/12/2022 21:03, Bitterblue Smith wrote:

> On 20/12/2022 07:44, Ping-Ke Shih wrote:
>>
>>> -----Original Message-----
>>> From: Jun ASAKA <JunASAKA@zzy040330.moe>
>>> Sent: Saturday, December 17, 2022 11:07 AM
>>> To: Jes.Sorensen@gmail.com
>>> Cc: kvalo@kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com;
>>> linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Jun ASAKA
>>> <JunASAKA@zzy040330.moe>
>>> Subject: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
>>>
>>> Fixing transmission failure which results in
>>> "authentication with ... timed out". This can be
>>> fixed by disable the REG_TXPAUSE.
>>>
>>> Signed-off-by: Jun ASAKA <JunASAKA@zzy040330.moe>
>>> ---
>>>   drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 +++++
>>>   1 file changed, 5 insertions(+)
>>>
>>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>> index a7d76693c02d..9d0ed6760cb6 100644
>>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>> @@ -1744,6 +1744,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv)
>>>   	val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
>>>   	val8 &= ~BIT(0);
>>>   	rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
>>> +
>>> +	/*
>>> +	 * Fix transmission failure of rtl8192e.
>>> +	 */
>>> +	rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
>> I trace when rtl8xxxu set REG_TXPAUSE=0xff that will stop TX.
>> The occasions include RF calibration, LPS mode (called by power off), and
>> going to stop. So, I think RF calibration does TX pause but not restore
>> settings after calibration, and causes TX stuck. As the flow I traced,
>> this patch looks reasonable. But, I wonder why other people don't meet
>> this problem.
>>
> Other people have this problem too:
> https://bugzilla.kernel.org/show_bug.cgi?id=196769
> https://bugzilla.kernel.org/show_bug.cgi?id=216746
Actually, one of the two bug was issued by me. Also, my friend who is 
using a TP-Link rtl8192eu device said that his device doesn't work as well.
>
> The RF calibration does restore REG_TXPAUSE at the end. What happens is
> when you plug in the device, something (mac80211? wpa_supplicant?) calls
> rtl8xxxu_start(), then rtl8xxxu_stop(), then rtl8xxxu_start() again.
> rtl8xxxu_stop() sets REG_TXPAUSE to 0xff and nothing sets it back to 0.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  2022-12-20 13:03   ` Bitterblue Smith
  2022-12-20 13:48     ` Jun ASAKA
@ 2022-12-21  1:42     ` Ping-Ke Shih
  2022-12-21 12:14       ` Bitterblue Smith
  1 sibling, 1 reply; 12+ messages in thread
From: Ping-Ke Shih @ 2022-12-21  1:42 UTC (permalink / raw)
  To: Jes.Sorensen, rtl8821cerfe2, JunASAKA
  Cc: davem, kvalo, linux-kernel, linux-wireless, netdev, kuba,
	edumazet, pabeni

On Tue, 2022-12-20 at 15:03 +0200, Bitterblue Smith wrote:
> On 20/12/2022 07:44, Ping-Ke Shih wrote:
> > 
> > > -----Original Message-----
> > > From: Jun ASAKA <JunASAKA@zzy040330.moe>
> > > Sent: Saturday, December 17, 2022 11:07 AM
> > > To: Jes.Sorensen@gmail.com
> > > Cc: kvalo@kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; 
> > > pabeni@redhat.com;
> > > linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Jun
> > > ASAKA
> > > <JunASAKA@zzy040330.moe>
> > > Subject: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
> > > 
> > > Fixing transmission failure which results in
> > > "authentication with ... timed out". This can be
> > > fixed by disable the REG_TXPAUSE.
> > > 
> > > Signed-off-by: Jun ASAKA <JunASAKA@zzy040330.moe>
> > > ---
> > >  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > > 
> > > diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
> > > b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
> > > index a7d76693c02d..9d0ed6760cb6 100644
> > > --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
> > > +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
> > > @@ -1744,6 +1744,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv)
> > >  	val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
> > >  	val8 &= ~BIT(0);
> > >  	rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
> > > +
> > > +	/*
> > > +	 * Fix transmission failure of rtl8192e.
> > > +	 */
> > > +	rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
> > 
> > I trace when rtl8xxxu set REG_TXPAUSE=0xff that will stop TX.
> > The occasions include RF calibration, LPS mode (called by power off), and
> > going to stop. So, I think RF calibration does TX pause but not restore
> > settings after calibration, and causes TX stuck. As the flow I traced,
> > this patch looks reasonable. But, I wonder why other people don't meet
> > this problem.
> > 
> Other people have this problem too:
> https://bugzilla.kernel.org/show_bug.cgi?id=196769
> https://bugzilla.kernel.org/show_bug.cgi?id=216746

In the threads, you have answered my question with
"kernel 4.8.0 works, but 4.9.? does not work."

> 
> The RF calibration does restore REG_TXPAUSE at the end. What happens is
> when you plug in the device, something (mac80211? wpa_supplicant?) calls
> rtl8xxxu_start(), then rtl8xxxu_stop(), then rtl8xxxu_start() again.
> rtl8xxxu_stop() sets REG_TXPAUSE to 0xff and nothing sets it back to 0.
> 

You are correct. That is clear to me. I miss the point that RF calibration
does backup/restore registers containing REG_TXPAUSE.

Then, I think my reviewed-by can be still applied, right?

Ping-Ke


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  2022-12-21  1:42     ` Ping-Ke Shih
@ 2022-12-21 12:14       ` Bitterblue Smith
  0 siblings, 0 replies; 12+ messages in thread
From: Bitterblue Smith @ 2022-12-21 12:14 UTC (permalink / raw)
  To: Ping-Ke Shih, Jes.Sorensen, JunASAKA
  Cc: davem, kvalo, linux-kernel, linux-wireless, netdev, kuba,
	edumazet, pabeni

On 21/12/2022 03:42, Ping-Ke Shih wrote:
> On Tue, 2022-12-20 at 15:03 +0200, Bitterblue Smith wrote:
>> On 20/12/2022 07:44, Ping-Ke Shih wrote:
>>>
>>>> -----Original Message-----
>>>> From: Jun ASAKA <JunASAKA@zzy040330.moe>
>>>> Sent: Saturday, December 17, 2022 11:07 AM
>>>> To: Jes.Sorensen@gmail.com
>>>> Cc: kvalo@kernel.org; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; 
>>>> pabeni@redhat.com;
>>>> linux-wireless@vger.kernel.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Jun
>>>> ASAKA
>>>> <JunASAKA@zzy040330.moe>
>>>> Subject: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
>>>>
>>>> Fixing transmission failure which results in
>>>> "authentication with ... timed out". This can be
>>>> fixed by disable the REG_TXPAUSE.
>>>>
>>>> Signed-off-by: Jun ASAKA <JunASAKA@zzy040330.moe>
>>>> ---
>>>>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 +++++
>>>>  1 file changed, 5 insertions(+)
>>>>
>>>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>>> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>>> index a7d76693c02d..9d0ed6760cb6 100644
>>>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>>> @@ -1744,6 +1744,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv)
>>>>  	val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
>>>>  	val8 &= ~BIT(0);
>>>>  	rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
>>>> +
>>>> +	/*
>>>> +	 * Fix transmission failure of rtl8192e.
>>>> +	 */
>>>> +	rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
>>>
>>> I trace when rtl8xxxu set REG_TXPAUSE=0xff that will stop TX.
>>> The occasions include RF calibration, LPS mode (called by power off), and
>>> going to stop. So, I think RF calibration does TX pause but not restore
>>> settings after calibration, and causes TX stuck. As the flow I traced,
>>> this patch looks reasonable. But, I wonder why other people don't meet
>>> this problem.
>>>
>> Other people have this problem too:
>> https://bugzilla.kernel.org/show_bug.cgi?id=196769
>> https://bugzilla.kernel.org/show_bug.cgi?id=216746
> 
> In the threads, you have answered my question with
> "kernel 4.8.0 works, but 4.9.? does not work."
> 
>>
>> The RF calibration does restore REG_TXPAUSE at the end. What happens is
>> when you plug in the device, something (mac80211? wpa_supplicant?) calls
>> rtl8xxxu_start(), then rtl8xxxu_stop(), then rtl8xxxu_start() again.
>> rtl8xxxu_stop() sets REG_TXPAUSE to 0xff and nothing sets it back to 0.
>>
> 
> You are correct. That is clear to me. I miss the point that RF calibration
> does backup/restore registers containing REG_TXPAUSE.
> 
> Then, I think my reviewed-by can be still applied, right?
> 
> Ping-Ke
> 
Yes.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  2022-12-17  3:06 [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu Jun ASAKA
  2022-12-20  5:44 ` Ping-Ke Shih
@ 2022-12-21 18:52 ` Kalle Valo
  2023-01-07 14:17 ` Bitterblue Smith
  2 siblings, 0 replies; 12+ messages in thread
From: Kalle Valo @ 2022-12-21 18:52 UTC (permalink / raw)
  To: Jun ASAKA
  Cc: Jes.Sorensen, davem, edumazet, kuba, pabeni, linux-wireless,
	netdev, linux-kernel, Jun ASAKA

Jun ASAKA <JunASAKA@zzy040330.moe> wrote:

> Fixing transmission failure which results in
> "authentication with ... timed out". This can be
> fixed by disable the REG_TXPAUSE.
> 
> Signed-off-by: Jun ASAKA <JunASAKA@zzy040330.moe>
> Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>

Patch applied to wireless-next.git, thanks.

c6015bf3ff1f wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20221217030659.12577-1-JunASAKA@zzy040330.moe/

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  2022-12-17  3:06 [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu Jun ASAKA
  2022-12-20  5:44 ` Ping-Ke Shih
  2022-12-21 18:52 ` Kalle Valo
@ 2023-01-07 14:17 ` Bitterblue Smith
  2023-01-08  9:29   ` Jun ASAKA
  2 siblings, 1 reply; 12+ messages in thread
From: Bitterblue Smith @ 2023-01-07 14:17 UTC (permalink / raw)
  To: Jun ASAKA, Jes.Sorensen
  Cc: kvalo, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
	linux-kernel

On 17/12/2022 05:06, Jun ASAKA wrote:
> Fixing transmission failure which results in
> "authentication with ... timed out". This can be
> fixed by disable the REG_TXPAUSE.
> 
> Signed-off-by: Jun ASAKA <JunASAKA@zzy040330.moe>
> ---
>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
> index a7d76693c02d..9d0ed6760cb6 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
> @@ -1744,6 +1744,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv)
>  	val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
>  	val8 &= ~BIT(0);
>  	rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
> +
> +	/*
> +	 * Fix transmission failure of rtl8192e.
> +	 */
> +	rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
>  }
>  
>  static s8 rtl8192e_cck_rssi(struct rtl8xxxu_priv *priv, u8 cck_agc_rpt)

By the way, you should get this into the stable kernels too:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  2023-01-07 14:17 ` Bitterblue Smith
@ 2023-01-08  9:29   ` Jun ASAKA
  2023-01-08 12:49     ` Bitterblue Smith
  0 siblings, 1 reply; 12+ messages in thread
From: Jun ASAKA @ 2023-01-08  9:29 UTC (permalink / raw)
  To: Bitterblue Smith, Jes.Sorensen
  Cc: kvalo, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
	linux-kernel

On 07/01/2023 22:17, Bitterblue Smith wrote:

> On 17/12/2022 05:06, Jun ASAKA wrote:
>> Fixing transmission failure which results in
>> "authentication with ... timed out". This can be
>> fixed by disable the REG_TXPAUSE.
>>
>> Signed-off-by: Jun ASAKA <JunASAKA@zzy040330.moe>
>> ---
>>   drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>> index a7d76693c02d..9d0ed6760cb6 100644
>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>> @@ -1744,6 +1744,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv)
>>   	val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
>>   	val8 &= ~BIT(0);
>>   	rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
>> +
>> +	/*
>> +	 * Fix transmission failure of rtl8192e.
>> +	 */
>> +	rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
>>   }
>>   
>>   static s8 rtl8192e_cck_rssi(struct rtl8xxxu_priv *priv, u8 cck_agc_rpt)
> By the way, you should get this into the stable kernels too:
> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

I see.

But since this patch has not been merged into Linus' tree yet, so should 
I wait until this patch is merged or I should issue a v2 patch here and 
Cc it to "table@vger.kernel.org"?


Jun ASAKA.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  2023-01-08  9:29   ` Jun ASAKA
@ 2023-01-08 12:49     ` Bitterblue Smith
  2023-02-24 16:44       ` Bitterblue Smith
  0 siblings, 1 reply; 12+ messages in thread
From: Bitterblue Smith @ 2023-01-08 12:49 UTC (permalink / raw)
  To: Jun ASAKA, Jes.Sorensen
  Cc: kvalo, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
	linux-kernel

On 08/01/2023 11:29, Jun ASAKA wrote:
> On 07/01/2023 22:17, Bitterblue Smith wrote:
> 
>> On 17/12/2022 05:06, Jun ASAKA wrote:
>>> Fixing transmission failure which results in
>>> "authentication with ... timed out". This can be
>>> fixed by disable the REG_TXPAUSE.
>>>
>>> Signed-off-by: Jun ASAKA <JunASAKA@zzy040330.moe>
>>> ---
>>>   drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 +++++
>>>   1 file changed, 5 insertions(+)
>>>
>>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>> index a7d76693c02d..9d0ed6760cb6 100644
>>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>> @@ -1744,6 +1744,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv)
>>>       val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
>>>       val8 &= ~BIT(0);
>>>       rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
>>> +
>>> +    /*
>>> +     * Fix transmission failure of rtl8192e.
>>> +     */
>>> +    rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
>>>   }
>>>     static s8 rtl8192e_cck_rssi(struct rtl8xxxu_priv *priv, u8 cck_agc_rpt)
>> By the way, you should get this into the stable kernels too:
>> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> 
> I see.
> 
> But since this patch has not been merged into Linus' tree yet, so should I wait until this patch is merged or I should issue a v2 patch here and Cc it to "table@vger.kernel.org"?
> 
> 
> Jun ASAKA.
> 
Ah, yeah. Wait then.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  2023-01-08 12:49     ` Bitterblue Smith
@ 2023-02-24 16:44       ` Bitterblue Smith
  0 siblings, 0 replies; 12+ messages in thread
From: Bitterblue Smith @ 2023-02-24 16:44 UTC (permalink / raw)
  To: Jun ASAKA, Jes.Sorensen
  Cc: kvalo, davem, edumazet, kuba, pabeni, linux-wireless, netdev,
	linux-kernel

On 08/01/2023 14:49, Bitterblue Smith wrote:
> On 08/01/2023 11:29, Jun ASAKA wrote:
>> On 07/01/2023 22:17, Bitterblue Smith wrote:
>>
>>> On 17/12/2022 05:06, Jun ASAKA wrote:
>>>> Fixing transmission failure which results in
>>>> "authentication with ... timed out". This can be
>>>> fixed by disable the REG_TXPAUSE.
>>>>
>>>> Signed-off-by: Jun ASAKA <JunASAKA@zzy040330.moe>
>>>> ---
>>>>   drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 5 +++++
>>>>   1 file changed, 5 insertions(+)
>>>>
>>>> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>>> index a7d76693c02d..9d0ed6760cb6 100644
>>>> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>>> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c
>>>> @@ -1744,6 +1744,11 @@ static void rtl8192e_enable_rf(struct rtl8xxxu_priv *priv)
>>>>       val8 = rtl8xxxu_read8(priv, REG_PAD_CTRL1);
>>>>       val8 &= ~BIT(0);
>>>>       rtl8xxxu_write8(priv, REG_PAD_CTRL1, val8);
>>>> +
>>>> +    /*
>>>> +     * Fix transmission failure of rtl8192e.
>>>> +     */
>>>> +    rtl8xxxu_write8(priv, REG_TXPAUSE, 0x00);
>>>>   }
>>>>     static s8 rtl8192e_cck_rssi(struct rtl8xxxu_priv *priv, u8 cck_agc_rpt)
>>> By the way, you should get this into the stable kernels too:
>>> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
>>
>> I see.
>>
>> But since this patch has not been merged into Linus' tree yet, so should I wait until this patch is merged or I should issue a v2 patch here and Cc it to "table@vger.kernel.org"?
>>
>>
>> Jun ASAKA.
>>
> Ah, yeah. Wait then.

It should be fine to send it now.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-02-24 16:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-17  3:06 [PATCH] wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu Jun ASAKA
2022-12-20  5:44 ` Ping-Ke Shih
2022-12-20  6:02   ` Jun ASAKA
2022-12-20 13:03   ` Bitterblue Smith
2022-12-20 13:48     ` Jun ASAKA
2022-12-21  1:42     ` Ping-Ke Shih
2022-12-21 12:14       ` Bitterblue Smith
2022-12-21 18:52 ` Kalle Valo
2023-01-07 14:17 ` Bitterblue Smith
2023-01-08  9:29   ` Jun ASAKA
2023-01-08 12:49     ` Bitterblue Smith
2023-02-24 16:44       ` Bitterblue Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).