diff options
author | 2021-10-15 11:47:00 +0200 | |
---|---|---|
committer | 2021-10-21 12:35:35 +0200 | |
commit | e279317e9aeb11d8670e0a5acb10d50566eea9c9 (patch) | |
tree | db22091c5a95e1cc5dd73752bb9a7786ca848e47 /include/linux/rpmsg.h | |
parent | serial: 8250_dw: drop bogus uartclk optimisation (diff) | |
download | linux-e279317e9aeb11d8670e0a5acb10d50566eea9c9.tar.gz linux-e279317e9aeb11d8670e0a5acb10d50566eea9c9.tar.bz2 linux-e279317e9aeb11d8670e0a5acb10d50566eea9c9.zip |
rpmsg: core: add API to get MTU
Return the rpmsg buffer MTU for sending message, so rpmsg users
can split a long message in several sub rpmsg buffers.
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Link: https://lore.kernel.org/r/20211015094701.5732-2-arnaud.pouliquen@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/rpmsg.h')
-rw-r--r-- | include/linux/rpmsg.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/rpmsg.h b/include/linux/rpmsg.h index d97dcd049f18..990b80fb49ad 100644 --- a/include/linux/rpmsg.h +++ b/include/linux/rpmsg.h @@ -186,6 +186,8 @@ int rpmsg_trysend_offchannel(struct rpmsg_endpoint *ept, u32 src, u32 dst, __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp, poll_table *wait); +ssize_t rpmsg_get_mtu(struct rpmsg_endpoint *ept); + #else static inline int rpmsg_register_device(struct rpmsg_device *rpdev) @@ -296,6 +298,14 @@ static inline __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, return 0; } +static inline ssize_t rpmsg_get_mtu(struct rpmsg_endpoint *ept) +{ + /* This shouldn't be possible */ + WARN_ON(1); + + return -ENXIO; +} + #endif /* IS_ENABLED(CONFIG_RPMSG) */ /* use a macro to avoid include chaining to get THIS_MODULE */ |