summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2000-02-15 02:28:16 +0000
committerJason Wright <jason@cvs.openbsd.org>2000-02-15 02:28:16 +0000
commit53fdedfb0b6a3815faa513c0a77ceb9e74e2d0b5 (patch)
tree4d661de226e0e80103d3051b1eff275336289c5f /sys/dev
parenta1ad75dfed29dd509de96d7ef5b4bb3783afaa88 (diff)
make sure to call ether_{add,del}multi() as appropriate in xxx_ioctl()
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_al.c16
-rw-r--r--sys/dev/pci/if_ax.c16
-rw-r--r--sys/dev/pci/if_dc.c16
-rw-r--r--sys/dev/pci/if_rl.c16
-rw-r--r--sys/dev/pci/if_sf.c16
-rw-r--r--sys/dev/pci/if_sis.c16
-rw-r--r--sys/dev/pci/if_sk.c16
-rw-r--r--sys/dev/pci/if_ste.c16
-rw-r--r--sys/dev/pci/if_ti.c12
-rw-r--r--sys/dev/pci/if_tl.c16
-rw-r--r--sys/dev/pci/if_vr.c16
-rw-r--r--sys/dev/pci/if_wb.c16
-rw-r--r--sys/dev/pci/if_xl.c22
13 files changed, 169 insertions, 41 deletions
diff --git a/sys/dev/pci/if_al.c b/sys/dev/pci/if_al.c
index a4fdb8f8e70..c4ccccd9e4d 100644
--- a/sys/dev/pci/if_al.c
+++ b/sys/dev/pci/if_al.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_al.c,v 1.4 1999/12/08 00:38:07 aaron Exp $ */
+/* $OpenBSD: if_al.c,v 1.5 2000/02/15 02:28:14 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@@ -1590,8 +1590,18 @@ int al_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- al_setmulti(sc);
- error = 0;
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
+ al_setmulti(sc);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
diff --git a/sys/dev/pci/if_ax.c b/sys/dev/pci/if_ax.c
index f6d0fed27a7..0410972c9a5 100644
--- a/sys/dev/pci/if_ax.c
+++ b/sys/dev/pci/if_ax.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ax.c,v 1.7 1999/11/26 16:45:27 art Exp $ */
+/* $OpenBSD: if_ax.c,v 1.8 2000/02/15 02:28:14 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1993,8 +1993,18 @@ int ax_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- ax_setmulti(sc);
- error = 0;
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
+ ax_setmulti(sc);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
diff --git a/sys/dev/pci/if_dc.c b/sys/dev/pci/if_dc.c
index 08aba98d684..9b11f32df79 100644
--- a/sys/dev/pci/if_dc.c
+++ b/sys/dev/pci/if_dc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_dc.c,v 1.9 2000/01/16 16:17:56 jason Exp $ */
+/* $OpenBSD: if_dc.c,v 1.10 2000/02/15 02:28:14 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -2610,8 +2610,18 @@ int dc_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- dc_setfilt(sc);
- error = 0;
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
+ dc_setfilt(sc);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
diff --git a/sys/dev/pci/if_rl.c b/sys/dev/pci/if_rl.c
index 95362dad69b..2735b95f907 100644
--- a/sys/dev/pci/if_rl.c
+++ b/sys/dev/pci/if_rl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rl.c,v 1.19 1999/12/14 22:34:45 jason Exp $ */
+/* $OpenBSD: if_rl.c,v 1.20 2000/02/15 02:28:14 jason Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1129,8 +1129,18 @@ int rl_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- rl_setmulti(sc);
- error = 0;
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
+ rl_setmulti(sc);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
diff --git a/sys/dev/pci/if_sf.c b/sys/dev/pci/if_sf.c
index c8c65d1b47a..c3b1cfa32b5 100644
--- a/sys/dev/pci/if_sf.c
+++ b/sys/dev/pci/if_sf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sf.c,v 1.4 1999/12/08 00:38:07 aaron Exp $ */
+/* $OpenBSD: if_sf.c,v 1.5 2000/02/15 02:28:14 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -521,8 +521,18 @@ int sf_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- sf_setmulti(sc);
- error = 0;
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
+ sf_setmulti(sc);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index d4e6e273dd5..78997e1e062 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.2 1999/12/08 00:38:08 aaron Exp $ */
+/* $OpenBSD: if_sis.c,v 1.3 2000/02/15 02:28:14 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -1257,8 +1257,18 @@ int sis_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- sis_setmulti(sc);
- error = 0;
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
+ sis_setmulti(sc);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c
index b7c8a34da25..e6faa720c2a 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.5 1999/12/08 00:38:08 aaron Exp $ */
+/* $OpenBSD: if_sk.c,v 1.6 2000/02/15 02:28:14 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -717,8 +717,18 @@ sk_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- sk_setmulti(sc_if);
- error = 0;
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc_if->arpcom) :
+ ether_delmulti(ifr, &sc_if->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
+ sk_setmulti(sc_if);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c
index 32a1a00d823..0e8d1072b95 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.5 1999/12/08 00:38:08 aaron Exp $ */
+/* $OpenBSD: if_ste.c,v 1.6 2000/02/15 02:28:15 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -1349,8 +1349,18 @@ int ste_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- ste_setmulti(sc);
- error = 0;
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
+ ste_setmulti(sc);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c
index 7bf0965d3a3..f1acbf7afa7 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.9 2000/01/18 05:26:25 jason Exp $ */
+/* $OpenBSD: if_ti.c,v 1.10 2000/02/15 02:28:15 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -2351,7 +2351,15 @@ int ti_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- if (ifp->if_flags & IFF_RUNNING) {
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
ti_setmulti(sc);
error = 0;
}
diff --git a/sys/dev/pci/if_tl.c b/sys/dev/pci/if_tl.c
index 1026a05fcbc..1a1f8a954c9 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.10 1999/09/13 20:41:38 jason Exp $ */
+/* $OpenBSD: if_tl.c,v 1.11 2000/02/15 02:28:15 jason Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -2272,8 +2272,18 @@ int tl_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- tl_setmulti(sc);
- error = 0;
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
+ tl_setmulti(sc);
+ error = 0;
+ }
break;
case SIOCSIFMEDIA:
case SIOCGIFMEDIA:
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c
index 576deeee823..a02cac0b190 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.6 1999/09/13 22:32:31 niklas Exp $ */
+/* $OpenBSD: if_vr.c,v 1.7 2000/02/15 02:28:15 jason Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1836,8 +1836,18 @@ vr_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- vr_setmulti(sc);
- error = 0;
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
+ vr_setmulti(sc);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c
index a18e161ccb8..80ba64e0fe4 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.4 1999/11/19 02:29:27 jason Exp $ */
+/* $OpenBSD: if_wb.c,v 1.5 2000/02/15 02:28:15 jason Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1707,8 +1707,18 @@ int wb_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- wb_setmulti(sc);
- error = 0;
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
+ wb_setmulti(sc);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
diff --git a/sys/dev/pci/if_xl.c b/sys/dev/pci/if_xl.c
index 1d681097fc7..6654da81cd9 100644
--- a/sys/dev/pci/if_xl.c
+++ b/sys/dev/pci/if_xl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_xl.c,v 1.36 1999/12/31 05:17:47 jason Exp $ */
+/* $OpenBSD: if_xl.c,v 1.37 2000/02/15 02:28:15 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -2208,11 +2208,21 @@ xl_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- if (sc->xl_type == XL_TYPE_905B)
- xl_setmulti_hash(sc);
- else
- xl_setmulti(sc);
- error = 0;
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ /*
+ * Multicast list has changed; set the hardware
+ * filter accordingly.
+ */
+ if (sc->xl_type == XL_TYPE_905B)
+ xl_setmulti_hash(sc);
+ else
+ xl_setmulti(sc);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA: