From 7b11162b24fec68cfd289269f4fc239a51caae12 Mon Sep 17 00:00:00 2001 From: zhanghongyu Date: Thu, 6 Apr 2023 14:27:11 +0800 Subject: [PATCH] rpmsgdev: add tun device ioctl support In a multi-core heterogeneous architecture, tun device nodes of protocol stack core can be accessed by other cores through ioctl Signed-off-by: zhanghongyu --- drivers/misc/rpmsgdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/misc/rpmsgdev.c b/drivers/misc/rpmsgdev.c index 11f8cb224d..4ada94a45a 100644 --- a/drivers/misc/rpmsgdev.c +++ b/drivers/misc/rpmsgdev.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -39,6 +40,7 @@ #include #include #include +#include #include #include "rpmsgdev.h" @@ -639,6 +641,9 @@ static ssize_t rpmsgdev_ioctl_arglen(int cmd) case FBIOSET_POWER: case FBIOGET_POWER: return sizeof(int); + case TUNSETIFF: + case TUNGETIFF: + return sizeof(struct ifreq); default: return -ENOTTY; }