diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-03 09:14:03 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-16 18:32:46 -0700 |
commit | 87de87d5e47f94b4ea647a5bd1bc8dc1f7930db4 (patch) | |
tree | 09e0f3b084466a7abca17356cce7c39b7b1a8783 /net/socket.c | |
parent | a67fa76d8be4e24e2d61cd76438a893d4c2886f7 (diff) | |
download | linux-3.10-87de87d5e47f94b4ea647a5bd1bc8dc1f7930db4.tar.gz linux-3.10-87de87d5e47f94b4ea647a5bd1bc8dc1f7930db4.tar.bz2 linux-3.10-87de87d5e47f94b4ea647a5bd1bc8dc1f7930db4.zip |
wext: Dispatch and handle compat ioctls entirely in net/wireless/wext.c
Next we can kill the hacks in fs/compat_ioctl.c and also
dispatch compat ioctls down into the driver and 80211 protocol
helper layers in order to handle iw_point objects embedded in
stream replies which need to be translated.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index 66c4a8cf6db..81fe8251304 100644 --- a/net/socket.c +++ b/net/socket.c @@ -90,6 +90,7 @@ #include <asm/unistd.h> #include <net/compat.h> +#include <net/wext.h> #include <net/sock.h> #include <linux/netfilter.h> @@ -2210,10 +2211,19 @@ static long compat_sock_ioctl(struct file *file, unsigned cmd, { struct socket *sock = file->private_data; int ret = -ENOIOCTLCMD; + struct sock *sk; + struct net *net; + + sk = sock->sk; + net = sock_net(sk); if (sock->ops->compat_ioctl) ret = sock->ops->compat_ioctl(sock, cmd, arg); + if (ret == -ENOIOCTLCMD && + (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST)) + ret = compat_wext_handle_ioctl(net, cmd, arg); + return ret; } #endif |