summaryrefslogtreecommitdiffstats
path: root/common/ratp/ratp.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-02-24 16:01:16 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-03-01 09:39:42 +0100
commitec42940ea194f3089c5b2d29a06d61d7d03e94d9 (patch)
tree85c8a4dfe68f10b3d8c65854f67d21263aaca5de /common/ratp/ratp.c
parent4cf99a772cf2494db74ff6872fae5bd2d2a03afa (diff)
downloadbarebox-ec42940ea194f3089c5b2d29a06d61d7d03e94d9.tar.gz
barebox-ec42940ea194f3089c5b2d29a06d61d7d03e94d9.tar.xz
ratp: implement ping as a standard ratp command
Signed-off-by: Aleksander Morgado <aleksander@aleksander.es> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/ratp/ratp.c')
-rw-r--r--common/ratp/ratp.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/common/ratp/ratp.c b/common/ratp/ratp.c
index 7c8a2f6f58..965c67a0a1 100644
--- a/common/ratp/ratp.c
+++ b/common/ratp/ratp.c
@@ -189,25 +189,6 @@ static int ratp_bb_send_command_return(struct ratp_ctx *ctx, uint32_t errno)
return ret;
}
-static int ratp_bb_send_pong(struct ratp_ctx *ctx)
-{
- void *buf;
- struct ratp_bb *rbb;
- int len = sizeof(*rbb);
- int ret;
-
- buf = xzalloc(len);
- rbb = buf;
-
- rbb->type = cpu_to_be16(BB_RATP_TYPE_PONG);
-
- ret = ratp_send(&ctx->ratp, buf, len);
-
- free(buf);
-
- return ret;
-}
-
static int ratp_bb_send_getenv_return(struct ratp_ctx *ctx, const char *val)
{
void *buf;
@@ -270,7 +251,6 @@ static int ratp_bb_dispatch(struct ratp_ctx *ctx, const void *buf, int len)
break;
case BB_RATP_TYPE_COMMAND_RETURN:
- case BB_RATP_TYPE_PONG:
break;
case BB_RATP_TYPE_CONSOLEMSG:
@@ -280,10 +260,6 @@ static int ratp_bb_dispatch(struct ratp_ctx *ctx, const void *buf, int len)
kfifo_put(ctx->console_recv_fifo, rbb->data, dlen);
break;
- case BB_RATP_TYPE_PING:
- ret = ratp_bb_send_pong(ctx);
- break;
-
case BB_RATP_TYPE_GETENV:
varname = xmemdup_add_zero(&rbb->data, dlen);