net: make initr_net() invocation command line agnostic
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 14 Apr 2025 13:55:06 +0000 (15:55 +0200)
committerJerome Forissier <jerome.forissier@linaro.org>
Wed, 23 Apr 2025 08:02:49 +0000 (10:02 +0200)
initr_net() initalizes the network devices by calling eth_initalize().
There is no good reason to disable this if no command line interface is
present.

Let initr_net() depend on CONFIG_NET || CONFIG_NET_LWIP.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
common/board_r.c

index 65d74e3..bc6fd64 100644 (file)
@@ -509,7 +509,7 @@ static int initr_boot_led_on(void)
        return 0;
 }
 
-#if defined(CONFIG_CMD_NET)
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 static int initr_net(void)
 {
        puts("Net:   ");
@@ -779,7 +779,7 @@ static void initcall_run_r(void)
 #if CONFIG_IS_ENABLED(PCI_ENDPOINT)
        INITCALL(pci_ep_init);
 #endif
-#if CONFIG_IS_ENABLED(CMD_NET)
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
        WATCHDOG_RESET();
        INITCALL(initr_net);
 #endif