summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2006-02-05 23:32:06 +0000
committerbrad <brad@openbsd.org>2006-02-05 23:32:06 +0000
commitf16947418747b8f8ca39050216f457554b5afd8f (patch)
tree79fb3d5f3230ebc4ca417e319b310a1eb4825e44
parentmake sure to set or clear the RX mode promiscuous bit. (diff)
downloadwireguard-openbsd-f16947418747b8f8ca39050216f457554b5afd8f.tar.xz
wireguard-openbsd-f16947418747b8f8ca39050216f457554b5afd8f.zip
Eliminate a reset when configuring the IP address.
ok jsg@
-rw-r--r--sys/dev/pci/if_nfe.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index f541cd58390..dca1ca3b446 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.17 2006/02/05 10:09:39 jsg Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.18 2006/02/05 23:32:06 brad Exp $ */
/*-
* Copyright (c) 2006 Damien Bergamini <damien.bergamini@free.fr>
@@ -269,6 +269,7 @@ nfe_power(int why, void *arg)
if (why == PWR_RESUME) {
ifp = &sc->sc_arpcom.ac_if;
if (ifp->if_flags & IFF_UP) {
+ ifp->if_flags &= ~IFF_RUNNING;
nfe_init(ifp);
if (ifp->if_flags & IFF_RUNNING)
nfe_start(ifp);
@@ -939,6 +940,9 @@ nfe_init(struct ifnet *ifp)
struct nfe_softc *sc = ifp->if_softc;
uint32_t rxtxctl;
+ if (ifp->if_flags & IFF_RUNNING)
+ return 0;
+
nfe_stop(ifp, 0);
NFE_WRITE(sc, NFE_TX_UNK, 0);