diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-01-03 22:45:53 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-01-03 22:45:53 +0000 |
commit | 143225e444133568ff10359ad0edd0ce748e3c1f (patch) | |
tree | d98fb8b8a5057e74fb176aaa2aabbbc0111672c6 /sys/dev/usb/if_aue.c | |
parent | bb3ba0fb884a12df695a21f102313bd4f92b3efa (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_aue.c')
-rw-r--r-- | sys/dev/usb/if_aue.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 649cee98114..0bf62fa3875 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.37 2004/11/10 10:14:48 grange Exp $ */ +/* $OpenBSD: if_aue.c,v 1.38 2005/01/03 22:45:52 brad Exp $ */ /* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1621,18 +1621,14 @@ aue_ioctl(struct ifnet *ifp, u_long command, caddr_t data) case SIOCADDMULTI: case SIOCDELMULTI: error = (command == SIOCADDMULTI) ? -#if defined(__NetBSD__) - ether_addmulti(ifr, &sc->aue_ec) : - ether_delmulti(ifr, &sc->aue_ec); -#else ether_addmulti(ifr, &sc->arpcom) : ether_delmulti(ifr, &sc->arpcom); -#endif + if (error == ENETRESET) { - aue_init(sc); + if (ifp->if_flags & IFF_RUNNING) + aue_setmulti(sc); + error = 0; } - aue_setmulti(sc); - error = 0; break; case SIOCGIFMEDIA: case SIOCSIFMEDIA: |