From: Quentin Schulz <[email protected]>

CMD_NET_LWIP has never existed so it cannot be right. I'm guessing the
intent was to allow print_eth() to be called when NET_LWIP is defined
(NET means "legacy networking stack" as opposed to NET_LWIP which is the
 newest (and incompatible) stack). There probably was some mix-up
between CMD_NET and NET options.

The dependency on CMD_NET seems unnecessary as it seems perfectly fine
to run bdinfo without CMD_NET (build and run tested). So let's instead
make the dependency on NET || NET_LWIP.

Fixes: 95744d2527cb ("cmd: bdinfo: enable -e when CONFIG_CMD_NET_LWIP=y")
Signed-off-by: Quentin Schulz <[email protected]>
---
 cmd/bdinfo.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 20c8c97f0cd..09fe8067642 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_CMD_NET) || IS_ENABLED(CONFIG_CMD_NET_LWIP))
+       if (IS_ENABLED(CONFIG_NET) || IS_ENABLED(CONFIG_NET_LWIP))
                print_eth();
        bdinfo_print_num_l("fdt_blob", (ulong)map_to_sysmem(gd->fdt_blob));
        if (IS_ENABLED(CONFIG_VIDEO))
@@ -193,8 +193,8 @@ 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_CMD_NET) &&
-                           !IS_ENABLED(CONFIG_CMD_NET_LWIP))
+                       if (!IS_ENABLED(CONFIG_NET) &&
+                           !IS_ENABLED(CONFIG_NET_LWIP))
                                return CMD_RET_USAGE;
                        print_eth();
                        return CMD_RET_SUCCESS;

---
base-commit: 47b50fb1125c539d80ed3e7f739c02c6486e1b52
change-id: 20251217-bdinfo-lwip-eeab5b6f97a1

Best regards,
-- 
Quentin Schulz <[email protected]>

Reply via email to