From: Luciano Coelho Date: Thu, 29 Oct 2009 11:20:04 +0000 (+0200) Subject: wl1271: fix init loop timeout X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e7d17cf4f7e1b8d06575b6db2397c99c151674b8;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git wl1271: fix init loop timeout The check after the loop which checks whether the initialization timed-out was wrong. If the initialization would succeed exactly in the 20000th time (the value set for INIT_LOOP), the driver would bail out and claim that initialization failed. Reported-by: Juha Leppanen Signed-off-by: Luciano Coelho Reviewed-by: Janne Ylalehto Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/wl12xx/wl1271_boot.c b/drivers/net/wireless/wl12xx/wl1271_boot.c index ba4a2b4f0f56..8678bea05ed5 100644 --- a/drivers/net/wireless/wl12xx/wl1271_boot.c +++ b/drivers/net/wireless/wl12xx/wl1271_boot.c @@ -380,7 +380,7 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl) } } - if (loop >= INIT_LOOP) { + if (loop > INIT_LOOP) { wl1271_error("timeout waiting for the hardware to " "complete initialization"); return -EIO;