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_url.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_url.c')
-rw-r--r-- | sys/dev/usb/if_url.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index adb06f86c58..9c2dbcc6ec2 100644 --- a/sys/dev/usb/if_url.c +++ b/sys/dev/usb/if_url.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_url.c,v 1.53 2008/11/06 02:32:29 brad Exp $ */ +/* $OpenBSD: if_url.c,v 1.54 2008/11/28 02:44:18 brad Exp $ */ /* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */ /* * Copyright (c) 2001, 2002 @@ -1116,13 +1116,6 @@ url_ioctl(struct ifnet *ifp, u_long cmd, 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 && @@ -1141,27 +1134,23 @@ url_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } error = 0; break; - case SIOCADDMULTI: - case SIOCDELMULTI: - error = (cmd == SIOCADDMULTI) ? - ether_addmulti(ifr, &sc->sc_ac) : - ether_delmulti(ifr, &sc->sc_ac); - if (error == ENETRESET) { - if (ifp->if_flags & IFF_RUNNING) - url_setmulti(sc); - error = 0; - } - break; case SIOCGIFMEDIA: case SIOCSIFMEDIA: mii = GET_MII(sc); error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd); break; + default: error = ether_ioctl(ifp, &sc->sc_ac, cmd, data); } + if (error == ENETRESET) { + if (ifp->if_flags & IFF_RUNNING) + url_setmulti(sc); + error = 0; + } + splx(s); return (error); } |