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/pci/if_myx.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/pci/if_myx.c')
-rw-r--r-- | sys/dev/pci/if_myx.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c index 27ff873b5c3..2645c20b5c5 100644 --- a/sys/dev/pci/if_myx.c +++ b/sys/dev/pci/if_myx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_myx.c,v 1.9 2008/10/02 20:21:14 brad Exp $ */ +/* $OpenBSD: if_myx.c,v 1.10 2008/11/28 02:44:18 brad Exp $ */ /* * Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org> @@ -831,6 +831,7 @@ myx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) arp_ifinit(&sc->sc_ac, ifa); #endif /* FALLTHROUGH */ + case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { if (ifp->if_flags & IFF_RUNNING) @@ -843,21 +844,6 @@ myx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } break; - case SIOCSIFMTU: - if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu) - error = EINVAL; - else if (ifp->if_mtu != ifr->ifr_mtu) - ifp->if_mtu = ifr->ifr_mtu; - break; - - case SIOCADDMULTI: - error = ether_addmulti(ifr, &sc->sc_ac); - break; - - case SIOCDELMULTI: - error = ether_delmulti(ifr, &sc->sc_ac); - break; - case SIOCGIFMEDIA: case SIOCSIFMEDIA: error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd); |