summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorQuentin Schulz <[email protected]>2026-04-20 13:36:10 +0200
committerTom Rini <[email protected]>2026-04-27 11:26:40 -0600
commit95d66d2eb02a4677c63d04c84ca21750a04c49f1 (patch)
tree58ee6615053bc18d97ca85943b4fbad6a1ecc4bc /cmd
parentbd275172a84bf32a3f392b852801dee08a94956a (diff)
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Peter Robinson <[email protected]> Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/Kconfig4
-rw-r--r--cmd/bdinfo.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index f19a656146a..64f70b22e26 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1946,7 +1946,7 @@ config CMD_XXD
endmenu
-if NET_LEGACY || NET_LWIP
+if NET
menuconfig CMD_NET
bool "Network commands"
@@ -2329,7 +2329,7 @@ config CMD_PXE
endif # if CMD_NET
-endif # NET_LEGACY || NET_LWIP
+endif # NET
menu "Misc commands"
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 39e7bec3885..ddf77303735 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -152,7 +152,7 @@ static int bdinfo_print_all(struct bd_info *bd)
bdinfo_print_num_l("relocaddr", gd->relocaddr);
bdinfo_print_num_l("reloc off", gd->reloc_off);
printf("%-12s= %u-bit\n", "Build", (uint)sizeof(void *) * 8);
- if (IS_ENABLED(CONFIG_NET_LEGACY) || IS_ENABLED(CONFIG_NET_LWIP))
+ if (IS_ENABLED(CONFIG_NET))
print_eth();
bdinfo_print_num_l("fdt_blob", (ulong)map_to_sysmem(gd->fdt_blob));
if (IS_ENABLED(CONFIG_VIDEO))
@@ -194,8 +194,7 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
case 'a':
return bdinfo_print_all(bd);
case 'e':
- if (!IS_ENABLED(CONFIG_NET_LEGACY) &&
- !IS_ENABLED(CONFIG_NET_LWIP))
+ if (!IS_ENABLED(CONFIG_NET))
return CMD_RET_USAGE;
print_eth();
return CMD_RET_SUCCESS;
@@ -221,7 +220,7 @@ U_BOOT_CMD(
" - print all Board Info structure"
#if CONFIG_IS_ENABLED(GETOPT)
"\n"
-#if IS_ENABLED(CONFIG_NET_LEGACY) || IS_ENABLED(CONFIG_NET_LWIP)
+#if IS_ENABLED(CONFIG_NET)
"bdinfo -e\n"
" - print Board Info related to network\n"
#endif