* [PATCH] staging: rtl8192e: Fix W_DISABLE# does not work after stop/start
@ 2023-04-14 18:34 Philipp Hortmann
2023-04-15 16:02 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Philipp Hortmann @ 2023-04-14 18:34 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-staging, linux-kernel
When loading the driver for rtl8192e, the W_DISABLE# switch is working as
intended. But when the WLAN is turned off in software and then turned on
again the W_DISABLE# does not work anymore. Reason for this is that in
the function _rtl92e_dm_check_rf_ctrl_gpio() the bfirst_after_down is
checked and returned when true. bfirst_after_down is set true when
switching the WLAN off in software. But it is not set to false again
when WLAN is turned on again.
Add bfirst_after_down = false in _rtl92e_sta_up to reset bit and fix
above described bug.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
Tested with rtl8192e (WLL6130-D99)
Transferred this patch over wlan connection of rtl8192e
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 45989a77a27c..a644543015ee 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -648,6 +648,7 @@ static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset)
else
netif_wake_queue(dev);
+ priv->bfirst_after_down = false;
return 0;
}
--
2.40.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8192e: Fix W_DISABLE# does not work after stop/start
2023-04-14 18:34 [PATCH] staging: rtl8192e: Fix W_DISABLE# does not work after stop/start Philipp Hortmann
@ 2023-04-15 16:02 ` Greg Kroah-Hartman
2023-04-16 5:55 ` Philipp Hortmann
0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-04-15 16:02 UTC (permalink / raw)
To: Philipp Hortmann; +Cc: linux-staging, linux-kernel
On Fri, Apr 14, 2023 at 08:34:52PM +0200, Philipp Hortmann wrote:
> When loading the driver for rtl8192e, the W_DISABLE# switch is working as
> intended. But when the WLAN is turned off in software and then turned on
> again the W_DISABLE# does not work anymore. Reason for this is that in
> the function _rtl92e_dm_check_rf_ctrl_gpio() the bfirst_after_down is
> checked and returned when true. bfirst_after_down is set true when
> switching the WLAN off in software. But it is not set to false again
> when WLAN is turned on again.
>
> Add bfirst_after_down = false in _rtl92e_sta_up to reset bit and fix
> above described bug.
>
> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
> ---
> Tested with rtl8192e (WLL6130-D99)
> Transferred this patch over wlan connection of rtl8192e
> ---
> drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 +
> 1 file changed, 1 insertion(+)
What commit id does this fix? Should it go to the stable kernels? If
so, how far back?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8192e: Fix W_DISABLE# does not work after stop/start
2023-04-15 16:02 ` Greg Kroah-Hartman
@ 2023-04-16 5:55 ` Philipp Hortmann
2023-04-17 7:58 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Philipp Hortmann @ 2023-04-16 5:55 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel
On 4/15/23 18:02, Greg Kroah-Hartman wrote:
> On Fri, Apr 14, 2023 at 08:34:52PM +0200, Philipp Hortmann wrote:
>> When loading the driver for rtl8192e, the W_DISABLE# switch is working as
>> intended. But when the WLAN is turned off in software and then turned on
>> again the W_DISABLE# does not work anymore. Reason for this is that in
>> the function _rtl92e_dm_check_rf_ctrl_gpio() the bfirst_after_down is
>> checked and returned when true. bfirst_after_down is set true when
>> switching the WLAN off in software. But it is not set to false again
>> when WLAN is turned on again.
>>
>> Add bfirst_after_down = false in _rtl92e_sta_up to reset bit and fix
>> above described bug.
>>
>> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
>> ---
>> Tested with rtl8192e (WLL6130-D99)
>> Transferred this patch over wlan connection of rtl8192e
>> ---
>> drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 +
>> 1 file changed, 1 insertion(+)
>
>
> What commit id does this fix?
To me the driver was introduced in V3.2 and the issue did not change up
to now. Have a look at:
https://elixir.bootlin.com/linux/v3.2-rc1/A/ident/bfirst_after_down
https://elixir.bootlin.com/linux/v6.2.11/A/ident/bfirst_after_down
> Should it go to the stable kernels? If
> so, how far back?
The second issue that is related to the W_DISABLE# signal is that the
connection is not reestablished when the signal is released. I need more
time to fix this issue. When I have fixed both we could backport them.
>
> thanks,
>
> greg k-h
thanks,
Philipp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: rtl8192e: Fix W_DISABLE# does not work after stop/start
2023-04-16 5:55 ` Philipp Hortmann
@ 2023-04-17 7:58 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2023-04-17 7:58 UTC (permalink / raw)
To: Philipp Hortmann; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel
On Sun, Apr 16, 2023 at 07:55:32AM +0200, Philipp Hortmann wrote:
> On 4/15/23 18:02, Greg Kroah-Hartman wrote:
> > On Fri, Apr 14, 2023 at 08:34:52PM +0200, Philipp Hortmann wrote:
> > > When loading the driver for rtl8192e, the W_DISABLE# switch is working as
> > > intended. But when the WLAN is turned off in software and then turned on
> > > again the W_DISABLE# does not work anymore. Reason for this is that in
> > > the function _rtl92e_dm_check_rf_ctrl_gpio() the bfirst_after_down is
> > > checked and returned when true. bfirst_after_down is set true when
> > > switching the WLAN off in software. But it is not set to false again
> > > when WLAN is turned on again.
> > >
> > > Add bfirst_after_down = false in _rtl92e_sta_up to reset bit and fix
> > > above described bug.
> > >
> > > Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
> > > ---
> > > Tested with rtl8192e (WLL6130-D99)
> > > Transferred this patch over wlan connection of rtl8192e
> > > ---
> > > drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 +
> > > 1 file changed, 1 insertion(+)
> >
> >
> > What commit id does this fix?
> To me the driver was introduced in V3.2 and the issue did not change up to
> now. Have a look at:
> https://elixir.bootlin.com/linux/v3.2-rc1/A/ident/bfirst_after_down
> https://elixir.bootlin.com/linux/v6.2.11/A/ident/bfirst_after_down
>
Just resend with a Fixes tag.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-04-17 7:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-14 18:34 [PATCH] staging: rtl8192e: Fix W_DISABLE# does not work after stop/start Philipp Hortmann
2023-04-15 16:02 ` Greg Kroah-Hartman
2023-04-16 5:55 ` Philipp Hortmann
2023-04-17 7:58 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox