diff options
| author | Jerome Forissier <jerome.forissier@linaro.org> | 2025-10-09 14:30:14 +0200 |
|---|---|---|
| committer | Jerome Forissier <jerome.forissier@linaro.org> | 2025-10-22 14:28:33 +0200 |
| commit | 4b8e78585171787794611205d661b97bc5f4dd83 (patch) | |
| tree | 4b7b7e6cfbd66ee7c393da745e3600e201d152be /include | |
| parent | b24268d151a0c28772785e14703491364becda5b (diff) | |
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 <jerome.forissier@linaro.org>
Suggested-by: Tom Rini <trini@konsulko.com>
Acked-by: Benjamin Hahn <B.Hahn@phytec.de>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net-common.h | 10 | ||||
| -rw-r--r-- | include/net-lwip.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/net-common.h b/include/net-common.h index 1112af381a9..78d98e5bba0 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -479,6 +479,16 @@ int net_loop(enum proto_t protocol); */ int dhcp_run(ulong addr, const char *fname, bool autoload); +/** + * do_dhcp - Run the dhcp command + * + * @cmdtp: Unused + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * Return: result (see enum command_ret_t) + */ +int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); /** * do_ping - Run the ping command diff --git a/include/net-lwip.h b/include/net-lwip.h index e88e2186635..c910def5719 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -50,7 +50,6 @@ int net_lwip_dns_resolve(char *name_or_ip, ip_addr_t *ip); */ bool wget_validate_uri(char *uri); -int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_dns(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_wget(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); |
