diff options
author | 2008-11-28 02:44:17 +0000 | |
---|---|---|
committer | 2008-11-28 02:44:17 +0000 | |
commit | 34f0f0fd1c54e0d34e58050bb846537e88e7a968 (patch) | |
tree | 2aab646cb12e9ca85bddc28715f323aaf67dd81e /sys/dev/usb/if_kue.c | |
parent | Make growfs refuse to run on a dirty filesystem, and set the filesystem to (diff) | |
download | wireguard-openbsd-34f0f0fd1c54e0d34e58050bb846537e88e7a968.tar.xz wireguard-openbsd-34f0f0fd1c54e0d34e58050bb846537e88e7a968.zip |
Eliminate the redundant bits of code for MTU and multicast handling
from the individual drivers now that ether_ioctl() handles this.
Shrinks the i386 kernels by..
RAMDISK - 2176 bytes
RAMDISKB - 1504 bytes
RAMDISKC - 736 bytes
Tested by naddy@/okan@/sthen@/brad@/todd@/jmc@ and lots of users.
Build tested on almost all archs by todd@/brad@
ok naddy@
Diffstat (limited to 'sys/dev/usb/if_kue.c')
-rw-r--r-- | sys/dev/usb/if_kue.c | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index d6757cdf7b5..a909ecbea24 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_kue.c,v 1.57 2008/10/02 20:21:14 brad Exp $ */ +/* $OpenBSD: if_kue.c,v 1.58 2008/11/28 02:44:18 brad Exp $ */ /* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1052,7 +1052,6 @@ kue_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct kue_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; - struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; DPRINTFN(5,("%s: %s: enter\n", sc->kue_dev.dv_xname,__func__)); @@ -1083,13 +1082,6 @@ kue_ioctl(struct ifnet *ifp, u_long command, caddr_t data) } break; - case SIOCSIFMTU: - if (ifr->ifr_mtu > ETHERMTU) - error = EINVAL; - else - ifp->if_mtu = ifr->ifr_mtu; - break; - case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { if (ifp->if_flags & IFF_RUNNING && @@ -1113,26 +1105,17 @@ kue_ioctl(struct ifnet *ifp, u_long command, caddr_t data) sc->kue_if_flags = ifp->if_flags; error = 0; break; - case SIOCADDMULTI: - case SIOCDELMULTI: - error = (command == SIOCADDMULTI) ? - ether_addmulti(ifr, &sc->arpcom) : - ether_delmulti(ifr, &sc->arpcom); - - if (error == ENETRESET) { - /* - * Multicast list has changed; set the hardware - * filter accordingly. - */ - if (ifp->if_flags & IFF_RUNNING) - kue_setmulti(sc); - error = 0; - } - break; + default: error = ether_ioctl(ifp, &sc->arpcom, command, data); } + if (error == ENETRESET) { + if (ifp->if_flags & IFF_RUNNING) + kue_setmulti(sc); + error = 0; + } + splx(s); return (error); } |