Module: xenomai-3
Branch: wip/rtnet-fixes
Commit: 32be9614e6c56f51f751d7189284487a6b4fa73a
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=32be9614e6c56f51f751d7189284487a6b4fa73a

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

Reply via email to