From 820da437b9f7d4338c438dc48ff0e4c7d9675728 Mon Sep 17 00:00:00 2001 From: Paul Gautreaux Date: Tue, 26 Oct 2021 12:47:56 -0700 Subject: [PATCH] net: lib: config: Fix the timeout when waiting on network Loop by LOOP_DIVIDER counts instead of the number of seconds specified in the timeout. Fixes #39672 Signed-off-by: Paul Gautreaux --- subsys/net/lib/config/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/net/lib/config/init.c b/subsys/net/lib/config/init.c index bc13ceb2b38a6d..b849323ef75399 100644 --- a/subsys/net/lib/config/init.c +++ b/subsys/net/lib/config/init.c @@ -356,7 +356,7 @@ int net_config_init_by_iface(struct net_if *iface, const char *app_info, } else if (timeout == 0) { count = 0; } else { - count = timeout / 1000 + 1; + count = LOOP_DIVIDER; } /* First make sure that network interface is up */