diff options
| author | Tom Rini <[email protected]> | 2025-10-22 09:07:56 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-22 09:07:56 -0600 |
| commit | 29a96acaa3a84c68264d8dcf2182000bce71175e (patch) | |
| tree | abd59b96eeb5783eb0ec7bb43423c3910a328502 /cmd | |
| parent | b21ba014a9e51ae33916ec17786fdb03587ed9b6 (diff) | |
| parent | ed6ec8d1ca0658d811df1cc78d06fec4f7f69fc9 (diff) | |
Merge tag 'net-20251022' of https://source.denx.de/u-boot/custodians/u-boot-net
Pull request net-20251022
net:
- airoha: improvements
- Tighten a few more driver dependencies
- designware: fix bitbang init error
- phy: Make driver overloading get_phy_id depend on !COMPILE_TEST
- phy: add paged PHY register accessors
- make dhcp_run() common for NET and NET_LWIP
- dwc_eth_ops: Correct check for FDT_64BIT
- mediatek: mt7988: various fixup + MDIO detach
- phy: aquantia: switch to use phy_get_ofnode(), fix bindings typo
net-legacy:
- bootp: Prevent buffer overflow to avoid leaking the RAM content
- tftp: make TFTP ports unconditionally configurable
misc:
- uthreads: Make use of CONFIG_IS_ENABLED consistently
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/Kconfig | 4 | ||||
| -rw-r--r-- | cmd/net.c | 36 |
2 files changed, 2 insertions, 38 deletions
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 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) |
