summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/mac68k/dev/if_mc.c6
-rw-r--r--sys/arch/mac68k/dev/if_sn.c6
-rw-r--r--sys/arch/macppc/dev/if_bm.c5
-rw-r--r--sys/arch/macppc/dev/if_mc.c6
-rw-r--r--sys/arch/mvme68k/dev/if_ie.c11
-rw-r--r--sys/arch/mvme88k/dev/if_ie.c11
-rw-r--r--sys/arch/sgi/dev/if_mec.c12
-rw-r--r--sys/arch/socppc/dev/if_tsec.c11
-rw-r--r--sys/arch/sparc/dev/be.c10
-rw-r--r--sys/arch/sparc/dev/hme.c9
-rw-r--r--sys/arch/sparc/dev/if_ie.c6
-rw-r--r--sys/arch/sparc/dev/qe.c10
-rw-r--r--sys/arch/vax/bi/if_ni.c7
-rw-r--r--sys/arch/vax/if/if_qe.c7
-rw-r--r--sys/arch/vax/if/sgec.c7
-rw-r--r--sys/dev/ic/aic6915.c9
-rw-r--r--sys/dev/ic/am7990.c11
-rw-r--r--sys/dev/ic/dc.c11
-rw-r--r--sys/dev/ic/elink3.c11
-rw-r--r--sys/dev/ic/fxp.c10
-rw-r--r--sys/dev/ic/gem.c11
-rw-r--r--sys/dev/ic/hme.c11
-rw-r--r--sys/dev/ic/i82596.c11
-rw-r--r--sys/dev/ic/if_wi.c13
-rw-r--r--sys/dev/ic/lemac.c10
-rw-r--r--sys/dev/ic/mtd8xx.c11
-rw-r--r--sys/dev/ic/re.c12
-rw-r--r--sys/dev/ic/rtl81x9.c11
-rw-r--r--sys/dev/ic/smc83c170.c12
-rw-r--r--sys/dev/ic/xl.c11
-rw-r--r--sys/dev/isa/if_ef_isapnp.c10
-rw-r--r--sys/dev/isa/if_eg.c11
-rw-r--r--sys/dev/isa/if_el.c11
-rw-r--r--sys/dev/isa/if_ex.c12
-rw-r--r--sys/dev/isa/if_ie.c11
-rw-r--r--sys/dev/pci/if_bce.c10
-rw-r--r--sys/dev/pci/if_bge.c11
-rw-r--r--sys/dev/pci/if_bnx.c11
-rw-r--r--sys/dev/pci/if_cas.c11
-rw-r--r--sys/dev/pci/if_de.c10
-rw-r--r--sys/dev/pci/if_em.c10
-rw-r--r--sys/dev/pci/if_et.c10
-rw-r--r--sys/dev/pci/if_ix.c11
-rw-r--r--sys/dev/pci/if_ixgb.c10
-rw-r--r--sys/dev/pci/if_jme.c10
-rw-r--r--sys/dev/pci/if_lii.c14
-rw-r--r--sys/dev/pci/if_msk.c11
-rw-r--r--sys/dev/pci/if_myx.c9
-rw-r--r--sys/dev/pci/if_nfe.c10
-rw-r--r--sys/dev/pci/if_nge.c11
-rw-r--r--sys/dev/pci/if_nxe.c12
-rw-r--r--sys/dev/pci/if_pcn.c12
-rw-r--r--sys/dev/pci/if_sis.c11
-rw-r--r--sys/dev/pci/if_sk.c11
-rw-r--r--sys/dev/pci/if_ste.c11
-rw-r--r--sys/dev/pci/if_stge.c14
-rw-r--r--sys/dev/pci/if_tht.c12
-rw-r--r--sys/dev/pci/if_ti.c10
-rw-r--r--sys/dev/pci/if_tl.c11
-rw-r--r--sys/dev/pci/if_txp.c11
-rw-r--r--sys/dev/pci/if_vge.c10
-rw-r--r--sys/dev/pci/if_vic.c11
-rw-r--r--sys/dev/pci/if_vr.c11
-rw-r--r--sys/dev/pci/if_wb.c11
-rw-r--r--sys/dev/pci/if_xge.c10
-rw-r--r--sys/dev/pcmcia/if_ray.c15
-rw-r--r--sys/dev/sbus/be.c11
-rw-r--r--sys/dev/sbus/qe.c10
-rw-r--r--sys/dev/usb/if_aue.c6
-rw-r--r--sys/dev/usb/if_axe.c5
-rw-r--r--sys/dev/usb/if_cdce.c5
-rw-r--r--sys/dev/usb/if_cdcef.c6
-rw-r--r--sys/dev/usb/if_cue.c6
-rw-r--r--sys/dev/usb/if_kue.c6
-rw-r--r--sys/dev/usb/if_udav.c6
-rw-r--r--sys/net/if_ethersubr.c5
-rw-r--r--sys/net/if_trunk.c8
-rw-r--r--sys/net/if_tun.c14
-rw-r--r--sys/net80211/ieee80211_ioctl.c10
79 files changed, 192 insertions, 592 deletions
diff --git a/sys/arch/mac68k/dev/if_mc.c b/sys/arch/mac68k/dev/if_mc.c
index 28d4ed8dd43..d485f35c9f4 100644
--- a/sys/arch/mac68k/dev/if_mc.c
+++ b/sys/arch/mac68k/dev/if_mc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mc.c,v 1.16 2007/10/14 15:12:59 krw Exp $ */
+/* $OpenBSD: if_mc.c,v 1.17 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_mc.c,v 1.24 2004/10/30 18:08:34 thorpej Exp $ */
/*-
@@ -182,7 +182,6 @@ mcioctl(ifp, cmd, data)
int s = splnet(), err = 0;
switch (cmd) {
-
case SIOCSIFADDR:
ifa = (struct ifaddr *)data;
ifp->if_flags |= IFF_UP;
@@ -243,8 +242,9 @@ mcioctl(ifp, cmd, data)
}
break;
default:
- err = EINVAL;
+ err = ether_ioctl(ifp, &sc->sc_ethercom, cmd, data);
}
+
splx(s);
return (err);
}
diff --git a/sys/arch/mac68k/dev/if_sn.c b/sys/arch/mac68k/dev/if_sn.c
index b1a0590a0b6..5e2e50a15c3 100644
--- a/sys/arch/mac68k/dev/if_sn.c
+++ b/sys/arch/mac68k/dev/if_sn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sn.c,v 1.47 2007/09/04 17:55:15 miod Exp $ */
+/* $OpenBSD: if_sn.c,v 1.48 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_sn.c,v 1.13 1997/04/25 03:40:10 briggs Exp $ */
/*
@@ -257,7 +257,6 @@ snioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
int s = splnet(), err = 0;
switch (cmd) {
-
case SIOCSIFADDR:
ifa = (struct ifaddr *)data;
ifp->if_flags |= IFF_UP;
@@ -319,8 +318,9 @@ snioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
}
break;
default:
- err = EINVAL;
+ err = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+
splx(s);
return (err);
}
diff --git a/sys/arch/macppc/dev/if_bm.c b/sys/arch/macppc/dev/if_bm.c
index 67cf62e873c..eb0d056eb56 100644
--- a/sys/arch/macppc/dev/if_bm.c
+++ b/sys/arch/macppc/dev/if_bm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bm.c,v 1.22 2007/04/22 22:31:14 deraadt Exp $ */
+/* $OpenBSD: if_bm.c,v 1.23 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_bm.c,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */
/*-
@@ -753,7 +753,6 @@ bmac_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -827,7 +826,7 @@ bmac_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = EINVAL;
+ error = ether_ioctl(ifp, &sc->arpcom, cmd, data);
}
splx(s);
diff --git a/sys/arch/macppc/dev/if_mc.c b/sys/arch/macppc/dev/if_mc.c
index 54e89adbb0f..d2c9d086989 100644
--- a/sys/arch/macppc/dev/if_mc.c
+++ b/sys/arch/macppc/dev/if_mc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mc.c,v 1.10 2007/04/22 22:31:14 deraadt Exp $ */
+/* $OpenBSD: if_mc.c,v 1.11 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_mc.c,v 1.9.16.1 2006/06/21 14:53:13 yamt Exp $ */
/*-
@@ -501,7 +501,6 @@ mc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
int s = splnet(), err = 0;
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
if (!(ifp->if_flags & IFF_RUNNING))
@@ -555,8 +554,9 @@ mc_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
}
break;
default:
- err = EINVAL;
+ err = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+
splx(s);
return (err);
}
diff --git a/sys/arch/mvme68k/dev/if_ie.c b/sys/arch/mvme68k/dev/if_ie.c
index e878731c6e1..6ae74e8b4b7 100644
--- a/sys/arch/mvme68k/dev/if_ie.c
+++ b/sys/arch/mvme68k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.35 2006/04/16 00:46:32 pascoe Exp $ */
+/* $OpenBSD: if_ie.c,v 1.36 2008/10/02 20:21:13 brad Exp $ */
/*-
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -1811,13 +1811,7 @@ ieioctl(ifp, cmd, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return error;
- }
-
switch(cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1885,8 +1879,9 @@ ieioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+
splx(s);
return error;
}
diff --git a/sys/arch/mvme88k/dev/if_ie.c b/sys/arch/mvme88k/dev/if_ie.c
index 107cb65fcbe..fc20ea22c19 100644
--- a/sys/arch/mvme88k/dev/if_ie.c
+++ b/sys/arch/mvme88k/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.41 2006/05/08 14:36:10 miod Exp $ */
+/* $OpenBSD: if_ie.c,v 1.42 2008/10/02 20:21:13 brad Exp $ */
/*-
* Copyright (c) 1998 Steve Murphree, Jr.
@@ -1794,13 +1794,7 @@ ieioctl(ifp, cmd, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return error;
- }
-
switch(cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1868,8 +1862,9 @@ ieioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+
splx(s);
return error;
}
diff --git a/sys/arch/sgi/dev/if_mec.c b/sys/arch/sgi/dev/if_mec.c
index c9b45f11635..064543c0f1e 100644
--- a/sys/arch/sgi/dev/if_mec.c
+++ b/sys/arch/sgi/dev/if_mec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mec.c,v 1.15 2008/02/20 18:46:20 miod Exp $ */
+/* $OpenBSD: if_mec.c,v 1.16 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_mec_mace.c,v 1.5 2004/08/01 06:36:36 tsutsui Exp $ */
/*
@@ -1040,15 +1040,10 @@ mec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
struct mec_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
struct ifaddr *ifa = (struct ifaddr *)data;
- int s, error;
+ int s, error = 0;
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_ac, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1108,8 +1103,7 @@ mec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = ENXIO;
- break;
+ error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
}
splx(s);
diff --git a/sys/arch/socppc/dev/if_tsec.c b/sys/arch/socppc/dev/if_tsec.c
index cd8bf14c61f..170eb68e2e4 100644
--- a/sys/arch/socppc/dev/if_tsec.c
+++ b/sys/arch/socppc/dev/if_tsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tsec.c,v 1.11 2008/08/07 17:56:51 brad Exp $ */
+/* $OpenBSD: if_tsec.c,v 1.12 2008/10/02 20:21:13 brad Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -456,14 +456,10 @@ tsec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
struct tsec_softc *sc = ifp->if_softc;
struct ifaddr *ifa = (struct ifaddr *)addr;
struct ifreq *ifr = (struct ifreq *)addr;
- int error, s;
+ int error = 0, s;
s = splnet();
- error = ether_ioctl(ifp, &sc->sc_ac, cmd, addr);
- if (error)
- goto err;
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -510,11 +506,10 @@ tsec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
break;
default:
- error = ENOTTY;
+ error = ether_ioctl(ifp, &sc->sc_ac, cmd, addr);
break;
}
-err:
splx(s);
return (error);
}
diff --git a/sys/arch/sparc/dev/be.c b/sys/arch/sparc/dev/be.c
index 50a5126a552..9cf5a694449 100644
--- a/sys/arch/sparc/dev/be.c
+++ b/sys/arch/sparc/dev/be.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: be.c,v 1.40 2006/05/27 23:59:07 jason Exp $ */
+/* $OpenBSD: be.c,v 1.41 2008/10/02 20:21:13 brad Exp $ */
/*
* Copyright (c) 1998 Theo de Raadt and Jason L. Wright.
@@ -636,13 +636,9 @@ beioctl(ifp, cmd, data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_ifmedia, cmd);
break;
default:
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return error;
- }
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+
splx(s);
return error;
}
diff --git a/sys/arch/sparc/dev/hme.c b/sys/arch/sparc/dev/hme.c
index 75883c28501..a9984cb6b21 100644
--- a/sys/arch/sparc/dev/hme.c
+++ b/sys/arch/sparc/dev/hme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hme.c,v 1.55 2006/06/25 21:53:44 brad Exp $ */
+/* $OpenBSD: hme.c,v 1.56 2008/10/02 20:21:13 brad Exp $ */
/*
* Copyright (c) 1998 Jason L. Wright (jason@thought.net)
@@ -385,11 +385,6 @@ hmeioctl(ifp, cmd, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
switch (ifa->ifa_addr->sa_family) {
@@ -466,7 +461,7 @@ hmeioctl(ifp, cmd, data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
break;
default:
- error = ENOTTY;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
sc->sc_if_flags = ifp->if_flags;
diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c
index 61400a7f868..b26ae16859d 100644
--- a/sys/arch/sparc/dev/if_ie.c
+++ b/sys/arch/sparc/dev/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.37 2006/12/03 16:35:25 miod Exp $ */
+/* $OpenBSD: if_ie.c,v 1.38 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */
/*-
@@ -1954,7 +1954,6 @@ ieioctl(ifp, cmd, data)
s = splnet();
switch(cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -2022,8 +2021,9 @@ ieioctl(ifp, cmd, data)
break;
default:
- error = ENOTTY;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+
splx(s);
return error;
}
diff --git a/sys/arch/sparc/dev/qe.c b/sys/arch/sparc/dev/qe.c
index f3599a03a7c..360ee17842a 100644
--- a/sys/arch/sparc/dev/qe.c
+++ b/sys/arch/sparc/dev/qe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qe.c,v 1.30 2006/05/27 23:59:07 jason Exp $ */
+/* $OpenBSD: qe.c,v 1.31 2008/10/02 20:21:13 brad Exp $ */
/*
* Copyright (c) 1998, 2000 Jason L. Wright.
@@ -655,13 +655,9 @@ qeioctl(ifp, cmd, data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_ifmedia, cmd);
break;
default:
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+
splx(s);
return (error);
}
diff --git a/sys/arch/vax/bi/if_ni.c b/sys/arch/vax/bi/if_ni.c
index cdd803754e3..fb314d17770 100644
--- a/sys/arch/vax/bi/if_ni.c
+++ b/sys/arch/vax/bi/if_ni.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ni.c,v 1.10 2007/05/11 10:06:55 pedro Exp $ */
+/* $OpenBSD: if_ni.c,v 1.11 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_ni.c,v 1.15 2002/05/22 16:03:14 wiz Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -700,7 +700,6 @@ niioctl(ifp, cmd, data)
int s = splnet(), error = 0;
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
switch(ifa->ifa_addr->sa_family) {
@@ -759,9 +758,9 @@ niioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
-
+ error = ether_ioctl(ifp, &sc->sc_ec, cmd, data);
}
+
splx(s);
return (error);
}
diff --git a/sys/arch/vax/if/if_qe.c b/sys/arch/vax/if/if_qe.c
index 24dce6176a5..e1ac2c63350 100644
--- a/sys/arch/vax/if/if_qe.c
+++ b/sys/arch/vax/if/if_qe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_qe.c,v 1.21 2007/09/17 01:33:33 krw Exp $ */
+/* $OpenBSD: if_qe.c,v 1.22 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_qe.c,v 1.51 2002/06/08 12:28:37 ragge Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -636,7 +636,6 @@ qeioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
int s = splnet(), error = 0;
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
switch(ifa->ifa_addr->sa_family) {
@@ -695,9 +694,9 @@ qeioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = EINVAL;
-
+ error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
}
+
splx(s);
return (error);
}
diff --git a/sys/arch/vax/if/sgec.c b/sys/arch/vax/if/sgec.c
index e7dce2eddcc..f87af9772e8 100644
--- a/sys/arch/vax/if/sgec.c
+++ b/sys/arch/vax/if/sgec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sgec.c,v 1.16 2008/08/22 17:09:06 deraadt Exp $ */
+/* $OpenBSD: sgec.c,v 1.17 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: sgec.c,v 1.5 2000/06/04 02:14:14 matt Exp $ */
/*
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
@@ -630,7 +630,6 @@ zeioctl(ifp, cmd, data)
int s = splnet(), error = 0;
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
switch(ifa->ifa_addr->sa_family) {
@@ -696,9 +695,9 @@ zeioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
-
+ error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
}
+
splx(s);
return (error);
}
diff --git a/sys/dev/ic/aic6915.c b/sys/dev/ic/aic6915.c
index d47d53230ac..24253a42ded 100644
--- a/sys/dev/ic/aic6915.c
+++ b/sys/dev/ic/aic6915.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic6915.c,v 1.6 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: aic6915.c,v 1.7 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: aic6915.c,v 1.15 2005/12/24 20:27:29 perry Exp $ */
/*-
@@ -543,11 +543,6 @@ sf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -603,7 +598,7 @@ sf_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = ENOTTY;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
/* Try to get more packets going. */
diff --git a/sys/dev/ic/am7990.c b/sys/dev/ic/am7990.c
index 0aec5414156..46e48aa7507 100644
--- a/sys/dev/ic/am7990.c
+++ b/sys/dev/ic/am7990.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: am7990.c,v 1.41 2006/04/20 20:31:12 miod Exp $ */
+/* $OpenBSD: am7990.c,v 1.42 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: am7990.c,v 1.22 1996/10/13 01:37:19 christos Exp $ */
/*-
@@ -843,13 +843,7 @@ am7990_ioctl(ifp, cmd, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return error;
- }
-
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -924,8 +918,7 @@ am7990_ioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c
index c52f2b0f6f0..1f6be3b776e 100644
--- a/sys/dev/ic/dc.c
+++ b/sys/dev/ic/dc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dc.c,v 1.103 2008/09/12 05:44:52 brad Exp $ */
+/* $OpenBSD: dc.c,v 1.104 2008/10/02 20:21:13 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -2973,11 +2973,6 @@ dc_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -3039,12 +3034,10 @@ dc_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
#endif
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c
index 3ea2003922a..e3a3298ac4b 100644
--- a/sys/dev/ic/elink3.c
+++ b/sys/dev/ic/elink3.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elink3.c,v 1.71 2007/10/13 16:12:29 fgsch Exp $ */
+/* $OpenBSD: elink3.c,v 1.72 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */
/*
@@ -1477,13 +1477,7 @@ epioctl(ifp, cmd, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return error;
- }
-
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1556,8 +1550,7 @@ epioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c
index 229f68720f4..a1c06209a9a 100644
--- a/sys/dev/ic/fxp.c
+++ b/sys/dev/ic/fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxp.c,v 1.92 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: fxp.c,v 1.93 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -1633,11 +1633,6 @@ fxp_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1691,8 +1686,9 @@ fxp_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
break;
default:
- error = EINVAL;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
}
+
splx(s);
return (error);
}
diff --git a/sys/dev/ic/gem.c b/sys/dev/ic/gem.c
index 3d15faffa0d..231eebcf580 100644
--- a/sys/dev/ic/gem.c
+++ b/sys/dev/ic/gem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gem.c,v 1.78 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: gem.c,v 1.79 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: gem.c,v 1.1 2001/09/16 00:11:43 eeh Exp $ */
/*
@@ -1423,13 +1423,7 @@ gem_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
if ((ifp->if_flags & IFF_RUNNING) == 0)
@@ -1492,8 +1486,7 @@ gem_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c
index 19853211493..f80e9e04ada 100644
--- a/sys/dev/ic/hme.c
+++ b/sys/dev/ic/hme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hme.c,v 1.50 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: hme.c,v 1.51 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: hme.c,v 1.21 2001/07/07 15:59:37 thorpej Exp $ */
/*-
@@ -1212,13 +1212,7 @@ hme_ioctl(ifp, cmd, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
-
case SIOCSIFADDR:
switch (ifa->ifa_addr->sa_family) {
#ifdef INET
@@ -1298,8 +1292,7 @@ hme_ioctl(ifp, cmd, data)
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
sc->sc_if_flags = ifp->if_flags;
diff --git a/sys/dev/ic/i82596.c b/sys/dev/ic/i82596.c
index 3a2ad10a1a5..798f4722eaf 100644
--- a/sys/dev/ic/i82596.c
+++ b/sys/dev/ic/i82596.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82596.c,v 1.29 2008/06/26 05:42:15 ray Exp $ */
+/* $OpenBSD: i82596.c,v 1.30 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: i82586.c,v 1.18 1998/08/15 04:42:42 mycroft Exp $ */
/*-
@@ -1870,13 +1870,7 @@ i82596_ioctl(ifp, cmd, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return error;
- }
-
switch(cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1949,8 +1943,9 @@ i82596_ioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+
splx(s);
return (error);
}
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c
index cf37c4bb405..bc876e1966c 100644
--- a/sys/dev/ic/if_wi.c
+++ b/sys/dev/ic/if_wi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi.c,v 1.140 2008/04/18 09:16:14 djm Exp $ */
+/* $OpenBSD: if_wi.c,v 1.141 2008/10/02 20:21:13 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -126,7 +126,7 @@ u_int32_t widebug = WIDEBUG;
#if !defined(lint) && !defined(__OpenBSD__)
static const char rcsid[] =
- "$OpenBSD: if_wi.c,v 1.140 2008/04/18 09:16:14 djm Exp $";
+ "$OpenBSD: if_wi.c,v 1.141 2008/10/02 20:21:13 brad Exp $";
#endif /* lint */
#ifdef foo
@@ -1574,11 +1574,6 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
DPRINTF (WID_IOCTL, ("wi_ioctl: command %lu data %p\n",
command, data));
- if ((error = ether_ioctl(ifp, &sc->sc_ic.ic_ac, command, data)) > 0) {
- splx(s);
- return error;
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -2053,14 +2048,14 @@ wi_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = wihap_ioctl(sc, command, data);
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_ic.ic_ac, command, data);
}
if (wreq)
free(wreq, M_DEVBUF);
if (nwidp)
free(nwidp, M_DEVBUF);
+
splx(s);
return(error);
}
diff --git a/sys/dev/ic/lemac.c b/sys/dev/ic/lemac.c
index 4fb409dc208..464ce3690c2 100644
--- a/sys/dev/ic/lemac.c
+++ b/sys/dev/ic/lemac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lemac.c,v 1.10 2006/04/16 16:32:08 miod Exp $ */
+/* $OpenBSD: lemac.c,v 1.11 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: lemac.c,v 1.20 2001/06/13 10:46:02 wiz Exp $ */
/*-
@@ -799,11 +799,6 @@ lemac_ifioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -856,8 +851,7 @@ lemac_ifioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
diff --git a/sys/dev/ic/mtd8xx.c b/sys/dev/ic/mtd8xx.c
index 3d2f601a9e1..0256e67a490 100644
--- a/sys/dev/ic/mtd8xx.c
+++ b/sys/dev/ic/mtd8xx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mtd8xx.c,v 1.13 2007/11/26 09:28:33 martynas Exp $ */
+/* $OpenBSD: mtd8xx.c,v 1.14 2008/10/02 20:21:13 brad Exp $ */
/*
* Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru>
@@ -580,13 +580,9 @@ mtd_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
struct mtd_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
struct ifaddr *ifa = (struct ifaddr *)data;
- int s, error;
+ int s, error = 0;
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) {
- splx(s);
- return (error);
- }
switch (command) {
case SIOCSIFADDR:
@@ -637,8 +633,7 @@ mtd_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
}
splx(s);
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index 3ee58670a43..22446b01f55 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.90 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: re.c,v 1.91 2008/10/02 20:21:13 brad Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -2050,12 +2050,6 @@ re_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command,
- data)) > 0) {
- splx(s);
- return (error);
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -2104,12 +2098,10 @@ re_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c
index bc437adb649..f7e9c98f9d9 100644
--- a/sys/dev/ic/rtl81x9.c
+++ b/sys/dev/ic/rtl81x9.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtl81x9.c,v 1.59 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: rtl81x9.c,v 1.60 2008/10/02 20:21:13 brad Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1093,11 +1093,6 @@ int rl_ioctl(ifp, command, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) {
- splx(s);
- return error;
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1150,12 +1145,10 @@ int rl_ioctl(ifp, command, data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
}
splx(s);
-
return(error);
}
diff --git a/sys/dev/ic/smc83c170.c b/sys/dev/ic/smc83c170.c
index af2b8ca9a19..1b05cf3337b 100644
--- a/sys/dev/ic/smc83c170.c
+++ b/sys/dev/ic/smc83c170.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smc83c170.c,v 1.11 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: smc83c170.c,v 1.12 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: smc83c170.c,v 1.59 2005/02/27 00:27:02 perry Exp $ */
/*-
@@ -551,15 +551,10 @@ epic_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
struct epic_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
struct ifaddr *ifa = (struct ifaddr *)data;
- int s, error;
+ int s, error = 0;
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -622,8 +617,9 @@ epic_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = EINVAL;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+
splx(s);
return (error);
}
diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c
index 8f426de177d..cbab3bfd8af 100644
--- a/sys/dev/ic/xl.c
+++ b/sys/dev/ic/xl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xl.c,v 1.81 2008/09/18 15:16:30 naddy Exp $ */
+/* $OpenBSD: xl.c,v 1.82 2008/10/02 20:21:13 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -2271,11 +2271,6 @@ xl_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) {
- splx(s);
- return error;
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -2344,12 +2339,10 @@ xl_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
&mii->mii_media, command);
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/isa/if_ef_isapnp.c b/sys/dev/isa/if_ef_isapnp.c
index 641ad511eeb..c68bac2a81c 100644
--- a/sys/dev/isa/if_ef_isapnp.c
+++ b/sys/dev/isa/if_ef_isapnp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ef_isapnp.c,v 1.22 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_ef_isapnp.c,v 1.23 2008/10/02 20:21:13 brad Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -346,11 +346,6 @@ efioctl(ifp, cmd, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -396,8 +391,7 @@ efioctl(ifp, cmd, data)
efsetmulti(sc);
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c
index 334fa72f300..5d5d2e28409 100644
--- a/sys/dev/isa/if_eg.c
+++ b/sys/dev/isa/if_eg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_eg.c,v 1.30 2007/01/07 15:15:58 miod Exp $ */
+/* $OpenBSD: if_eg.c,v 1.31 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_eg.c,v 1.26 1996/05/12 23:52:27 mycroft Exp $ */
/*
@@ -786,13 +786,7 @@ egioctl(ifp, cmd, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -839,8 +833,7 @@ egioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
diff --git a/sys/dev/isa/if_el.c b/sys/dev/isa/if_el.c
index 8e4d0b7b599..63ba41ec46f 100644
--- a/sys/dev/isa/if_el.c
+++ b/sys/dev/isa/if_el.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_el.c,v 1.20 2006/03/25 22:41:44 djm Exp $ */
+/* $OpenBSD: if_el.c,v 1.21 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_el.c,v 1.39 1996/05/12 23:52:32 mycroft Exp $ */
/*
@@ -595,13 +595,7 @@ elioctl(ifp, cmd, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return error;
- }
-
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -644,8 +638,7 @@ elioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
diff --git a/sys/dev/isa/if_ex.c b/sys/dev/isa/if_ex.c
index 54b3d84b6a3..6ccec01b67f 100644
--- a/sys/dev/isa/if_ex.c
+++ b/sys/dev/isa/if_ex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ex.c,v 1.32 2007/10/21 03:02:09 brad Exp $ */
+/* $OpenBSD: if_ex.c,v 1.33 2008/10/02 20:21:13 brad Exp $ */
/*
* Copyright (c) 1997, Donald A. Schmidt
* Copyright (c) 1996, Javier Martín Rueda (jmrueda@diatel.upm.es)
@@ -744,11 +744,6 @@ ex_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch(cmd) {
case SIOCSIFADDR:
DODEBUG(Start_End, printf("SIOCSIFADDR"););
@@ -792,13 +787,10 @@ ex_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->ifmedia, cmd);
break;
default:
- DODEBUG(Start_End, printf("unknown"););
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, cmd, data);
}
splx(s);
-
DODEBUG(Start_End, printf("\nex_ioctl: finish\n"););
return(error);
}
diff --git a/sys/dev/isa/if_ie.c b/sys/dev/isa/if_ie.c
index 11b5283716c..0639fbeae9d 100644
--- a/sys/dev/isa/if_ie.c
+++ b/sys/dev/isa/if_ie.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ie.c,v 1.33 2006/04/16 00:46:32 pascoe Exp $ */
+/* $OpenBSD: if_ie.c,v 1.34 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_ie.c,v 1.51 1996/05/12 23:52:48 mycroft Exp $ */
/*-
@@ -2126,13 +2126,7 @@ ieioctl(ifp, cmd, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return error;
- }
-
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -2200,8 +2194,9 @@ ieioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+
splx(s);
return error;
}
diff --git a/sys/dev/pci/if_bce.c b/sys/dev/pci/if_bce.c
index 4878cb58a5d..eae61660a28 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.25 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_bce.c,v 1.26 2008/10/02 20:21:13 brad Exp $ */
/* $NetBSD: if_bce.c,v 1.3 2003/09/29 01:53:02 mrg Exp $ */
/*
@@ -440,11 +440,6 @@ bce_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->bce_ac, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -498,8 +493,7 @@ bce_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->bce_mii.mii_media, cmd);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->bce_ac, cmd, data);
}
if (error == 0) {
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index ece8c2fca30..539479badda 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.245 2008/09/23 00:27:18 brad Exp $ */
+/* $OpenBSD: if_bge.c,v 1.246 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -3274,11 +3274,6 @@ bge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -3351,12 +3346,10 @@ bge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
}
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c
index 55b5617337b..aea799bddb6 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.65 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_bnx.c,v 1.66 2008/10/02 20:21:14 brad Exp $ */
/*-
* Copyright (c) 2006 Broadcom Corporation
@@ -4606,11 +4606,6 @@ bnx_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -4668,12 +4663,10 @@ bnx_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c
index 7172f60b739..a6cfd556c05 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.21 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_cas.c,v 1.22 2008/10/02 20:21:14 brad Exp $ */
/*
*
@@ -1689,13 +1689,7 @@ cas_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
-
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
if ((ifp->if_flags & IFF_RUNNING) == 0)
@@ -1758,8 +1752,7 @@ cas_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
diff --git a/sys/dev/pci/if_de.c b/sys/dev/pci/if_de.c
index 4958a4a33af..6bc9a6b689e 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.99 2008/03/04 19:43:18 miod Exp $ */
+/* $OpenBSD: if_de.c,v 1.100 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: if_de.c,v 1.58 1998/01/12 09:39:58 thorpej Exp $ */
/*-
@@ -4152,11 +4152,6 @@ tulip_ifioctl(struct ifnet * ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->tulip_ac, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR: {
ifp->if_flags |= IFF_UP;
@@ -4218,8 +4213,7 @@ tulip_ifioctl(struct ifnet * ifp, u_long cmd, caddr_t data)
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->tulip_ac, cmd, data);
}
splx(s);
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 90048c260f5..85042fc2691 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.189 2008/09/30 17:59:22 brad Exp $ */
+/* $OpenBSD: if_em.c,v 1.190 2008/10/02 20:21:14 brad Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -535,11 +535,6 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->interface_data, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (command) {
case SIOCSIFADDR:
IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFADDR (Set Interface "
@@ -612,8 +607,7 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->media, command);
break;
default:
- IOCTL_DEBUGOUT1("ioctl received: UNKNOWN (0x%x)", (int)command);
- error = ENOTTY;
+ error = ether_ioctl(ifp, &sc->interface_data, command, data);
}
splx(s);
diff --git a/sys/dev/pci/if_et.c b/sys/dev/pci/if_et.c
index f80a5a004c8..8330c518b8f 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.13 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_et.c,v 1.14 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
*
@@ -1038,11 +1038,6 @@ et_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return error;
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1097,11 +1092,10 @@ et_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_miibus.mii_media, cmd);
break;
default:
- error = ENOTTY;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
-
return error;
}
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index f49899d9e14..a32f50555e2 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.8 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_ix.c,v 1.9 2008/10/02 20:21:14 brad Exp $ */
/******************************************************************************
@@ -434,11 +434,6 @@ ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (command) {
case SIOCSIFADDR:
IOCTL_DEBUGOUT("ioctl: SIOCxIFADDR (Get/Set Interface Addr)");
@@ -499,9 +494,7 @@ ixgbe_ioctl(struct ifnet * ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->media, command);
break;
default:
- IOCTL_DEBUGOUT1("ioctl: UNKNOWN (0x%X)\n", (int)command);
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c
index 8faabde5d53..2e919761e78 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.47 2008/09/30 17:59:22 brad Exp $ */
+/* $OpenBSD: if_ixgb.c,v 1.48 2008/10/02 20:21:14 brad Exp $ */
#include <dev/pci/if_ixgb.h>
@@ -370,11 +370,6 @@ ixgb_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->interface_data, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (command) {
case SIOCSIFADDR:
IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFADDR (Set Interface "
@@ -438,8 +433,7 @@ ixgb_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->media, command);
break;
default:
- IOCTL_DEBUGOUT1("ioctl received: UNKNOWN (0x%X)\n", (int)command);
- error = ENOTTY;
+ error = ether_ioctl(ifp, &sc->interface_data, command, data);
}
splx(s);
diff --git a/sys/dev/pci/if_jme.c b/sys/dev/pci/if_jme.c
index 1403a69b9b2..660db35f37d 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.3 2008/09/29 22:43:45 deraadt Exp $ */
+/* $OpenBSD: if_jme.c,v 1.4 2008/10/02 20:21:14 brad Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
@@ -1320,11 +1320,6 @@ jme_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return error;
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1401,8 +1396,7 @@ jme_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
diff --git a/sys/dev/pci/if_lii.c b/sys/dev/pci/if_lii.c
index 960c76fa457..a6f3d1e45dd 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.18 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_lii.c,v 1.19 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 2007 The NetBSD Foundation.
@@ -1049,14 +1049,10 @@ lii_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
struct lii_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)addr;
struct ifaddr *ifa;
- int s, error;
+ int s, error = 0;
s = splnet();
- error = ether_ioctl(ifp, &sc->sc_ac, cmd, addr);
- if (error > 0)
- goto err;
-
switch(cmd) {
case SIOCSIFADDR:
SET(ifp->if_flags, IFF_UP);
@@ -1090,18 +1086,16 @@ lii_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->sc_ac, cmd, addr);
}
-err:
if (error == ENETRESET) {
if (ifp->if_flags & IFF_RUNNING)
lii_iff(sc);
error = 0;
}
- splx(s);
+ splx(s);
return error;
}
diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c
index f7f4a8526b2..489ef5e9b96 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.65 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_msk.c,v 1.66 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -734,11 +734,6 @@ msk_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc_if->arpcom, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -794,12 +789,10 @@ msk_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc_if->arpcom, command, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c
index 2096cf0d59e..27ff873b5c3 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.8 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_myx.c,v 1.9 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org>
@@ -822,10 +822,6 @@ myx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
int s, error = 0;
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_ac, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
switch (cmd) {
case SIOCSIFADDR:
@@ -868,7 +864,7 @@ myx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = ENOTTY;
+ error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
}
if (error == ENETRESET) {
@@ -879,7 +875,6 @@ myx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index 43bb11763c6..79d09748713 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.81 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.82 2008/10/02 20:21:14 brad Exp $ */
/*-
* Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -527,11 +527,6 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return error;
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -586,11 +581,10 @@ nfe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, cmd);
break;
default:
- error = ENOTTY;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
-
return error;
}
diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c
index bf9a030f957..ef1703a53a9 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.58 2008/05/23 08:49:27 brad Exp $ */
+/* $OpenBSD: if_nge.c,v 1.59 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
* Copyright (c) 1997, 1998, 1999, 2000, 2001
@@ -2046,11 +2046,6 @@ nge_ioctl(ifp, command, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch(command) {
case SIOCSIFMTU:
if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ifp->if_hardmtu)
@@ -2123,12 +2118,10 @@ nge_ioctl(ifp, command, data)
}
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
-
return(error);
}
diff --git a/sys/dev/pci/if_nxe.c b/sys/dev/pci/if_nxe.c
index ce105f74562..788a17e88d4 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.55 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_nxe.c,v 1.56 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -1020,16 +1020,12 @@ nxe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
struct nxe_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)addr;
struct ifaddr *ifa;
- int error;
+ int error = 0;
int s;
rw_enter_write(&sc->sc_lock);
s = splnet();
- error = ether_ioctl(ifp, &sc->sc_ac, cmd, addr);
- if (error > 0)
- goto err;
-
timeout_del(&sc->sc_tick);
switch (cmd) {
@@ -1066,8 +1062,7 @@ nxe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->sc_ac, cmd, addr);
}
if (error == ENETRESET) {
@@ -1081,7 +1076,6 @@ nxe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
nxe_tick(sc);
-err:
splx(s);
rw_exit_write(&sc->sc_lock);
return (error);
diff --git a/sys/dev/pci/if_pcn.c b/sys/dev/pci/if_pcn.c
index 1d23e361ed5..58d5339d6c9 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.19 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_pcn.c,v 1.20 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: if_pcn.c,v 1.26 2005/05/07 09:15:44 is Exp $ */
/*
@@ -1088,14 +1088,6 @@ pcn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- /* Try to get more packets going. */
- pcn_start(ifp);
-
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1157,7 +1149,7 @@ pcn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = ENOTTY;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
/* Try to get more packets going. */
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index b83130f53db..34fd7dac425 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.81 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_sis.c,v 1.82 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -1895,11 +1895,6 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {
- splx(s);
- return error;
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1959,12 +1954,10 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
-
return(error);
}
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c
index cf48c0597b8..13c3b8b0e4c 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.147 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_sk.c,v 1.148 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -866,11 +866,6 @@ sk_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc_if->arpcom, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -926,12 +921,10 @@ sk_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc_if->arpcom, command, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c
index c2f1b3fe9bd..f817717a6b5 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.41 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_ste.c,v 1.42 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -1282,11 +1282,6 @@ ste_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {
- splx(s);
- return error;
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1349,12 +1344,10 @@ ste_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
-
return(error);
}
diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c
index c9a8273968a..d9e75e8e1d1 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.40 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_stge.c,v 1.41 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $ */
/*-
@@ -690,18 +690,10 @@ stge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
struct stge_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
struct ifaddr *ifa = (struct ifaddr *)data;
- int s, error;
+ int s, error = 0;
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- /* Try to get more packets going. */
- stge_start(ifp);
-
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -761,7 +753,7 @@ stge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = ENOTTY;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
/* Try to get more packets going. */
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c
index 0f1eaf41b17..f20a2597307 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.118 2008/09/10 14:01:22 blambert Exp $ */
+/* $OpenBSD: if_tht.c,v 1.119 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -866,16 +866,12 @@ tht_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
struct tht_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)addr;
struct ifaddr *ifa;
- int error;
+ int error = 0;
int s;
rw_enter_write(&sc->sc_lock);
s = splnet();
- error = ether_ioctl(ifp, &sc->sc_ac, cmd, addr);
- if (error > 0)
- goto err;
-
switch (cmd) {
case SIOCSIFADDR:
ifa = (struct ifaddr *)addr;
@@ -919,8 +915,7 @@ tht_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->sc_ac, cmd, addr);
}
if (error == ENETRESET) {
@@ -929,7 +924,6 @@ tht_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr)
error = 0;
}
-err:
splx(s);
rw_exit_write(&sc->sc_lock);
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c
index d78a80f617a..a0045948c75 100644
--- a/sys/dev/pci/if_ti.c
+++ b/sys/dev/pci/if_ti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ti.c,v 1.87 2008/09/24 19:12:59 chl Exp $ */
+/* $OpenBSD: if_ti.c,v 1.88 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -2478,11 +2478,6 @@ ti_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -2546,8 +2541,7 @@ ti_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->ifmedia, command);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c
index bf42496923d..ac7a9dda767 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.44 2008/09/10 14:01:23 blambert Exp $ */
+/* $OpenBSD: if_tl.c,v 1.45 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1788,11 +1788,6 @@ int tl_ioctl(ifp, command, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {
- splx(s);
- return error;
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1854,12 +1849,10 @@ int tl_ioctl(ifp, command, data)
&sc->sc_mii.mii_media, command);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
-
return(error);
}
diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c
index 7642e8a1183..ba6043f8172 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.94 2008/09/18 15:16:30 naddy Exp $ */
+/* $OpenBSD: if_txp.c,v 1.95 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 2001
@@ -1213,11 +1213,6 @@ txp_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, command, data)) > 0) {
- splx(s);
- return error;
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1262,12 +1257,10 @@ txp_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_ifmedia, command);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
}
splx(s);
-
return(error);
}
diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c
index 24a0c1200ee..8259c41a1bf 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.38 2008/09/10 14:01:23 blambert Exp $ */
+/* $OpenBSD: if_vge.c,v 1.39 2008/10/02 20:21:14 brad Exp $ */
/* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */
/*
* Copyright (c) 2004
@@ -1707,11 +1707,6 @@ vge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1772,8 +1767,7 @@ vge_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c
index 15dedb3ef91..7c52bbbd4a1 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.54 2008/09/10 14:01:23 blambert Exp $ */
+/* $OpenBSD: if_vic.c,v 1.55 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
@@ -1181,11 +1181,6 @@ vic_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_ac, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifa = (struct ifaddr *)data;
@@ -1234,8 +1229,7 @@ vic_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
}
if (error == ENETRESET) {
@@ -1246,7 +1240,6 @@ vic_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c
index 27115075d12..e4def20edf5 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.77 2008/09/24 08:41:29 mpf Exp $ */
+/* $OpenBSD: if_vr.c,v 1.78 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1333,11 +1333,6 @@ vr_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {
- splx(s);
- return error;
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1402,12 +1397,10 @@ vr_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
-
return(error);
}
diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c
index b869ec8322b..e94485747a7 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.39 2008/09/10 14:01:23 blambert Exp $ */
+/* $OpenBSD: if_wb.c,v 1.40 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1619,11 +1619,6 @@ int wb_ioctl(ifp, command, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1668,12 +1663,10 @@ int wb_ioctl(ifp, command, data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_mii.mii_media, command);
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
-
return(error);
}
diff --git a/sys/dev/pci/if_xge.c b/sys/dev/pci/if_xge.c
index 8636c04ea33..53db5138991 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.44 2008/09/24 19:12:59 chl Exp $ */
+/* $OpenBSD: if_xge.c,v 1.45 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: if_xge.c,v 1.1 2005/09/09 10:30:27 ragge Exp $ */
/*
@@ -964,11 +964,6 @@ xge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1018,11 +1013,10 @@ xge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->xena_media, cmd);
break;
default:
- error = ENOTTY;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c
index 1a920526027..a20d495834b 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.34 2006/08/18 08:17:07 jsg Exp $ */
+/* $OpenBSD: if_ray.c,v 1.35 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: if_ray.c,v 1.21 2000/07/05 02:35:54 onoe Exp $ */
/*
@@ -943,10 +943,9 @@ ray_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
struct ray_softc *sc;
struct ifreq *ifr;
struct ifaddr *ifa;
- int error, error2, s, i;
+ int error = 0, error2, s, i;
sc = ifp->if_softc;
- error = 0;
ifr = (struct ifreq *)data;
@@ -955,11 +954,6 @@ ray_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
RAY_DPRINTF(("%s: ioctl: cmd 0x%lx data 0x%lx\n", ifp->if_xname,
cmd, (long)data));
- if ((error = ether_ioctl(ifp, &sc->sc_ec, cmd, data)) > 0) {
- splx(s);
- return error;
- }
-
switch (cmd) {
case SIOCSIFADDR:
RAY_DPRINTF(("%s: ioctl: cmd SIOCSIFADDR\n", ifp->if_xname));
@@ -1076,15 +1070,12 @@ ray_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
#endif
default:
- RAY_DPRINTF(("%s: ioctl: unknown\n", ifp->if_xname));
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_ec, cmd, data);
}
RAY_DPRINTF(("%s: ioctl: returns %d\n", ifp->if_xname, error));
splx(s);
-
return (error);
}
diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c
index 6c5d738cc2d..c73ef6b2ec0 100644
--- a/sys/dev/sbus/be.c
+++ b/sys/dev/sbus/be.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: be.c,v 1.21 2008/09/10 14:01:23 blambert Exp $ */
+/* $OpenBSD: be.c,v 1.22 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: be.c,v 1.26 2001/03/20 15:39:20 pk Exp $ */
/*-
@@ -933,11 +933,6 @@ beioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -1007,9 +1002,9 @@ beioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, cmd);
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
+
splx(s);
return (error);
}
diff --git a/sys/dev/sbus/qe.c b/sys/dev/sbus/qe.c
index a242c7c2e26..e75e0ef2600 100644
--- a/sys/dev/sbus/qe.c
+++ b/sys/dev/sbus/qe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qe.c,v 1.21 2008/06/26 05:42:18 ray Exp $ */
+/* $OpenBSD: qe.c,v 1.22 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: qe.c,v 1.16 2001/03/30 17:30:18 christos Exp $ */
/*-
@@ -905,11 +905,6 @@ qeioctl(ifp, cmd, data)
s = splnet();
- if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
-
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -978,8 +973,7 @@ qeioctl(ifp, cmd, data)
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data);
}
splx(s);
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index 802cf569540..fb530a31317 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_aue.c,v 1.72 2008/09/10 14:01:23 blambert Exp $ */
+/* $OpenBSD: if_aue.c,v 1.73 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -1579,12 +1579,10 @@ aue_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c
index a2bb9b44c2b..10f8968fda8 100644
--- a/sys/dev/usb/if_axe.c
+++ b/sys/dev/usb/if_axe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_axe.c,v 1.87 2008/09/21 23:59:20 brad Exp $ */
+/* $OpenBSD: if_axe.c,v 1.88 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org>
@@ -1408,8 +1408,7 @@ axe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, cmd, data);
}
splx(s);
diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c
index adc6e1ef64b..d19d56e366f 100644
--- a/sys/dev/usb/if_cdce.c
+++ b/sys/dev/usb/if_cdce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_cdce.c,v 1.41 2008/03/14 21:54:23 mbalmer Exp $ */
+/* $OpenBSD: if_cdce.c,v 1.42 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com>
@@ -579,12 +579,11 @@ cdce_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
break;
default:
- error = EINVAL;
+ error = ether_ioctl(ifp, &sc->cdce_arpcom, command, data);
break;
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/usb/if_cdcef.c b/sys/dev/usb/if_cdcef.c
index 4267d2ec167..a2a61de305e 100644
--- a/sys/dev/usb/if_cdcef.c
+++ b/sys/dev/usb/if_cdcef.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_cdcef.c,v 1.20 2007/11/25 16:40:03 jmc Exp $ */
+/* $OpenBSD: if_cdcef.c,v 1.21 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 2007 Dale Rahn <drahn@openbsd.org>
@@ -518,12 +518,10 @@ cdcef_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_arpcom, command, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c
index 8b6df602f65..3accd93c7ea 100644
--- a/sys/dev/usb/if_cue.c
+++ b/sys/dev/usb/if_cue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_cue.c,v 1.49 2008/09/10 14:01:23 blambert Exp $ */
+/* $OpenBSD: if_cue.c,v 1.50 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: if_cue.c,v 1.40 2002/07/11 21:14:26 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -1167,12 +1167,10 @@ cue_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
}
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 99671a1bde0..d6757cdf7b5 100644
--- a/sys/dev/usb/if_kue.c
+++ b/sys/dev/usb/if_kue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_kue.c,v 1.56 2007/10/11 18:33:14 deraadt Exp $ */
+/* $OpenBSD: if_kue.c,v 1.57 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -1130,12 +1130,10 @@ kue_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
}
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->arpcom, command, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c
index 8b6628e3d2e..cb96fc006e3 100644
--- a/sys/dev/usb/if_udav.c
+++ b/sys/dev/usb/if_udav.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_udav.c,v 1.41 2008/09/10 14:01:23 blambert Exp $ */
+/* $OpenBSD: if_udav.c,v 1.42 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: if_udav.c,v 1.3 2004/04/23 17:25:25 itojun Exp $ */
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
/*
@@ -1273,12 +1273,10 @@ udav_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
}
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &sc->sc_ac, cmd, data);
}
splx(s);
-
return (error);
}
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index eb89e854ded..6315867c53b 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.124 2008/08/28 13:10:54 brad Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.125 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -172,7 +172,6 @@ ether_ioctl(ifp, arp, cmd, data)
int error = 0;
switch (cmd) {
-
case SIOCSIFADDR:
switch (ifa->ifa_addr->sa_family) {
#ifdef NETATALK
@@ -183,7 +182,7 @@ ether_ioctl(ifp, arp, cmd, data)
}
break;
default:
- break;
+ error = ENOTTY;
}
return error;
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c
index cc00ff8d1b9..14a19a2db31 100644
--- a/sys/net/if_trunk.c
+++ b/sys/net/if_trunk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.c,v 1.50 2008/09/17 20:10:37 chl Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.51 2008/10/02 20:21:14 brad Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -632,9 +632,6 @@ trunk_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
s = splnet();
- if ((error = ether_ioctl(ifp, &tr->tr_ac, cmd, data)) > 0)
- goto out;
-
bzero(&rpbuf, sizeof(rpbuf));
switch (cmd) {
@@ -767,8 +764,7 @@ trunk_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ENETRESET;
break;
default:
- error = EINVAL;
- break;
+ error = ether_ioctl(ifp, &tr->tr_ac, cmd, data);
}
if (error == ENETRESET) {
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index bd20a295b48..9b37e7ab460 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.94 2008/08/04 18:55:08 damien Exp $ */
+/* $OpenBSD: if_tun.c,v 1.95 2008/10/02 20:21:14 brad Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -438,11 +438,7 @@ tun_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
int error = 0, s;
s = splnet();
- if (tp->tun_flags & TUN_LAYER2)
- if ((error = ether_ioctl(ifp, &tp->arpcom, cmd, data)) > 0) {
- splx(s);
- return (error);
- }
+
switch (cmd) {
case SIOCSIFADDR:
tuninit(tp);
@@ -515,8 +511,12 @@ tun_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
ifp->if_flags & IFF_LINK0 ? TUN_LAYER2 : 0);
break;
default:
- error = ENOTTY;
+ if (tp->tun_flags & TUN_LAYER2)
+ error = ether_ioctl(ifp, &tp->arpcom, cmd, data);
+ else
+ error = ENOTTY;
}
+
splx(s);
return (error);
}
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index aa5b2eedd82..41058d22084 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_ioctl.c,v 1.25 2008/09/27 15:16:09 damien Exp $ */
+/* $OpenBSD: ieee80211_ioctl.c,v 1.26 2008/10/02 20:21:15 brad Exp $ */
/* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */
/*-
@@ -346,10 +346,6 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
u_int32_t flags;
switch (cmd) {
- case SIOCSIFADDR:
- case SIOCGIFADDR:
- error = ether_ioctl(ifp, &ic->ic_ac, cmd, data);
- break;
case SIOCSIFMEDIA:
case SIOCGIFMEDIA:
error = ifmedia_ioctl(ifp, ifr, &ic->ic_media, cmd);
@@ -741,8 +737,8 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ENETRESET;
break;
default:
- error = ENOTTY;
- break;
+ error = ether_ioctl(ifp, &ic->ic_ac, cmd, data);
}
+
return error;
}