]> git.ipfire.org Git - thirdparty/linux.git/commit
wifi: wilc1000: Clean up usage of wilc_get_chipid()
authorMarek Vasut <marex@denx.de>
Fri, 4 Oct 2024 11:44:11 +0000 (13:44 +0200)
committerKalle Valo <kvalo@kernel.org>
Thu, 17 Oct 2024 16:47:41 +0000 (19:47 +0300)
commit719e469eb9a29a0ef624af51878c8d7217929b84
tree3fec79defc385817964276d68b7d484352f75972
parent1b292a161cfb02868ffd0dc8b87a4a84b633f941
wifi: wilc1000: Clean up usage of wilc_get_chipid()

Reduce the use of wilc_get_chipid(), use cached chip ID wherever
possible. Remove duplicated partial chip ID read implementations
from the driver. Update wilc_get_chipid() to always read the chip
ID out of the hardware and update the cached chip ID, and make it
return a proper return value instead of a chipid. Call wilc_get_chipid()
early to make the cached chip ID available to various sites using
is_wilc1000() to access the cached chip ID.

Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20241004114551.40236-2-marex@denx.de
drivers/net/wireless/microchip/wilc1000/netdev.c
drivers/net/wireless/microchip/wilc1000/sdio.c
drivers/net/wireless/microchip/wilc1000/spi.c
drivers/net/wireless/microchip/wilc1000/wlan.c
drivers/net/wireless/microchip/wilc1000/wlan.h