From 99707a0baaa85736529a172f515b44598e5a8bc8 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 25 Sep 2025 14:44:13 -0600 Subject: net: Remove BOOTP_VENDOREX support It has been over a decade since we had a platform that implemented the bootp vendor extension support hook. Remove this option due to lack of use. Signed-off-by: Tom Rini Acked-by: Jerome Forissier --- cmd/Kconfig | 4 ---- 1 file changed, 4 deletions(-) (limited to 'cmd') diff --git a/cmd/Kconfig b/cmd/Kconfig index 5fcf37e67b9..9929087a8bb 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1951,10 +1951,6 @@ config BOOTP_BOOTPATH Even though the config is called BOOTP_BOOTPATH, it stores the path in the variable 'rootpath'. -config BOOTP_VENDOREX - bool "Support vendor extensions from BOOTP/DHCP server" - depends on CMD_BOOTP - config BOOTP_BOOTFILESIZE bool "Request & store 'bootfilesize' from BOOTP/DHCP server" depends on CMD_BOOTP -- cgit v1.2.3 From 4b8e78585171787794611205d661b97bc5f4dd83 Mon Sep 17 00:00:00 2001 From: Jerome Forissier Date: Thu, 9 Oct 2025 14:30:14 +0200 Subject: net: make dhcp_run() common for NET and NET_LWIP There are currently two implementations of dhcp_run(): one in cmd/net.c for NET and one in net/lwip/dhcp.c for NET_LWIP. There is no justification for that. Therefore, move the NET version into net/net-common.c to be used by both stacks, and drop the NET_LWIP version which by the way does not look totally correct. Signed-off-by: Jerome Forissier Suggested-by: Tom Rini Acked-by: Benjamin Hahn --- cmd/net.c | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) (limited to 'cmd') diff --git a/cmd/net.c b/cmd/net.c index 886735ea14f..24099764493 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -134,8 +134,8 @@ U_BOOT_CMD(dhcp6, 3, 1, do_dhcp6, #endif #if defined(CONFIG_CMD_DHCP) -static int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) +int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { return netboot_common(DHCP, cmdtp, argc, argv); } @@ -145,38 +145,6 @@ U_BOOT_CMD( "boot image via network using DHCP/TFTP protocol", "[loadAddress] [[hostIPaddr:]bootfilename]" ); - -int dhcp_run(ulong addr, const char *fname, bool autoload) -{ - char *dhcp_argv[] = {"dhcp", NULL, (char *)fname, NULL}; - struct cmd_tbl cmdtp = {}; /* dummy */ - char file_addr[17]; - int old_autoload; - int ret, result; - - log_debug("addr=%lx, fname=%s, autoload=%d\n", addr, fname, autoload); - old_autoload = env_get_yesno("autoload"); - ret = env_set("autoload", autoload ? "y" : "n"); - if (ret) - return log_msg_ret("en1", -EINVAL); - - if (autoload) { - sprintf(file_addr, "%lx", addr); - dhcp_argv[1] = file_addr; - } - - result = do_dhcp(&cmdtp, 0, !autoload ? 1 : fname ? 3 : 2, dhcp_argv); - - ret = env_set("autoload", old_autoload == -1 ? NULL : - old_autoload ? "y" : "n"); - if (ret) - return log_msg_ret("en2", -EINVAL); - - if (result) - return log_msg_ret("res", -ENOENT); - - return 0; -} #endif #if defined(CONFIG_CMD_NFS) -- cgit v1.2.3