From 7da313a2f65e39b86488c21555c356ca3a9100e5 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Fri, 28 Nov 2008 02:44:19 +0000 Subject: 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@ --- sys/dev/isa/if_ie.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'sys/dev/isa/if_ie.c') diff --git a/sys/dev/isa/if_ie.c b/sys/dev/isa/if_ie.c index 0639fbeae9d..34609848d1c 100644 --- a/sys/dev/isa/if_ie.c +++ b/sys/dev/isa/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.34 2008/10/02 20:21:13 brad Exp $ */ +/* $OpenBSD: if_ie.c,v 1.35 2008/11/28 02:44:17 brad Exp $ */ /* $NetBSD: if_ie.c,v 1.51 1996/05/12 23:52:48 mycroft Exp $ */ /*- @@ -2121,7 +2121,6 @@ ieioctl(ifp, cmd, data) { struct ie_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; - struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; s = splnet(); @@ -2176,27 +2175,16 @@ ieioctl(ifp, cmd, data) #endif break; - case SIOCADDMULTI: - case SIOCDELMULTI: - error = (cmd == SIOCADDMULTI) ? - ether_addmulti(ifr, &sc->sc_arpcom): - ether_delmulti(ifr, &sc->sc_arpcom); - - if (error == ENETRESET) { - /* - * Multicast list has changed; set the hardware filter - * accordingly. - */ - if (ifp->if_flags & IFF_RUNNING) - mc_reset(sc); - error = 0; - } - break; - default: error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data); } + if (error == ENETRESET) { + if (ifp->if_flags & IFF_RUNNING) + mc_reset(sc); + error = 0; + } + splx(s); return error; } -- cgit v1.2.3