From: kettenis Date: Thu, 22 Jul 2010 10:19:37 +0000 (+0000) Subject: When suspending, only call athn_stop() when IFF_RUNNING is set. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d90ceb78c33297fe73d645d2035aeda78b18078b;p=openbsd When suspending, only call athn_stop() when IFF_RUNNING is set. ok damien@ --- diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c index 37408408522..003801629b6 100644 --- a/sys/dev/ic/athn.c +++ b/sys/dev/ic/athn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: athn.c,v 1.56 2010/07/21 14:01:58 kettenis Exp $ */ +/* $OpenBSD: athn.c,v 1.57 2010/07/22 10:19:37 kettenis Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini @@ -2707,7 +2707,8 @@ athn_suspend(struct athn_softc *sc) { struct ifnet *ifp = &sc->sc_ic.ic_if; - athn_stop(ifp, 1); + if (ifp->if_flags & IFF_RUNNING) + athn_stop(ifp, 1); } void