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 <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Quentin Schulz
2026-04-20 13:36:10 +02:00
committed by Tom Rini
parent bd275172a8
commit 95d66d2eb0
23 changed files with 39 additions and 42 deletions

View File

@@ -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();