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 --- include/configs/stm32mp15_common.h | 2 +- include/configs/stm32mp23_common.h | 2 +- include/configs/stm32mp25_common.h | 2 +- include/env_callback.h | 2 +- include/env_flags.h | 6 +++--- include/net-common.h | 4 ++-- include/net-legacy.h | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h index 9cac31bcf47..9a87b479176 100644 --- a/include/configs/stm32mp15_common.h +++ b/include/configs/stm32mp15_common.h @@ -41,7 +41,7 @@ #define BOOT_TARGET_MMC2(func) #endif -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY #define BOOT_TARGET_PXE(func) func(PXE, pxe, na) #else #define BOOT_TARGET_PXE(func) diff --git a/include/configs/stm32mp23_common.h b/include/configs/stm32mp23_common.h index 7285886b822..392d779ec16 100644 --- a/include/configs/stm32mp23_common.h +++ b/include/configs/stm32mp23_common.h @@ -29,7 +29,7 @@ #ifdef CONFIG_DISTRO_DEFAULTS /*****************************************************************************/ -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY #define BOOT_TARGET_PXE(func) func(PXE, pxe, na) #else #define BOOT_TARGET_PXE(func) diff --git a/include/configs/stm32mp25_common.h b/include/configs/stm32mp25_common.h index b42316fd8ac..a334b47b555 100644 --- a/include/configs/stm32mp25_common.h +++ b/include/configs/stm32mp25_common.h @@ -25,7 +25,7 @@ #ifdef CONFIG_DISTRO_DEFAULTS /*****************************************************************************/ -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY #define BOOT_TARGET_PXE(func) func(PXE, pxe, na) #else #define BOOT_TARGET_PXE(func) diff --git a/include/env_callback.h b/include/env_callback.h index 918ccb3b14f..f7bb23df569 100644 --- a/include/env_callback.h +++ b/include/env_callback.h @@ -32,7 +32,7 @@ #define DNS_CALLBACK #endif -#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) #define NET_CALLBACKS \ "bootfile:bootfile," \ "ipaddr:ipaddr," \ diff --git a/include/env_flags.h b/include/env_flags.h index 0c48874690f..85721a89cfb 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -14,7 +14,7 @@ enum env_flags_vartype { env_flags_vartype_decimal, env_flags_vartype_hex, env_flags_vartype_bool, -#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) env_flags_vartype_ipaddr, env_flags_vartype_macaddr, #endif @@ -41,7 +41,7 @@ enum env_flags_varaccess { #define CFG_ENV_FLAGS_LIST_STATIC "" #endif -#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) #ifdef CONFIG_REGEX #define ETHADDR_WILDCARD "\\d*" #else @@ -123,7 +123,7 @@ enum env_flags_varaccess env_flags_parse_varaccess(const char *flags); */ enum env_flags_varaccess env_flags_parse_varaccess_from_binflags(int binflags); -#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) /* * Check if a string has the format of an Ethernet MAC address */ diff --git a/include/net-common.h b/include/net-common.h index f293b21bc0b..0cbdf344664 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -235,7 +235,7 @@ int eth_rx(void); /* Check for received packets */ */ void reset_phy(void); -#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) /** * eth_set_enable_bootdevs() - Enable or disable binding of Ethernet bootdevs * @@ -485,7 +485,7 @@ int net_init(void); /* Called when a network operation fails to know if it should be re-tried */ int net_start_again(void); -/* NET compatibility */ +/* NET_LEGACY compatibility */ enum proto_t; int net_loop(enum proto_t protocol); diff --git a/include/net-legacy.h b/include/net-legacy.h index d489c2480cd..d3b122c9062 100644 --- a/include/net-legacy.h +++ b/include/net-legacy.h @@ -281,7 +281,7 @@ extern struct in_addr net_dns_server2; #endif extern char net_nis_domain[32]; /* Our IS domain */ extern char net_hostname[32]; /* Our hostname */ -#ifdef CONFIG_NET +#ifdef CONFIG_NET_LEGACY extern char net_root_path[CONFIG_BOOTP_MAX_ROOT_PATH_LEN]; /* Our root path */ #endif /** END OF BOOTP EXTENTIONS **/ -- 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 --- include/env_callback.h | 2 +- include/env_flags.h | 6 +++--- include/net-common.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/env_callback.h b/include/env_callback.h index f7bb23df569..1181ab4a157 100644 --- a/include/env_callback.h +++ b/include/env_callback.h @@ -32,7 +32,7 @@ #define DNS_CALLBACK #endif -#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET) #define NET_CALLBACKS \ "bootfile:bootfile," \ "ipaddr:ipaddr," \ diff --git a/include/env_flags.h b/include/env_flags.h index 85721a89cfb..123fdbcb0ba 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -14,7 +14,7 @@ enum env_flags_vartype { env_flags_vartype_decimal, env_flags_vartype_hex, env_flags_vartype_bool, -#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET) env_flags_vartype_ipaddr, env_flags_vartype_macaddr, #endif @@ -41,7 +41,7 @@ enum env_flags_varaccess { #define CFG_ENV_FLAGS_LIST_STATIC "" #endif -#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET) #ifdef CONFIG_REGEX #define ETHADDR_WILDCARD "\\d*" #else @@ -123,7 +123,7 @@ enum env_flags_varaccess env_flags_parse_varaccess(const char *flags); */ enum env_flags_varaccess env_flags_parse_varaccess_from_binflags(int binflags); -#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET) /* * Check if a string has the format of an Ethernet MAC address */ diff --git a/include/net-common.h b/include/net-common.h index 0cbdf344664..69b6316c1ec 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -235,7 +235,7 @@ int eth_rx(void); /* Check for received packets */ */ void reset_phy(void); -#if CONFIG_IS_ENABLED(NET_LEGACY) || CONFIG_IS_ENABLED(NET_LWIP) +#if CONFIG_IS_ENABLED(NET) /** * eth_set_enable_bootdevs() - Enable or disable binding of Ethernet bootdevs * -- cgit v1.2.3