From 7bc7369102aaa2c60e846b292424acfd86f4f597 Mon Sep 17 00:00:00 2001 From: yintao Date: Tue, 18 Jun 2024 19:40:33 +0800 Subject: [PATCH] drivers/rpmsg: Use tx buffer size as payload length Directly use tx length received from hub as the tx payload length. Signed-off-by: yintao --- drivers/rpmsg/rpmsg_router_edge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rpmsg/rpmsg_router_edge.c b/drivers/rpmsg/rpmsg_router_edge.c index 1a61f3166e..f94822c618 100644 --- a/drivers/rpmsg/rpmsg_router_edge.c +++ b/drivers/rpmsg/rpmsg_router_edge.c @@ -159,7 +159,7 @@ rpmsg_router_edge_get_tx_payload_buffer(FAR struct rpmsg_device *rdev, } buf = hubdev->ops.get_tx_payload_buffer(hubdev, len, wait); - *len = edge->tx_len - (rpmsg_get_tx_buffer_size(rdev) - *len); + *len = edge->tx_len; return buf; }