summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_udav.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-01-03 22:45:53 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-01-03 22:45:53 +0000
commit143225e444133568ff10359ad0edd0ce748e3c1f (patch)
treed98fb8b8a5057e74fb176aaa2aabbbc0111672c6 /sys/dev/usb/if_udav.c
parentbb3ba0fb884a12df695a21f102313bd4f92b3efa (diff)
- make sure int is in running state before touching the multicast filters
- call foo_setmulti only instead of init'ing the chip - don't overwrite potential error return with success when calling ether_addmulti/ether_delmulti ok dlg@
Diffstat (limited to 'sys/dev/usb/if_udav.c')
-rw-r--r--sys/dev/usb/if_udav.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c
index b620217507a..4ef3b5654c7 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.8 2004/12/30 07:43:09 dlg Exp $ */
+/* $OpenBSD: if_udav.c,v 1.9 2005/01/03 22:45:52 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 $ */
/*
@@ -1282,10 +1282,12 @@ udav_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = (cmd == SIOCADDMULTI) ?
ether_addmulti(ifr, &sc->sc_ac) :
ether_delmulti(ifr, &sc->sc_ac);
- if (error == ENETRESET)
- udav_init(ifp);
- udav_setmulti(sc);
- error = 0;
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ udav_setmulti(sc);
+ error = 0;
+ }
break;
default:
error = EINVAL;