You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/04/27 01:53:50 UTC

[incubator-nuttx] 01/02: drivers/rptun: replace 'rxbuf_size' and 'txbuf_size' to 'buf_size' in struct 'rptun_rsc_s'.

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 546e35fc98e171feb720d192eb5f4cc53546ce66
Author: zhongan <zh...@xiaomi.com>
AuthorDate: Sun Apr 26 19:11:25 2020 +0800

    drivers/rptun: replace 'rxbuf_size' and 'txbuf_size' to 'buf_size' in struct 'rptun_rsc_s'.
    
    Change-Id: I7c9da4bd985712a3fde4c56999901434740b33f7
    Signed-off-by: zhongan <zh...@xiaomi.com>
---
 drivers/rptun/rptun.c       | 4 ++--
 include/nuttx/rptun/rptun.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c
index 0a75c2e..ea1c21a 100644
--- a/drivers/rptun/rptun.c
+++ b/drivers/rptun/rptun.c
@@ -441,8 +441,8 @@ static int rptun_dev_start(FAR struct remoteproc *rproc)
       rsc->rpmsg_vring1.da = da1;
 
       shbuf   = (FAR char *)rsc + tbsz + v0sz + v1sz;
-      shbufsz = rsc->buf_size *
-                (rsc->rpmsg_vring0.num + rsc->rpmsg_vring1.num);
+      shbufsz = rsc->config.txbuf_size * rsc->rpmsg_vring0.num +
+                rsc->config.rxbuf_size * rsc->rpmsg_vring1.num;
 
       rpmsg_virtio_init_shm_pool(&priv->shm_pool, shbuf, shbufsz);
 
diff --git a/include/nuttx/rptun/rptun.h b/include/nuttx/rptun/rptun.h
index 194ba80..6eb2774 100644
--- a/include/nuttx/rptun/rptun.h
+++ b/include/nuttx/rptun/rptun.h
@@ -260,7 +260,7 @@ struct __attribute__((aligned(B2C(8)))) rptun_rsc_s
   struct fw_rsc_vdev       rpmsg_vdev;
   struct fw_rsc_vdev_vring rpmsg_vring0;
   struct fw_rsc_vdev_vring rpmsg_vring1;
-  unsigned int             buf_size;
+  struct fw_rsc_config     config;
 };
 
 struct rptun_dev_s;