diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-11-28 02:44:19 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-11-28 02:44:19 +0000 |
commit | 7da313a2f65e39b86488c21555c356ca3a9100e5 (patch) | |
tree | 391b806058ca43cb3ba624dce63764bce2b9b2b1 /sys/dev/usb/if_aue.c | |
parent | 37778efb0de37bd00e9269e32ac772f743cce430 (diff) |
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_aue.c')
-rw-r--r-- | sys/dev/usb/if_aue.c | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 0b0c45bea28..9572f87dc00 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_aue.c,v 1.74 2008/11/06 02:32:28 brad Exp $ */ +/* $OpenBSD: if_aue.c,v 1.75 2008/11/28 02:44:18 brad Exp $ */ /* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1537,13 +1537,6 @@ aue_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 && @@ -1563,27 +1556,23 @@ aue_ioctl(struct ifnet *ifp, u_long command, caddr_t data) sc->aue_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) { - if (ifp->if_flags & IFF_RUNNING) - aue_setmulti(sc); - error = 0; - } - break; case SIOCGIFMEDIA: case SIOCSIFMEDIA: mii = GET_MII(sc); error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); break; + default: error = ether_ioctl(ifp, &sc->arpcom, command, data); } + if (error == ENETRESET) { + if (ifp->if_flags & IFF_RUNNING) + aue_setmulti(sc); + error = 0; + } + splx(s); return (error); } |