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/pcmcia | |
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/pcmcia')
-rw-r--r-- | sys/dev/pcmcia/if_ray.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c index f5da8e812e2..d2f59611348 100644 --- a/sys/dev/pcmcia/if_ray.c +++ b/sys/dev/pcmcia/if_ray.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ray.c,v 1.36 2008/11/21 16:53:05 oga Exp $ */ +/* $OpenBSD: if_ray.c,v 1.37 2008/11/28 02:44:18 brad Exp $ */ /* $NetBSD: if_ray.c,v 1.21 2000/07/05 02:35:54 onoe Exp $ */ /* @@ -985,22 +985,6 @@ ray_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } else if (ifp->if_flags & IFF_RUNNING) ray_disable(sc); break; - case SIOCADDMULTI: - case SIOCDELMULTI: - if (cmd == SIOCADDMULTI) { - RAY_DPRINTF(("%s: ioctl: cmd SIOCADDMULTI\n", - ifp->if_xname)); - error = ether_addmulti(ifr, &sc->sc_ec); - } else { - RAY_DPRINTF(("%s: ioctl: cmd SIOCDELMULTI\n", - ifp->if_xname)); - error = ether_delmulti(ifr, &sc->sc_ec); - } - if (error == ENETRESET) { - error = 0; - ray_update_mcast(sc); - } - break; case SIOCSIFMEDIA: RAY_DPRINTF(("%s: ioctl: cmd SIOCSIFMEDIA\n", ifp->if_xname)); case SIOCGIFMEDIA: @@ -1075,6 +1059,12 @@ ray_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = ether_ioctl(ifp, &sc->sc_ec, cmd, data); } + if (error == ENETRESET) { + if (ifp->if_flags & IFF_RUNNING) + ray_update_mcast(sc); + error = 0; + } + RAY_DPRINTF(("%s: ioctl: returns %d\n", ifp->if_xname, error)); splx(s); |