summaryrefslogtreecommitdiff
path: root/sys/dev/ic/smc91cxx.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-11-28 02:44:19 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-11-28 02:44:19 +0000
commit7da313a2f65e39b86488c21555c356ca3a9100e5 (patch)
tree391b806058ca43cb3ba624dce63764bce2b9b2b1 /sys/dev/ic/smc91cxx.c
parent37778efb0de37bd00e9269e32ac772f743cce430 (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/ic/smc91cxx.c')
-rw-r--r--sys/dev/ic/smc91cxx.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/sys/dev/ic/smc91cxx.c b/sys/dev/ic/smc91cxx.c
index 00ad6a60b52..685be05c990 100644
--- a/sys/dev/ic/smc91cxx.c
+++ b/sys/dev/ic/smc91cxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smc91cxx.c,v 1.29 2008/10/03 20:25:29 brad Exp $ */
+/* $OpenBSD: smc91cxx.c,v 1.30 2008/11/28 02:44:17 brad Exp $ */
/* $NetBSD: smc91cxx.c,v 1.11 1998/08/08 23:51:41 mycroft Exp $ */
/*-
@@ -1089,27 +1089,6 @@ smc91cxx_ioctl(ifp, cmd, data)
}
break;
- case SIOCADDMULTI:
- case SIOCDELMULTI:
- if ((sc->sc_flags & SMC_FLAGS_ENABLED) == 0) {
- error = EIO;
- break;
- }
-
- 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)
- smc91cxx_reset(sc);
- error = 0;
- }
- break;
-
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
@@ -1119,6 +1098,12 @@ smc91cxx_ioctl(ifp, cmd, data)
error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ smc91cxx_reset(sc);
+ error = 0;
+ }
+
splx(s);
return (error);
}