Skip to contentSkip to conversation

update packet & wanpipe ioctl routines

PATCH In review Matthew Wilcox 4 participants 4 messages Oct 31, 2002 – Nov 2, 2002

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 update packet & wanpipe ioctl routines

Convert af_packet.c and af_wanpipe.c to call dev_ioctl by default. I'm less than convinced these protocols should be calling inet_ioctl, but I'm not going to change that behaviour.

net/packet/af_packet.c +3 -27
diff -urpNX dontdiff linux-2.5.45/net/packet/af_packet.c linux-2.5.45-willy/net/packet/af_packet.c
@@ -1432,8 +1432,7 @@ static int packet_ioctl(struct socket *s
 {
 	struct sock *sk = sock->sk;
 
-	switch(cmd) 
-	{
+	switch(cmd) {
 		case SIOCOUTQ:
 		{
 			int amount = atomic_read(&sk->wmem_alloc);
@@ -1452,35 +1451,12 @@ static int packet_ioctl(struct socket *s
 			return put_user(amount, (int *)arg);
 		}
 		case SIOCGSTAMP:
-			if(sk->stamp.tv_sec==0)
+			if (sk->stamp.tv_sec==0)
 				return -ENOENT;
 			if (copy_to_user((void *)arg, &sk->stamp,
 					 sizeof(struct timeval)))
 				return -EFAULT;
 			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
 		case SIOCADDRT:
@@ -1501,7 +1477,7 @@ static int packet_ioctl(struct socket *s
 #endif
 
 		default:
-			return -EOPNOTSUPP;
+			return dev_ioctl(cmd, (void *)arg);
 	}
 	return 0;
 }
net/wanrouter/af_wanpipe.c +1 -25
diff -urpNX dontdiff linux-2.5.45/net/wanrouter/af_wanpipe.c linux-2.5.45-willy/net/wanrouter/af_wanpipe.c
@@ -1922,30 +1922,6 @@ static int wanpipe_ioctl(struct socket *
 			sock->file->f_flags |= O_NONBLOCK;
 			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
 		case SIOCADDRT:
 		case SIOCDELRT:
@@ -1968,7 +1944,7 @@ static int wanpipe_ioctl(struct socket *
 #endif
 
 		default:
-			return -EOPNOTSUPP;
+			return dev_ioctl(cmd,(void *) arg);
 	}
 	/*NOTREACHED*/
 }
Signature · 1 line
Revolutions do not require corporate support.
#1 lore raw

kernel.org is down?

Hi!

What's the matter with kernel.org (http,ftp)?

Cheers

-----------------------------------
Gabor Micsko
Compaq Accredited Platform Specialist, System Engineer (APS, ASE) Szintézis Computer Rendszerház Kft.
H-9021 Gyor, Tihanyi Árpád út. 2.
Tel: +36-96-502-216
Fax: +36-96-318-658
E-mail: [email protected]

#2 lore raw

Re: kernel.org is down?

Quoted 4 lines · Gabor MICSKO

Hi!

What's the matter with kernel.org (http,ftp)?

There was an anouncment about that on http://kernel.org/
hardware maintainance IIRC.

Signature · 3 lines
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:[email protected]
Don't do this at home kids: touch -- -rf