diff --git a/lib/rpmsg/rpmsg_virtio.c b/lib/rpmsg/rpmsg_virtio.c index ac75c836..6ea1def2 100644 --- a/lib/rpmsg/rpmsg_virtio.c +++ b/lib/rpmsg/rpmsg_virtio.c @@ -727,8 +727,7 @@ int rpmsg_virtio_get_tx_buffer_size(struct rpmsg_device *rdev) * If other core is host then buffers are provided by it, * so get the buffer size from the virtqueue. */ - size = (int)virtqueue_get_desc_size(rvdev->svq) - - sizeof(struct rpmsg_hdr); + size = rvdev->config.r2h_buf_size - sizeof(struct rpmsg_hdr); } if (size <= 0) @@ -763,8 +762,7 @@ int rpmsg_virtio_get_rx_buffer_size(struct rpmsg_device *rdev) * If other core is host then buffers are provided by it, * so get the buffer size from the virtqueue. */ - size = (int)virtqueue_get_desc_size(rvdev->rvq) - - sizeof(struct rpmsg_hdr); + size = rvdev->config.h2r_buf_size - sizeof(struct rpmsg_hdr); } if (size <= 0)