summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/net.c3
-rw-r--r--include/net-common.h12
-rw-r--r--include/net-lwip.h1
3 files changed, 13 insertions, 3 deletions
diff --git a/cmd/net.c b/cmd/net.c
index 79525f73a51..eaa1de5295f 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -456,8 +456,7 @@ static int netboot_common(enum proto_t proto, struct cmd_tbl *cmdtp, int argc,
}
#if defined(CONFIG_CMD_PING)
-static int do_ping(struct cmd_tbl *cmdtp, int flag, int argc,
- char *const argv[])
+int do_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/include/net-common.h b/include/net-common.h
index 0b7edd7d76b..e536968a92b 100644
--- a/include/net-common.h
+++ b/include/net-common.h
@@ -493,6 +493,18 @@ int net_loop(enum proto_t protocol);
*/
int dhcp_run(ulong addr, const char *fname, bool autoload);
+
+/**
+ * do_ping - Run the ping 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_ping(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
+
/**
* do_tftpb - Run the tftpboot command
*
diff --git a/include/net-lwip.h b/include/net-lwip.h
index 0d3bb8a8bd8..b762956e8fd 100644
--- a/include/net-lwip.h
+++ b/include/net-lwip.h
@@ -34,7 +34,6 @@ 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_ping(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[]);
#endif /* __NET_LWIP_H__ */