From d90ceb78c33297fe73d645d2035aeda78b18078b Mon Sep 17 00:00:00 2001 From: kettenis Date: Thu, 22 Jul 2010 10:19:37 +0000 Subject: [PATCH] When suspending, only call athn_stop() when IFF_RUNNING is set. ok damien@ --- sys/dev/ic/athn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.20.1