Commit d380ed5e authored by Matthew Wilcox's avatar Matthew Wilcox Committed by David S. Miller

[NET]: Cleanup wan/packet ioctls.

parent a0b53804
...@@ -1432,8 +1432,7 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd, ...@@ -1432,8 +1432,7 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
switch(cmd) switch(cmd) {
{
case SIOCOUTQ: case SIOCOUTQ:
{ {
int amount = atomic_read(&sk->wmem_alloc); int amount = atomic_read(&sk->wmem_alloc);
...@@ -1452,35 +1451,12 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd, ...@@ -1452,35 +1451,12 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
return put_user(amount, (int *)arg); return put_user(amount, (int *)arg);
} }
case SIOCGSTAMP: case SIOCGSTAMP:
if(sk->stamp.tv_sec==0) if (sk->stamp.tv_sec==0)
return -ENOENT; return -ENOENT;
if (copy_to_user((void *)arg, &sk->stamp, if (copy_to_user((void *)arg, &sk->stamp,
sizeof(struct timeval))) sizeof(struct timeval)))
return -EFAULT; return -EFAULT;
break; break;
case SIOCGIFFLAGS:
#ifndef CONFIG_INET
case SIOCSIFFLAGS:
#endif
case SIOCGIFCONF:
case SIOCGIFMETRIC:
case SIOCSIFMETRIC:
case SIOCGIFMEM:
case SIOCSIFMEM:
case SIOCGIFMTU:
case SIOCSIFMTU:
case SIOCSIFLINK:
case SIOCGIFHWADDR:
case SIOCSIFHWADDR:
case SIOCSIFMAP:
case SIOCGIFMAP:
case SIOCSIFSLAVE:
case SIOCGIFSLAVE:
case SIOCGIFINDEX:
case SIOCGIFNAME:
case SIOCGIFCOUNT:
case SIOCSIFHWBROADCAST:
return(dev_ioctl(cmd,(void *) arg));
#ifdef CONFIG_INET #ifdef CONFIG_INET
case SIOCADDRT: case SIOCADDRT:
...@@ -1501,7 +1477,7 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd, ...@@ -1501,7 +1477,7 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd,
#endif #endif
default: default:
return -EOPNOTSUPP; return dev_ioctl(cmd, (void *)arg);
} }
return 0; return 0;
} }
......
...@@ -1922,30 +1922,6 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar ...@@ -1922,30 +1922,6 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar
sock->file->f_flags |= O_NONBLOCK; sock->file->f_flags |= O_NONBLOCK;
return 0; return 0;
case SIOCGIFFLAGS:
#ifndef CONFIG_INET
case SIOCSIFFLAGS:
#endif
case SIOCGIFCONF:
case SIOCGIFMETRIC:
case SIOCSIFMETRIC:
case SIOCGIFMEM:
case SIOCSIFMEM:
case SIOCGIFMTU:
case SIOCSIFMTU:
case SIOCSIFLINK:
case SIOCGIFHWADDR:
case SIOCSIFHWADDR:
case SIOCSIFMAP:
case SIOCGIFMAP:
case SIOCSIFSLAVE:
case SIOCGIFSLAVE:
case SIOCGIFINDEX:
case SIOCGIFNAME:
case SIOCGIFCOUNT:
case SIOCSIFHWBROADCAST:
return(dev_ioctl(cmd,(void *) arg));
#ifdef CONFIG_INET #ifdef CONFIG_INET
case SIOCADDRT: case SIOCADDRT:
case SIOCDELRT: case SIOCDELRT:
...@@ -1968,7 +1944,7 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar ...@@ -1968,7 +1944,7 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar
#endif #endif
default: default:
return -EOPNOTSUPP; return dev_ioctl(cmd,(void *) arg);
} }
/*NOTREACHED*/ /*NOTREACHED*/
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment