diff options
| author | dyoung <dyoung@NetBSD.org> | 2008-02-07 01:21:52 +0000 |
|---|---|---|
| committer | dyoung <dyoung@NetBSD.org> | 2008-02-07 01:21:52 +0000 |
| commit | 2ccede0a9c78ce5a2ea80ccfebc140e543a8679c (patch) | |
| tree | e75d5563bc5787696ff61b7cfdaf95c6ba77e6be /sys/dev/ppbus | |
| parent | 809c851d23f2ba54b7b479f2d05f03ee6c7994b7 (diff) | |
Start patching up the kernel so that a network driver always has
the opportunity to handle an ioctl before generic ifioctl handling
occurs. This will ease extending the kernel and sharing of code
between drivers.
First steps: Make the signature of ifioctl_common() match struct
ifinet->if_ioctl. Convert SIOCSIFCAP and SIOCSIFMTU to the new
ifioctl() regime, throughout the kernel.
Diffstat (limited to 'sys/dev/ppbus')
| -rw-r--r-- | sys/dev/ppbus/if_plip.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/ppbus/if_plip.c b/sys/dev/ppbus/if_plip.c index c089ef5a4d1..7c97ce6f541 100644 --- a/sys/dev/ppbus/if_plip.c +++ b/sys/dev/ppbus/if_plip.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_plip.c,v 1.15 2007/10/19 12:01:07 ad Exp $ */ +/* $NetBSD: if_plip.c,v 1.16 2008/02/07 01:21:58 dyoung Exp $ */ /*- * Copyright (c) 1997 Poul-Henning Kamp @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.15 2007/10/19 12:01:07 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.16 2008/02/07 01:21:58 dyoung Exp $"); /* * Parallel port TCP/IP interfaces added. I looked at the driver from @@ -432,11 +432,10 @@ lpioctl (struct ifnet *ifp, u_long cmd, void *data) } if(ptr) free(ptr,M_DEVBUF); - sc->sc_if.if_mtu = ifr->ifr_mtu; - break; - + /*FALLTHROUGH*/ case SIOCGIFMTU: - ifr->ifr_mtu = sc->sc_if.if_mtu; + if ((error = ifioctl_common(ifp, command, data)) == ENETRESET) + error = 0; break; case SIOCADDMULTI: |
