[v2] staging: rtl8192e: Fix W_DISABLE# does not work after stop/start

Message ID 20230417185723.GA11245@matrix-ESPRIMO-P710
State New
Headers
Series [v2] staging: rtl8192e: Fix W_DISABLE# does not work after stop/start |

Commit Message

Philipp Hortmann April 17, 2023, 6:57 p.m. UTC
  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.

Fixes: https://lore.kernel.org/linux-staging/248ec330-b4c3-aa7b-61eb-69ce8d333b69@gmail.com/
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
v1->v2: Added Fixes Tag
---
 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Greg KH April 18, 2023, 6:17 a.m. UTC | #1
On Mon, Apr 17, 2023 at 08:57:23PM +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.
> 
> Fixes: https://lore.kernel.org/linux-staging/248ec330-b4c3-aa7b-61eb-69ce8d333b69@gmail.com/
> Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
> ---
> v1->v2: Added Fixes Tag

"Fixes:" needs to point to a git commit id, not a url.

thanks,

greg k-h
  

Patch

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 4cf84b5666a7..27040d1e3230 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -645,6 +645,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;
 }