Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Do not re-enable after resume if interface is mar...



details:   https://anonhg.NetBSD.org/src/rev/2b0828e71e68
branches:  trunk
changeset: 511859:2b0828e71e68
user:      onoe <onoe%NetBSD.org@localhost>
date:      Thu Jun 28 10:34:17 2001 +0000

description:
Do not re-enable after resume if interface is marked down.

diffstat:

 sys/dev/ic/an.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r a2e16f71321d -r 2b0828e71e68 sys/dev/ic/an.c
--- a/sys/dev/ic/an.c   Thu Jun 28 08:15:44 2001 +0000
+++ b/sys/dev/ic/an.c   Thu Jun 28 10:34:17 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: an.c,v 1.15 2001/06/21 12:49:06 onoe Exp $     */
+/*     $NetBSD: an.c,v 1.16 2001/06/28 10:34:17 onoe Exp $     */
 /*
  * Copyright (c) 1997, 1998, 1999
  *     Bill Paul <wpaul%ctr.columbia.edu@localhost>.  All rights reserved.
@@ -384,7 +384,8 @@
                an_stop(ifp, 1);
                break;
        case PWR_RESUME:
-               an_init(ifp);
+               if (ifp->if_flags & IFF_UP)
+                       an_init(ifp);
                break;
        case PWR_SOFTSUSPEND:
        case PWR_SOFTSTANDBY:
@@ -485,7 +486,7 @@
                            (ifp->if_flags & IFF_PROMISC) ? 0xffff : 0);
                else if (ifp->if_flags & IFF_UP)
                        error = an_init(ifp);
-               else if (sc->sc_enabled && !(ifp->if_flags & IFF_UP))
+               else if (sc->sc_enabled)
                        an_stop(ifp, 1);
                sc->an_if_flags = ifp->if_flags;
                break;



Home | Main Index | Thread Index | Old Index