From 3016beb654e009474f0e00c7d2dc4ca2ec5d6fbd Mon Sep 17 00:00:00 2001 From: mpi Date: Sun, 25 Oct 2015 13:04:28 +0000 Subject: [PATCH] arp_ifinit() is no longer needed. --- sys/dev/pci/if_age.c | 5 +---- sys/dev/pci/if_alc.c | 5 +---- sys/dev/pci/if_ale.c | 5 +---- sys/dev/pci/if_bce.c | 5 +---- sys/dev/pci/if_bge.c | 5 +---- sys/dev/pci/if_bnx.c | 5 +---- sys/dev/pci/if_cas.c | 5 +---- sys/dev/pci/if_de.c | 13 +------------ sys/dev/pci/if_em.c | 5 +---- sys/dev/pci/if_et.c | 5 +---- sys/dev/pci/if_ipw.c | 6 +----- sys/dev/pci/if_iwi.c | 6 +----- sys/dev/pci/if_iwm.c | 6 +----- sys/dev/pci/if_iwn.c | 6 +----- sys/dev/pci/if_ix.c | 5 +---- sys/dev/pci/if_ixgb.c | 5 +---- sys/dev/pci/if_jme.c | 5 +---- sys/dev/pci/if_lge.c | 5 +---- sys/dev/pci/if_lii.c | 5 +---- sys/dev/pci/if_msk.c | 5 +---- sys/dev/pci/if_myx.c | 5 +---- sys/dev/pci/if_nep.c | 5 +---- sys/dev/pci/if_nfe.c | 5 +---- sys/dev/pci/if_nge.c | 13 ++----------- sys/dev/pci/if_nxe.c | 5 +---- sys/dev/pci/if_oce.c | 5 +---- sys/dev/pci/if_pcn.c | 5 +---- sys/dev/pci/if_rtwn.c | 6 +----- sys/dev/pci/if_se.c | 7 +------ sys/dev/pci/if_sis.c | 5 +---- sys/dev/pci/if_sk.c | 5 +---- sys/dev/pci/if_ste.c | 5 +---- sys/dev/pci/if_stge.c | 6 +----- sys/dev/pci/if_tht.c | 6 +----- sys/dev/pci/if_tl.c | 5 +---- sys/dev/pci/if_txp.c | 13 ++----------- sys/dev/pci/if_vge.c | 5 +---- sys/dev/pci/if_vic.c | 5 +---- sys/dev/pci/if_vio.c | 5 +---- sys/dev/pci/if_vmx.c | 5 +---- sys/dev/pci/if_vr.c | 5 +---- sys/dev/pci/if_vte.c | 5 +---- sys/dev/pci/if_wb.c | 12 ++---------- sys/dev/pci/if_wpi.c | 6 +----- sys/dev/pci/if_xge.c | 5 +---- 45 files changed, 48 insertions(+), 218 deletions(-) diff --git a/sys/dev/pci/if_age.c b/sys/dev/pci/if_age.c index b020bdbac36..a6d2a769ce6 100644 --- a/sys/dev/pci/if_age.c +++ b/sys/dev/pci/if_age.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_age.c,v 1.28 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_age.c,v 1.29 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon @@ -1038,7 +1038,6 @@ age_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct age_softc *sc = ifp->if_softc; struct mii_data *mii = &sc->sc_miibus; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -1049,8 +1048,6 @@ age_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) age_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_alc.c b/sys/dev/pci/if_alc.c index 86c40021e69..75267481b18 100644 --- a/sys/dev/pci/if_alc.c +++ b/sys/dev/pci/if_alc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_alc.c,v 1.34 2015/09/11 13:02:28 stsp Exp $ */ +/* $OpenBSD: if_alc.c,v 1.35 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2009, Pyun YongHyeon * All rights reserved. @@ -1446,7 +1446,6 @@ alc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct alc_softc *sc = ifp->if_softc; struct mii_data *mii = &sc->sc_miibus; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -1457,8 +1456,6 @@ alc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) alc_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_ale.c b/sys/dev/pci/if_ale.c index a8a5a3c6789..8622aef9c00 100644 --- a/sys/dev/pci/if_ale.c +++ b/sys/dev/pci/if_ale.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ale.c,v 1.39 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_ale.c,v 1.40 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon * All rights reserved. @@ -1070,7 +1070,6 @@ ale_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct ale_softc *sc = ifp->if_softc; struct mii_data *mii = &sc->sc_miibus; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -1081,8 +1080,6 @@ ale_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) ale_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_bce.c b/sys/dev/pci/if_bce.c index dec598999b7..7c51e70c10e 100644 --- a/sys/dev/pci/if_bce.c +++ b/sys/dev/pci/if_bce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bce.c,v 1.46 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_bce.c,v 1.47 2015/10/25 13:04:28 mpi Exp $ */ /* $NetBSD: if_bce.c,v 1.3 2003/09/29 01:53:02 mrg Exp $ */ /* @@ -460,7 +460,6 @@ int bce_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct bce_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; int s, error = 0; @@ -471,8 +470,6 @@ bce_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) bce_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->bce_ac, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index d94aaf32f6a..ac7b42794c7 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.370 2015/10/19 05:31:25 jmatthew Exp $ */ +/* $OpenBSD: if_bge.c,v 1.371 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -4410,7 +4410,6 @@ int bge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct bge_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; int s, error = 0; struct mii_data *mii; @@ -4422,8 +4421,6 @@ bge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) bge_init(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c index 19ef39e8f25..051a3c592ae 100644 --- a/sys/dev/pci/if_bnx.c +++ b/sys/dev/pci/if_bnx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bnx.c,v 1.114 2015/09/10 18:10:34 deraadt Exp $ */ +/* $OpenBSD: if_bnx.c,v 1.115 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2006 Broadcom Corporation @@ -5068,7 +5068,6 @@ int bnx_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct bnx_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; struct mii_data *mii = &sc->bnx_mii; int s, error = 0; @@ -5080,8 +5079,6 @@ bnx_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) bnx_init(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c index 68afd1f3e47..7334b390c3e 100644 --- a/sys/dev/pci/if_cas.c +++ b/sys/dev/pci/if_cas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cas.c,v 1.42 2015/09/11 13:02:28 stsp Exp $ */ +/* $OpenBSD: if_cas.c,v 1.43 2015/10/25 13:04:28 mpi Exp $ */ /* * @@ -1651,7 +1651,6 @@ int cas_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct cas_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -1662,8 +1661,6 @@ cas_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if ((ifp->if_flags & IFF_RUNNING) == 0) cas_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c index 2c3129264b9..dabe52f9ed5 100644 --- a/sys/dev/pci/if_de.c +++ b/sys/dev/pci/if_de.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_de.c,v 1.123 2015/06/26 11:50:39 kettenis Exp $ */ +/* $OpenBSD: if_de.c,v 1.124 2015/10/25 13:04:28 mpi Exp $ */ /* $NetBSD: if_de.c,v 1.58 1998/01/12 09:39:58 thorpej Exp $ */ /*- @@ -4146,7 +4146,6 @@ tulip_ifioctl(struct ifnet * ifp, u_long cmd, caddr_t data) { TULIP_PERFSTART(ifioctl) tulip_softc_t * const sc = TULIP_IFP_TO_SOFTC(ifp); - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *) data; int s; int error = 0; @@ -4157,16 +4156,6 @@ tulip_ifioctl(struct ifnet * ifp, u_long cmd, caddr_t data) case SIOCSIFADDR: { ifp->if_flags |= IFF_UP; tulip_init(sc); - switch(ifa->ifa_addr->sa_family) { - case AF_INET: { - arp_ifinit(&sc->tulip_ac, ifa); - break; - } - - default: { - break; - } - } break; } diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index f2ddb32052c..8a68db87996 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.308 2015/10/08 09:21:26 kettenis Exp $ */ +/* $OpenBSD: if_em.c,v 1.309 2015/10/25 13:04:28 mpi Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include @@ -656,7 +656,6 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { int error = 0; struct ifreq *ifr = (struct ifreq *) data; - struct ifaddr *ifa = (struct ifaddr *)data; struct em_softc *sc = ifp->if_softc; int s; @@ -670,8 +669,6 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; em_init(sc); } - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->interface_data, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_et.c b/sys/dev/pci/if_et.c index e8e32e346a0..5036941c5d7 100644 --- a/sys/dev/pci/if_et.c +++ b/sys/dev/pci/if_et.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_et.c,v 1.29 2015/07/08 14:41:30 mpi Exp $ */ +/* $OpenBSD: if_et.c,v 1.30 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. * @@ -1007,7 +1007,6 @@ int et_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct et_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -1018,8 +1017,6 @@ et_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) et_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c index 0bdf8ce88bf..4c8a496c8b9 100644 --- a/sys/dev/pci/if_ipw.c +++ b/sys/dev/pci/if_ipw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ipw.c,v 1.109 2015/09/01 07:09:55 deraadt Exp $ */ +/* $OpenBSD: if_ipw.c,v 1.110 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2004-2008 @@ -1358,7 +1358,6 @@ ipw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct ipw_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; - struct ifaddr *ifa; struct ifreq *ifr; int s, error = 0; @@ -1377,10 +1376,7 @@ ipw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: - ifa = (struct ifaddr *)data; ifp->if_flags |= IFF_UP; - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&ic->ic_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c index 36e5912f044..3d93c2bca65 100644 --- a/sys/dev/pci/if_iwi.c +++ b/sys/dev/pci/if_iwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwi.c,v 1.126 2015/09/01 07:09:55 deraadt Exp $ */ +/* $OpenBSD: if_iwi.c,v 1.127 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2004-2008 @@ -1451,7 +1451,6 @@ iwi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct iwi_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; - struct ifaddr *ifa; struct ifreq *ifr; int s, error = 0; @@ -1470,10 +1469,7 @@ iwi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: - ifa = (struct ifaddr *)data; ifp->if_flags |= IFF_UP; - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&ic->ic_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 5e3fbe4e4ae..a1b647b91be 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.61 2015/10/22 11:51:28 jsg Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.62 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2014 genua mbh @@ -5689,7 +5689,6 @@ iwm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct iwm_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; - struct ifaddr *ifa; struct ifreq *ifr; int s, error = 0; @@ -5710,9 +5709,6 @@ iwm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - ifa = (struct ifaddr *)data; - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&ic->ic_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c index dc5f9487661..0b1aa9b35f7 100644 --- a/sys/dev/pci/if_iwn.c +++ b/sys/dev/pci/if_iwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwn.c,v 1.144 2015/09/01 07:09:55 deraadt Exp $ */ +/* $OpenBSD: if_iwn.c,v 1.145 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2007-2010 Damien Bergamini @@ -3106,7 +3106,6 @@ iwn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct iwn_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; - struct ifaddr *ifa; struct ifreq *ifr; int s, error = 0; @@ -3125,10 +3124,7 @@ iwn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: - ifa = (struct ifaddr *)data; ifp->if_flags |= IFF_UP; - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&ic->ic_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c index 1ee022c88ef..766062aec1c 100644 --- a/sys/dev/pci/if_ix.c +++ b/sys/dev/pci/if_ix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ix.c,v 1.125 2015/09/11 12:09:10 claudio Exp $ */ +/* $OpenBSD: if_ix.c,v 1.126 2015/10/25 13:04:28 mpi Exp $ */ /****************************************************************************** @@ -427,7 +427,6 @@ int ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data) { struct ix_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; int s, error = 0; @@ -439,8 +438,6 @@ ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) ixgbe_init(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c index 9bebe61ad34..c9c524a2850 100644 --- a/sys/dev/pci/if_ixgb.c +++ b/sys/dev/pci/if_ixgb.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_ixgb.c,v 1.65 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_ixgb.c,v 1.66 2015/10/25 13:04:28 mpi Exp $ */ #include @@ -331,7 +331,6 @@ int ixgb_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct ixgb_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; int s, error = 0; @@ -344,8 +343,6 @@ ixgb_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) ixgb_init(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->interface_data, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_jme.c b/sys/dev/pci/if_jme.c index 74f70e5e55f..3f2e36743a2 100644 --- a/sys/dev/pci/if_jme.c +++ b/sys/dev/pci/if_jme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_jme.c,v 1.41 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_jme.c,v 1.42 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon * All rights reserved. @@ -1315,7 +1315,6 @@ jme_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct jme_softc *sc = ifp->if_softc; struct mii_data *mii = &sc->sc_miibus; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int error = 0, s; @@ -1326,8 +1325,6 @@ jme_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) jme_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c index b68176610d7..7e5a7138069 100644 --- a/sys/dev/pci/if_lge.c +++ b/sys/dev/pci/if_lge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lge.c,v 1.67 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_lge.c,v 1.68 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -1153,7 +1153,6 @@ int lge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct lge_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; struct mii_data *mii; int s, error = 0; @@ -1165,8 +1164,6 @@ lge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) lge_init(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_lii.c b/sys/dev/pci/if_lii.c index 88adc7016c9..159b11912e5 100644 --- a/sys/dev/pci/if_lii.c +++ b/sys/dev/pci/if_lii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lii.c,v 1.37 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_lii.c,v 1.38 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2007 The NetBSD Foundation. @@ -1069,7 +1069,6 @@ int lii_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) { struct lii_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)addr; struct ifreq *ifr = (struct ifreq *)addr; int s, error = 0; @@ -1078,8 +1077,6 @@ lii_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) switch(cmd) { case SIOCSIFADDR: SET(ifp->if_flags, IFF_UP); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c index aedeadb62a8..a66a3b99dc9 100644 --- a/sys/dev/pci/if_msk.c +++ b/sys/dev/pci/if_msk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_msk.c,v 1.116 2015/09/11 09:14:52 deraadt Exp $ */ +/* $OpenBSD: if_msk.c,v 1.117 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -578,7 +578,6 @@ int msk_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct sk_if_softc *sc_if = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; struct mii_data *mii; int s, error = 0; @@ -590,8 +589,6 @@ msk_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) msk_init(sc_if); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc_if->arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c index 57621e2a7c3..15471d65442 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.84 2015/09/29 10:52:22 dlg Exp $ */ +/* $OpenBSD: if_myx.c,v 1.85 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2007 Reyk Floeter @@ -919,7 +919,6 @@ int myx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct myx_softc *sc = (struct myx_softc *)ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -928,8 +927,6 @@ myx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_nep.c b/sys/dev/pci/if_nep.c index 50caf2bc240..84de99ea56b 100644 --- a/sys/dev/pci/if_nep.c +++ b/sys/dev/pci/if_nep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nep.c,v 1.19 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_nep.c,v 1.20 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2014, 2015 Mark Kettenis * @@ -1929,7 +1929,6 @@ int nep_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct nep_softc *sc = (struct nep_softc *)ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -1938,8 +1937,6 @@ nep_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index 51a2439c6e1..2d4a5fbd3e9 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nfe.c,v 1.111 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_nfe.c,v 1.112 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2006, 2007 Damien Bergamini @@ -519,7 +519,6 @@ int nfe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct nfe_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -530,8 +529,6 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) nfe_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c index 8290bb646a7..5e4e8cc7ce6 100644 --- a/sys/dev/pci/if_nge.c +++ b/sys/dev/pci/if_nge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nge.c,v 1.85 2015/09/12 10:15:10 miod Exp $ */ +/* $OpenBSD: if_nge.c,v 1.86 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -1775,7 +1775,6 @@ int nge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct nge_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; struct mii_data *mii; int s, error = 0; @@ -1785,15 +1784,7 @@ nge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) switch(command) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - switch (ifa->ifa_addr->sa_family) { - case AF_INET: - nge_init(sc); - arp_ifinit(&sc->arpcom, ifa); - break; - default: - nge_init(sc); - break; - } + nge_init(sc); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_nxe.c b/sys/dev/pci/if_nxe.c index 080b663c99b..ca16738ac2f 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.67 2014/12/22 02:28:52 tedu Exp $ */ +/* $OpenBSD: if_nxe.c,v 1.68 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2007 David Gwynne @@ -1015,7 +1015,6 @@ 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; int s, error = 0; @@ -1027,8 +1026,6 @@ nxe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) switch (cmd) { case SIOCSIFADDR: SET(ifp->if_flags, IFF_UP); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_oce.c b/sys/dev/pci/if_oce.c index 54236f81f3a..32e0bcdd10e 100644 --- a/sys/dev/pci/if_oce.c +++ b/sys/dev/pci/if_oce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_oce.c,v 1.87 2015/09/29 17:04:20 chris Exp $ */ +/* $OpenBSD: if_oce.c,v 1.88 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2012 Mike Belopuhov @@ -849,7 +849,6 @@ int oce_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct oce_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -860,8 +859,6 @@ oce_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) oce_init(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); break; case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c index 895334b3b85..9e8467253a2 100644 --- a/sys/dev/pci/if_pcn.c +++ b/sys/dev/pci/if_pcn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pcn.c,v 1.37 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_pcn.c,v 1.38 2015/10/25 13:04:28 mpi Exp $ */ /* $NetBSD: if_pcn.c,v 1.26 2005/05/07 09:15:44 is Exp $ */ /* @@ -1043,7 +1043,6 @@ int pcn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct pcn_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; int s, error = 0; @@ -1054,8 +1053,6 @@ pcn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) pcn_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_rtwn.c b/sys/dev/pci/if_rtwn.c index 1d772a58eba..a55f99a94b4 100644 --- a/sys/dev/pci/if_rtwn.c +++ b/sys/dev/pci/if_rtwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rtwn.c,v 1.6 2015/08/28 00:03:53 deraadt Exp $ */ +/* $OpenBSD: if_rtwn.c,v 1.7 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2010 Damien Bergamini @@ -1929,7 +1929,6 @@ rtwn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct rtwn_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; - struct ifaddr *ifa; struct ifreq *ifr; int s, error = 0; @@ -1948,10 +1947,7 @@ rtwn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: - ifa = (struct ifaddr *)data; ifp->if_flags |= IFF_UP; - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&ic->ic_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/dev/pci/if_se.c b/sys/dev/pci/if_se.c index 5f3bdb369ef..f1ebdc9ed3e 100644 --- a/sys/dev/pci/if_se.c +++ b/sys/dev/pci/if_se.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_se.c,v 1.13 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_se.c,v 1.14 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2009, 2010 Christopher Zimmermann @@ -1354,7 +1354,6 @@ se_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct se_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; - struct ifaddr *ifa = (struct ifaddr *)data; int s, rc = 0; s = splnet(); @@ -1364,10 +1363,6 @@ se_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if ((ifp->if_flags & IFF_RUNNING) == 0) rc = se_init(ifp); - if (rc == 0) { - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); - } break; case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index dede1d2062a..0127affd8ce 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.127 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_sis.c,v 1.128 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. @@ -1889,7 +1889,6 @@ int sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct sis_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; struct mii_data *mii; int s, error = 0; @@ -1901,8 +1900,6 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) sis_init(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 4a02573a736..42d833e9381 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.177 2015/07/19 06:28:12 yuo Exp $ */ +/* $OpenBSD: if_sk.c,v 1.178 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -687,7 +687,6 @@ int sk_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct sk_if_softc *sc_if = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; struct mii_data *mii; int s, error = 0; @@ -699,8 +698,6 @@ sk_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) sk_init(sc_if); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc_if->arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index 7050d81534a..97e33359874 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ste.c,v 1.59 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_ste.c,v 1.60 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul . All rights reserved. @@ -1195,7 +1195,6 @@ int ste_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct ste_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; int s, error = 0; @@ -1206,8 +1205,6 @@ ste_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) ste_init(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c index 8b4672db272..510670e0c4f 100644 --- a/sys/dev/pci/if_stge.c +++ b/sys/dev/pci/if_stge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_stge.c,v 1.61 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_stge.c,v 1.62 2015/10/25 13:04:28 mpi Exp $ */ /* $NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $ */ /*- @@ -661,7 +661,6 @@ int stge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct stge_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -672,9 +671,6 @@ stge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) stge_init(ifp); - - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c index 84a67976d0e..4b4bf59af4e 100644 --- a/sys/dev/pci/if_tht.c +++ b/sys/dev/pci/if_tht.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tht.c,v 1.133 2015/08/28 00:03:53 deraadt Exp $ */ +/* $OpenBSD: if_tht.c,v 1.134 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2007 David Gwynne @@ -865,7 +865,6 @@ int tht_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) { struct tht_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)addr; struct ifreq *ifr = (struct ifreq *)addr; int s, error = 0; @@ -875,9 +874,6 @@ tht_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c index f84c0688810..14eaaa6a01f 100644 --- a/sys/dev/pci/if_tl.c +++ b/sys/dev/pci/if_tl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tl.c,v 1.65 2015/09/14 11:18:49 stsp Exp $ */ +/* $OpenBSD: if_tl.c,v 1.66 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1649,7 +1649,6 @@ int tl_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct tl_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; int s, error = 0; @@ -1660,8 +1659,6 @@ tl_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) tl_init(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c index 6b2e568c71e..bc2b781a77e 100644 --- a/sys/dev/pci/if_txp.c +++ b/sys/dev/pci/if_txp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_txp.c,v 1.116 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_txp.c,v 1.117 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2001 @@ -1159,7 +1159,6 @@ int txp_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct txp_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; int s, error = 0; @@ -1168,15 +1167,7 @@ txp_ioctl(struct ifnet *ifp, u_long command, caddr_t data) switch(command) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - switch (ifa->ifa_addr->sa_family) { - case AF_INET: - txp_init(sc); - arp_ifinit(&sc->sc_arpcom, ifa); - break; - default: - txp_init(sc); - break; - } + txp_init(sc); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c index 9307bea7e67..e77ece54627 100644 --- a/sys/dev/pci/if_vge.c +++ b/sys/dev/pci/if_vge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vge.c,v 1.64 2015/09/11 13:02:28 stsp Exp $ */ +/* $OpenBSD: if_vge.c,v 1.65 2015/10/25 13:04:28 mpi Exp $ */ /* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */ /* * Copyright (c) 2004 @@ -1759,7 +1759,6 @@ int vge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct vge_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; int s, error = 0; @@ -1770,8 +1769,6 @@ vge_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) vge_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c index dc32eea2b4a..2a94fb30106 100644 --- a/sys/dev/pci/if_vic.c +++ b/sys/dev/pci/if_vic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vic.c,v 1.91 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_vic.c,v 1.92 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2006 Reyk Floeter @@ -1177,7 +1177,6 @@ int vic_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct vic_softc *sc = (struct vic_softc *)ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -1186,8 +1185,6 @@ vic_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/dev/pci/if_vio.c b/sys/dev/pci/if_vio.c index ce4f35db668..a844301d6ea 100644 --- a/sys/dev/pci/if_vio.c +++ b/sys/dev/pci/if_vio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vio.c,v 1.33 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_vio.c,v 1.34 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch, Alexander Fiveg. @@ -853,7 +853,6 @@ int vio_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct vio_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, r = 0; @@ -863,8 +862,6 @@ vio_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) vio_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_ac, ifa); break; case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/dev/pci/if_vmx.c b/sys/dev/pci/if_vmx.c index e471911ab4d..aaec622ceaf 100644 --- a/sys/dev/pci/if_vmx.c +++ b/sys/dev/pci/if_vmx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vmx.c,v 1.33 2015/09/20 22:26:18 dlg Exp $ */ +/* $OpenBSD: if_vmx.c,v 1.34 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 2013 Tsubai Masanari @@ -999,7 +999,6 @@ vmxnet3_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct vmxnet3_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; - struct ifaddr *ifa = (struct ifaddr *)data; int error = 0, s; s = splnet(); @@ -1009,8 +1008,6 @@ vmxnet3_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if ((ifp->if_flags & IFF_RUNNING) == 0) error = vmxnet3_init(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index cb2216c77e0..6fe6fc12a9d 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.143 2015/10/20 17:08:39 chrisz Exp $ */ +/* $OpenBSD: if_vr.c,v 1.144 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1537,7 +1537,6 @@ int vr_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct vr_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; int s, error = 0; @@ -1548,8 +1547,6 @@ vr_ioctl(struct ifnet *ifp, u_long command, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) vr_init(sc); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->arpcom, ifa); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_vte.c b/sys/dev/pci/if_vte.c index cc4a3242644..ef4a69c4167 100644 --- a/sys/dev/pci/if_vte.c +++ b/sys/dev/pci/if_vte.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vte.c,v 1.13 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_vte.c,v 1.14 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2010, Pyun YongHyeon * All rights reserved. @@ -725,7 +725,6 @@ vte_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct vte_softc *sc = ifp->if_softc; struct mii_data *mii = &sc->sc_miibus; - struct ifaddr *ifa = (struct ifaddr *)data; struct ifreq *ifr = (struct ifreq *)data; int s, error = 0; @@ -736,8 +735,6 @@ vte_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) vte_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index 7a3fcb0dca9..fa911b47ccd 100644 --- a/sys/dev/pci/if_wb.c +++ b/sys/dev/pci/if_wb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wb.c,v 1.62 2015/09/11 13:02:28 stsp Exp $ */ +/* $OpenBSD: if_wb.c,v 1.63 2015/10/25 13:04:28 mpi Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1517,7 +1517,6 @@ int wb_ioctl(ifp, command, data) caddr_t data; { struct wb_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; int s, error = 0; @@ -1526,14 +1525,7 @@ int wb_ioctl(ifp, command, data) switch(command) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; - switch (ifa->ifa_addr->sa_family) { - case AF_INET: - wb_init(sc); - arp_ifinit(&sc->arpcom, ifa); - break; - default: - wb_init(sc); - } + wb_init(sc); break; case SIOCSIFFLAGS: diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c index 42fc5025976..4defce0f8ca 100644 --- a/sys/dev/pci/if_wpi.c +++ b/sys/dev/pci/if_wpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wpi.c,v 1.128 2015/09/06 04:09:59 deraadt Exp $ */ +/* $OpenBSD: if_wpi.c,v 1.129 2015/10/25 13:04:28 mpi Exp $ */ /*- * Copyright (c) 2006-2008 @@ -1965,7 +1965,6 @@ wpi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct wpi_softc *sc = ifp->if_softc; struct ieee80211com *ic = &sc->sc_ic; - struct ifaddr *ifa; struct ifreq *ifr; int s, error = 0; @@ -1984,10 +1983,7 @@ wpi_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) switch (cmd) { case SIOCSIFADDR: - ifa = (struct ifaddr *)data; ifp->if_flags |= IFF_UP; - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&ic->ic_ac, ifa); /* FALLTHROUGH */ case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) { diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c index bd24381cdf2..a39ea365dbf 100644 --- a/sys/dev/pci/if_xge.c +++ b/sys/dev/pci/if_xge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xge.c,v 1.62 2015/06/24 09:40:54 mpi Exp $ */ +/* $OpenBSD: if_xge.c,v 1.63 2015/10/25 13:04:28 mpi Exp $ */ /* $NetBSD: if_xge.c,v 1.1 2005/09/09 10:30:27 ragge Exp $ */ /* @@ -941,7 +941,6 @@ int xge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct xge_softc *sc = ifp->if_softc; - struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; int s, error = 0; @@ -952,8 +951,6 @@ xge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ifp->if_flags |= IFF_UP; if (!(ifp->if_flags & IFF_RUNNING)) xge_init(ifp); - if (ifa->ifa_addr->sa_family == AF_INET) - arp_ifinit(&sc->sc_arpcom, ifa); break; case SIOCSIFFLAGS: -- 2.20.1