diff options
author | 2005-07-02 00:55:09 +0000 | |
---|---|---|
committer | 2005-07-02 00:55:09 +0000 | |
commit | 33216b9e841baf665d0456c4f021ff5f3a45c424 (patch) | |
tree | 96081e84fc37ad863b634f3a7e4469738c0fbf65 | |
parent | add support for PCI-E 5752 core and recognize a few additional (diff) | |
download | wireguard-openbsd-33216b9e841baf665d0456c4f021ff5f3a45c424.tar.xz wireguard-openbsd-33216b9e841baf665d0456c4f021ff5f3a45c424.zip |
clear IFF_RUNNING & IFF_OACTIVE in stge_stop() before de-allocating resources
-rw-r--r-- | sys/dev/pci/if_stge.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/pci/if_stge.c b/sys/dev/pci/if_stge.c index d543ae1e766..03f83e0c8e0 100644 --- a/sys/dev/pci/if_stge.c +++ b/sys/dev/pci/if_stge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_stge.c,v 1.16 2005/07/01 01:13:45 brad Exp $ */ +/* $OpenBSD: if_stge.c,v 1.17 2005/07/02 00:55:09 brad Exp $ */ /* $NetBSD: if_stge.c,v 1.27 2005/05/16 21:35:32 bouyer Exp $ */ /*- @@ -1562,6 +1562,12 @@ stge_stop(struct ifnet *ifp, int disable) */ timeout_del(&sc->sc_timeout); + /* + * Mark the interface down and cancel the watchdog timer. + */ + ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + ifp->if_timer = 0; + /* Down the MII. */ mii_down(&sc->sc_mii); @@ -1599,12 +1605,6 @@ stge_stop(struct ifnet *ifp, int disable) if (disable) stge_rxdrain(sc); - - /* - * Mark the interface down and cancel the watchdog timer. - */ - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); - ifp->if_timer = 0; } #if 0 |