From b8cd4442257af4ec754838ea179568e0e7360b8f Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Mon, 20 Apr 2026 13:36:08 +0200 Subject: rename NET to NET_LEGACY Highlight that NET really is the legacy networking stack by renaming the option to NET_LEGACY. This requires us to add an SPL_NET_LEGACY alias to SPL_NET as otherwise CONFIG_IS_ENABLED(NET_LEGACY) will not work for SPL. The "depends on !NET_LWIP" for SPL_NET clearly highlights that it is using the legacy networking app so this seems fine to do. This also has the benefit of removing potential confusion on NET being a specific networking stack instead of "any" network stack. Signed-off-by: Quentin Schulz Acked-by: Ilias Apalodimas Reviewed-by: Peter Robinson Reviewed-by: Tom Rini --- common/Kconfig | 2 +- common/board_r.c | 4 ++-- common/spl/Kconfig | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/Kconfig b/common/Kconfig index 2a167ec3ad3..3c3af0e3647 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -425,7 +425,7 @@ config LOGF_FUNC_PAD config LOG_SYSLOG bool "Log output to syslog server" - depends on NET || NET_LWIP + depends on NET_LEGACY || NET_LWIP help Enables a log driver which broadcasts log records via UDP port 514 to syslog servers. diff --git a/common/board_r.c b/common/board_r.c index 8cf0e14679c..37e6f51c7a7 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -495,7 +495,7 @@ static int initr_boot_led_on(void) return 0; } -#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) static int initr_net(void) { puts("Net: "); @@ -756,7 +756,7 @@ static void initcall_run_r(void) #if CONFIG_IS_ENABLED(PCI_ENDPOINT) INITCALL(pci_ep_init); #endif -#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) WATCHDOG_RESET(); INITCALL(initr_net); #endif diff --git a/common/spl/Kconfig b/common/spl/Kconfig index a21b71ad5d1..5fa94098e49 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1151,7 +1151,7 @@ config SPL_DM_SPI_FLASH config SPL_NET bool "Support networking" - depends on NET + depends on NET_LEGACY select SPL_USE_TINY_PRINTF_POINTER_SUPPORT if SPL_USE_TINY_PRINTF help Enable support for network devices (such as Ethernet) in SPL. @@ -1160,6 +1160,9 @@ config SPL_NET the network stack uses a number of environment variables. See also SPL_ETH. +config SPL_NET_LEGACY + def_bool y if SPL_NET + config SPL_NET_VCI_STRING string "BOOTP Vendor Class Identifier string sent by SPL" depends on SPL_NET -- cgit v1.2.3 From 95d66d2eb02a4677c63d04c84ca21750a04c49f1 Mon Sep 17 00:00:00 2001 From: Quentin Schulz Date: Mon, 20 Apr 2026 13:36:10 +0200 Subject: simplify NET_LEGACY || NET_LWIP condition with NET condition Since the move to make NET a menuconfig and NO_NET a synonym of NET=n, when NET is enabled, NET_LEGACY || NET_LWIP is necessarily true, so let's simplify the various checks across the codebase. SPL_NET_LWIP doesn't exist but SPL_NET_LEGACY is an alias for SPL_NET so the proper symbol is still defined in SPL whenever needed. Signed-off-by: Quentin Schulz Reviewed-by: Simon Glass Reviewed-by: Peter Robinson Reviewed-by: Tom Rini --- common/Kconfig | 2 +- common/board_r.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/Kconfig b/common/Kconfig index 3c3af0e3647..8e8c733aa29 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -425,7 +425,7 @@ config LOGF_FUNC_PAD config LOG_SYSLOG bool "Log output to syslog server" - depends on NET_LEGACY || NET_LWIP + depends on NET help Enables a log driver which broadcasts log records via UDP port 514 to syslog servers. diff --git a/common/board_r.c b/common/board_r.c index 37e6f51c7a7..45942910829 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -495,7 +495,7 @@ static int initr_boot_led_on(void) return 0; } -#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET) static int initr_net(void) { puts("Net: "); @@ -756,7 +756,7 @@ static void initcall_run_r(void) #if CONFIG_IS_ENABLED(PCI_ENDPOINT) INITCALL(pci_ep_init); #endif -#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET) WATCHDOG_RESET(); INITCALL(initr_net); #endif -- cgit v1.2.3