summaryrefslogtreecommitdiff
path: root/sys/dev/ic/am7990.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/am7990.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/am7990.c')
-rw-r--r--sys/dev/ic/am7990.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/sys/dev/ic/am7990.c b/sys/dev/ic/am7990.c
index 46e48aa7507..1a05b1a69e0 100644
--- a/sys/dev/ic/am7990.c
+++ b/sys/dev/ic/am7990.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: am7990.c,v 1.42 2008/10/02 20:21:13 brad Exp $ */
+/* $OpenBSD: am7990.c,v 1.43 2008/11/28 02:44:17 brad Exp $ */
/* $NetBSD: am7990.c,v 1.22 1996/10/13 01:37:19 christos Exp $ */
/*-
@@ -892,23 +892,6 @@ am7990_ioctl(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)
- am7990_reset(sc);
- error = 0;
- }
- break;
-
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
if (sc->sc_hasifmedia)
@@ -921,6 +904,12 @@ am7990_ioctl(ifp, cmd, data)
error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ am7990_reset(sc);
+ error = 0;
+ }
+
splx(s);
return (error);
}