.. | .. |
---|
319 | 319 | } |
---|
320 | 320 | EXPORT_SYMBOL(rpmsg_set_signals); |
---|
321 | 321 | |
---|
| 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 | + |
---|
322 | 345 | /* |
---|
323 | 346 | * match a rpmsg channel with a channel info struct. |
---|
324 | 347 | * this is used to make sure we're not creating rpmsg devices for channels |
---|