linux/drivers/net/wireless/microchip/wilc1000
Dan Carpenter 2f51061eda wilc1000: fix a loop timeout condition
If the loop fails, the "while(trials--) {" loop will exit with "trials"
set to -1.  The test for that expects it to end with "trials" set to 0
so the warning message will not be printed.

Fix this by changing from a post-op to a pre-op.  This does mean that
we only make 99 attempts instead of 100 but that's okay.

Fixes: f135a1571a ("wilc1000: Support chip sleep over SPI")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/YFS5gx/gi70zlIaO@mwanda
2021-04-17 20:54:22 +03:00
..
cfg80211.c cfg80211: change netdev registration/unregistration semantics 2021-01-22 16:28:39 +01:00
cfg80211.h
fw.h wilc1000: use flexible-array member instead of zero-length array 2021-01-14 19:33:02 +02:00
hif.c wilc1000: added 'ndo_set_mac_address' callback support 2020-12-02 21:38:07 +02:00
hif.h wilc1000: added 'ndo_set_mac_address' callback support 2020-12-02 21:38:07 +02:00
Kconfig wilc1000: Add support for enabling CRC 2021-04-17 20:47:40 +03:00
Makefile wilc1000: use API version number info along with firmware filename 2020-07-14 20:52:27 +03:00
mon.c cfg80211: change netdev registration/unregistration semantics 2021-01-22 16:28:39 +01:00
netdev.c wilc1000: Bring MAC address setting in line with typical Linux behavior 2021-04-17 20:51:06 +03:00
netdev.h wilc1000: added queue support for WMM 2020-12-02 21:38:12 +02:00
sdio.c wilc1000: write value to WILC_INTR2_ENABLE register 2021-03-15 10:25:16 +02:00
spi.c wilc1000: Add support for enabling CRC 2021-04-17 20:47:40 +03:00
wlan.c wilc1000: fix a loop timeout condition 2021-04-17 20:54:22 +03:00
wlan.h wilc1000: Support chip sleep over SPI 2021-03-15 10:23:53 +02:00
wlan_cfg.c
wlan_cfg.h
wlan_if.h