diff options
author | 2002-06-09 02:52:44 +0000 | |
---|---|---|
committer | 2002-06-09 02:52:44 +0000 | |
commit | 773e9bbe6a9917e5bd2bd3b8890716ebd3d086f7 (patch) | |
tree | 0e89d64ea6a1ac83f64b4b31c175322de3e77b29 | |
parent | Add regression tests for rdr list processing (diff) | |
download | wireguard-openbsd-773e9bbe6a9917e5bd2bd3b8890716ebd3d086f7.tar.xz wireguard-openbsd-773e9bbe6a9917e5bd2bd3b8890716ebd3d086f7.zip |
replace epsetfilter() / epsetmedia() with epinit() and only if the
interface is up. same behavior, plus will reload the mac address.
tested by aaron@ and henning@
-rw-r--r-- | sys/dev/ic/elink3.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c index e58a82abdf7..a9c1e6d598a 100644 --- a/sys/dev/ic/elink3.c +++ b/sys/dev/ic/elink3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: elink3.c,v 1.58 2002/04/30 22:08:43 mickey Exp $ */ +/* $OpenBSD: elink3.c,v 1.59 2002/06/09 02:52:44 fgsch Exp $ */ /* $NetBSD: elink3.c,v 1.32 1997/05/14 00:22:00 thorpej Exp $ */ /* @@ -1520,7 +1520,6 @@ epioctl(ifp, cmd, data) ifp->if_mtu = ifr->ifr_mtu; } break; - case SIOCSIFFLAGS: if ((ifp->if_flags & IFF_UP) == 0 && @@ -1538,14 +1537,12 @@ epioctl(ifp, cmd, data) * start it. */ epinit(sc); - } else { + } else if ((ifp->if_flags & IFF_UP) != 0) { /* - * deal with flags changes: - * IFF_MULTICAST, IFF_PROMISC, - * IFF_LINK0, IFF_LINK1. + * Reset the interface to pick up changes in any other + * flags that affect hardware registers. */ - epsetfilter(sc); - epsetmedia(sc, sc->sc_mii.mii_media.ifm_cur->ifm_data); + epinit(sc); } break; |