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 --- test/cmd/Makefile | 2 +- test/cmd/bdinfo.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'test/cmd') diff --git a/test/cmd/Makefile b/test/cmd/Makefile index 8c9f112782d..5f2815b1bb6 100644 --- a/test/cmd/Makefile +++ b/test/cmd/Makefile @@ -39,7 +39,7 @@ obj-$(CONFIG_CMD_PWM) += pwm.o obj-$(CONFIG_CMD_READ) += rw.o obj-$(CONFIG_CMD_SETEXPR) += setexpr.o obj-$(CONFIG_CMD_TEMPERATURE) += temperature.o -ifdef CONFIG_NET +ifdef CONFIG_NET_LEGACY obj-$(CONFIG_CMD_WGET) += wget.o endif obj-$(CONFIG_ARM_FFA_TRANSPORT) += armffa.o diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c index c3a3519d16d..3233a0a6a51 100644 --- a/test/cmd/bdinfo.c +++ b/test/cmd/bdinfo.c @@ -172,7 +172,7 @@ static int bdinfo_test_all(struct unit_test_state *uts) ut_assertok(test_num_l(uts, "reloc off", gd->reloc_off)); ut_assert_nextline("%-12s= %u-bit", "Build", (uint)sizeof(void *) * 8); - if (IS_ENABLED(CONFIG_NET) || IS_ENABLED(CONFIG_NET_LWIP)) + if (IS_ENABLED(CONFIG_NET_LEGACY) || IS_ENABLED(CONFIG_NET_LWIP)) ut_assertok(test_eth(uts)); /* @@ -314,7 +314,7 @@ static int bdinfo_test_help(struct unit_test_state *uts) ut_assert_nextlinen("bdinfo -a"); ut_assert_nextlinen(" - print all Board Info structure"); if (CONFIG_IS_ENABLED(GETOPT)) { - if (IS_ENABLED(CONFIG_NET) || IS_ENABLED(CONFIG_NET_LWIP)) { + if (IS_ENABLED(CONFIG_NET_LEGACY) || IS_ENABLED(CONFIG_NET_LWIP)) { ut_assert_nextlinen("bdinfo -e"); ut_assert_nextlinen(" - print Board Info related to network"); } @@ -348,7 +348,7 @@ static int bdinfo_test_eth(struct unit_test_state *uts) ut_assertok(run_commandf("bdinfo -e")); if (!CONFIG_IS_ENABLED(GETOPT)) ut_assertok(bdinfo_test_all(uts)); - else if (IS_ENABLED(CONFIG_NET) || IS_ENABLED(CONFIG_NET_LWIP)) + else if (IS_ENABLED(CONFIG_NET_LEGACY) || IS_ENABLED(CONFIG_NET_LWIP)) ut_assertok(test_eth(uts)); ut_assert_console_end(); -- 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 --- test/cmd/bdinfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/cmd') diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c index 3233a0a6a51..7f4f1868c6a 100644 --- a/test/cmd/bdinfo.c +++ b/test/cmd/bdinfo.c @@ -172,7 +172,7 @@ static int bdinfo_test_all(struct unit_test_state *uts) ut_assertok(test_num_l(uts, "reloc off", gd->reloc_off)); ut_assert_nextline("%-12s= %u-bit", "Build", (uint)sizeof(void *) * 8); - if (IS_ENABLED(CONFIG_NET_LEGACY) || IS_ENABLED(CONFIG_NET_LWIP)) + if (IS_ENABLED(CONFIG_NET)) ut_assertok(test_eth(uts)); /* @@ -314,7 +314,7 @@ static int bdinfo_test_help(struct unit_test_state *uts) ut_assert_nextlinen("bdinfo -a"); ut_assert_nextlinen(" - print all Board Info structure"); if (CONFIG_IS_ENABLED(GETOPT)) { - if (IS_ENABLED(CONFIG_NET_LEGACY) || IS_ENABLED(CONFIG_NET_LWIP)) { + if (IS_ENABLED(CONFIG_NET)) { ut_assert_nextlinen("bdinfo -e"); ut_assert_nextlinen(" - print Board Info related to network"); } @@ -348,7 +348,7 @@ static int bdinfo_test_eth(struct unit_test_state *uts) ut_assertok(run_commandf("bdinfo -e")); if (!CONFIG_IS_ENABLED(GETOPT)) ut_assertok(bdinfo_test_all(uts)); - else if (IS_ENABLED(CONFIG_NET_LEGACY) || IS_ENABLED(CONFIG_NET_LWIP)) + else if (IS_ENABLED(CONFIG_NET)) ut_assertok(test_eth(uts)); ut_assert_console_end(); -- cgit v1.2.3