Module: xenomai-3 Branch: wip/rtnet-fixes Commit: 80a2ef18b17016addab8460de34c0a226a4db6cb URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=80a2ef18b17016addab8460de34c0a226a4db6cb
Author: Philippe Gerum <r...@xenomai.org> Date: Thu Jan 18 10:49:19 2018 +0100 net/socket: forward private ioctl requests to NIC driver This allows RTnet to define requests in the SIOCPROTOPRIVATE range for identifying device-specific features added to the converted NIC driver. Therefore, no excution mode is enforced by the base handler, the callee should check for the current mode, returning -ENOSYS to trigger the adaptive switch if required. --- kernel/drivers/net/stack/socket.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/kernel/drivers/net/stack/socket.c b/kernel/drivers/net/stack/socket.c index 146b308..92cdb9f 100644 --- a/kernel/drivers/net/stack/socket.c +++ b/kernel/drivers/net/stack/socket.c @@ -348,9 +348,16 @@ int rt_socket_if_ioctl(struct rtdm_fd *fd, int request, void __user *arg) ret = -EOPNOTSUPP; break; + case SIOCDEVPRIVATE ... SIOCDEVPRIVATE + 15: + if (rtdev->do_ioctl != NULL) + ret = rtdev->do_ioctl(rtdev, ifr, request); + else + ret = -EOPNOTSUPP; + break; + default: - ret = -EOPNOTSUPP; - break; + ret = -EOPNOTSUPP; + break; } out: _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git