wifi: wilc1000: fix incorrect power down sequence
authorAjay Singh <ajay.kathat@microchip.com>
Mon, 15 Jan 2024 14:56:33 +0000 (15:56 +0100)
committerKalle Valo <kvalo@kernel.org>
Thu, 18 Jan 2024 09:35:14 +0000 (11:35 +0200)
commita4f1a05b832e212f8e5b7adcb1b5e8c5c072ae88
treec836d0db8cd0512c7f9556d07d41c6f0f5d08ccf
parent328efda22af81130c2ad981c110518cb29ff2f1d
wifi: wilc1000: fix incorrect power down sequence

Use the correct register configuration when the WILC chip is down so the
successive interface up operation is successful. The modified registers
values during chip down helps to avoid the "FW not responding" debug
message which sometimes occurs because of temporary bus communication
failure during the next start. Also, make sure on first communication with
the chip that it is indeed woken up.

Reported-by: Michael Walle <mwalle@kernel.org>
Closes: https://lore.kernel.org/linux-wireless/20221026085415.6jgwrhq4sunqaypm@0002.3ffe.de/
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240115-wilc_1000_fixes-v1-4-54d29463a738@bootlin.com
drivers/net/wireless/microchip/wilc1000/wlan.c
drivers/net/wireless/microchip/wilc1000/wlan.h