net: Keep the bootstage functions together
authorSimon Glass <sjg@chromium.org>
Thu, 6 Mar 2025 00:25:15 +0000 (17:25 -0700)
committerTom Rini <trini@konsulko.com>
Tue, 18 Mar 2025 19:12:15 +0000 (13:12 -0600)
Move the bootstage_mark() function just before net_loop(), so that the
IPv6 code is not in the way.

Signed-off-by: Simon Glass <sjg@chromium.org>
cmd/net.c

index 79525f7..deebd5b 100644 (file)
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -413,8 +413,6 @@ static int netboot_common(enum proto_t proto, struct cmd_tbl *cmdtp, int argc,
                return CMD_RET_USAGE;
        }
 
-       bootstage_mark(BOOTSTAGE_ID_NET_START);
-
        if (IS_ENABLED(CONFIG_IPV6) && !use_ip6) {
                char *s, *e;
                size_t len;
@@ -428,6 +426,8 @@ static int netboot_common(enum proto_t proto, struct cmd_tbl *cmdtp, int argc,
                }
        }
 
+       bootstage_mark(BOOTSTAGE_ID_NET_START);
+
        size = net_loop(proto);
        if (size < 0) {
                bootstage_error(BOOTSTAGE_ID_NET_NETLOOP_OK);