Module: xenomai-3 Branch: next Commit: ef9fea645dfcad584543dd1659dc3abe977ab632 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=ef9fea645dfcad584543dd1659dc3abe977ab632
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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/drivers/net/stack/socket.c b/kernel/drivers/net/stack/socket.c index c139d95..f2622d3 100644 --- a/kernel/drivers/net/stack/socket.c +++ b/kernel/drivers/net/stack/socket.c @@ -348,6 +348,13 @@ int rt_socket_if_ioctl(struct rtdm_fd *fd, int request, void __user *arg) ret = -EOPNOTSUPP; break; + case SIOCPROTOPRIVATE ... SIOCPROTOPRIVATE + 15: + if (rtdev->do_ioctl != NULL) + ret = rtdev->do_ioctl(rtdev, ifr, request); + else + ret = -EOPNOTSUPP; + break; + default: ret = -EOPNOTSUPP; break; _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git