@@ -989,6 +989,13 @@ static __poll_t qcom_smd_poll(struct rpmsg_endpoint *ept,
return mask;
}
+static ssize_t qcom_smd_get_mtu(struct rpmsg_endpoint *ept)
+{
+ struct qcom_smd_endpoint *qsept = to_smd_endpoint(ept);
+
+ return qcom_smd_get_tx_avail(qsept->qsch);
+}
+
/*
* Finds the device_node for the smd child interested in this channel.
*/
@@ -1040,6 +1047,7 @@ static const struct rpmsg_endpoint_ops qcom_smd_endpoint_ops = {
.send = qcom_smd_send,
.trysend = qcom_smd_trysend,
.poll = qcom_smd_poll,
+ .get_mtu = qcom_smd_get_mtu,
};
static void qcom_smd_release_device(struct device *dev)
Implement the get_mtu ops to return the maximum size of the message that can be sent. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> --- drivers/rpmsg/qcom_smd.c | 8 ++++++++ 1 file changed, 8 insertions(+)