]> git.itanic.dy.fi Git - linux-stable/commit
staging: rtl8192e: Fix W_DISABLE# does not work after stop/start
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Tue, 18 Apr 2023 20:02:01 +0000 (22:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:13:17 +0000 (11:13 +0200)
commit24eb9f773259580280e91a6ed677cc82e8416746
treef5237e0de258988df990a86d46fada0939070e53
parent0bd49a043c7984c93c2a0af41222fb71c3986a4e
staging: rtl8192e: Fix W_DISABLE# does not work after stop/start

[ Upstream commit 3fac2397f562eb669ddc2f45867a253f3fc26184 ]

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: 94a799425eee ("From: wlanfae <wlanfae@realtek.com> [PATCH 1/8] rtl8192e: Import new version of driver from realtek")
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/20230418200201.GA17398@matrix-ESPRIMO-P710
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/rtl8192e/rtl8192e/rtl_core.c