hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/rpmsg/rpmsg_core.c
....@@ -319,6 +319,29 @@
319319 }
320320 EXPORT_SYMBOL(rpmsg_set_signals);
321321
322
+#ifdef CONFIG_NO_GKI
323
+/**
324
+ * rpmsg_get_mtu() - get maximum transmission buffer size for sending message.
325
+ * @ept: the rpmsg endpoint
326
+ *
327
+ * This function returns maximum buffer size available for a single outgoing message.
328
+ *
329
+ * Return: the maximum transmission size on success and an appropriate error
330
+ * value on failure.
331
+ */
332
+
333
+ssize_t rpmsg_get_mtu(struct rpmsg_endpoint *ept)
334
+{
335
+ if (WARN_ON(!ept))
336
+ return -EINVAL;
337
+ if (!ept->ops->get_mtu)
338
+ return -ENOTSUPP;
339
+
340
+ return ept->ops->get_mtu(ept);
341
+}
342
+EXPORT_SYMBOL(rpmsg_get_mtu);
343
+#endif
344
+
322345 /*
323346 * match a rpmsg channel with a channel info struct.
324347 * this is used to make sure we're not creating rpmsg devices for channels