summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_nxe.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/pci/if_nxe.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/pci/if_nxe.c')
-rw-r--r--sys/dev/pci/if_nxe.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/dev/pci/if_nxe.c b/sys/dev/pci/if_nxe.c
index 42545077a8c..eb59c1f25a0 100644
--- a/sys/dev/pci/if_nxe.c
+++ b/sys/dev/pci/if_nxe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nxe.c,v 1.58 2008/11/23 12:51:10 dlg Exp $ */
+/* $OpenBSD: if_nxe.c,v 1.59 2008/11/28 02:44:18 brad Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -1017,10 +1017,9 @@ int
nxe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
{
struct nxe_softc *sc = ifp->if_softc;
+ struct ifaddr *ifa = (struct ifaddr *)addr;
struct ifreq *ifr = (struct ifreq *)addr;
- struct ifaddr *ifa;
- int error = 0;
- int s;
+ int s, error = 0;
rw_enter_write(&sc->sc_lock);
s = splnet();
@@ -1031,11 +1030,11 @@ nxe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
case SIOCSIFADDR:
SET(ifp->if_flags, IFF_UP);
#ifdef INET
- ifa = (struct ifaddr *)addr;
if (ifa->ifa_addr->sa_family == AF_INET)
arp_ifinit(&sc->sc_ac, ifa);
#endif
/* FALLTHROUGH */
+
case SIOCSIFFLAGS:
if (ISSET(ifp->if_flags, IFF_UP)) {
if (ISSET(ifp->if_flags, IFF_RUNNING))
@@ -1053,13 +1052,6 @@ nxe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
break;
- case SIOCADDMULTI:
- error = ether_addmulti(ifr, &sc->sc_ac);
- break;
- case SIOCDELMULTI:
- error = ether_delmulti(ifr, &sc->sc_ac);
- break;
-
default:
error = ether_ioctl(ifp, &sc->sc_ac, cmd, addr);
}