wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR value
authorYun Lu <luyun@kylinos.cn>
Fri, 12 May 2023 01:20:55 +0000 (09:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:34:14 +0000 (10:34 +0200)
commitde16dfe7cab5a5b2a64d79e13540f76d3b34c28a
tree321e94a49de7ce285cc80c152c5ea006aeed9547
parent329da6d07cc918b73f51d3c650747829315fb0d2
wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR value

[ Upstream commit 20429444e653ee8242dfbf815c0c37866beb371b ]

When using rtl8192cu with rtl8xxxu driver to connect wifi, there is a
probability of failure, which shows "authentication with ... timed out".
Through debugging, it was found that the RCR register has been inexplicably
modified to an incorrect value, resulting in the nic not being able to
receive authenticated frames.

To fix this problem, add regrcr in rtl8xxxu_priv struct, and store
the RCR value every time the register is written, and use it the next
time the register need to be modified.

Signed-off-by: Yun Lu <luyun@kylinos.cn>
Link: https://lore.kernel.org/all/20230427020512.1221062-1-luyun_611@163.com
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230512012055.2990472-1-luyun_611@163.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c