summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2010-07-19 21:41:54 +0000
committeryongari <yongari@FreeBSD.org>2010-07-19 21:41:54 +0000
commite0c0ca83134dab5fa637e707a46195a16f964d43 (patch)
tree5283733bc838d8b3e98cd1b44be1db538d4753d0
parent18aed410d7a454b9083404c6c8604bcebc98fdeb (diff)
downloadFreeBSD-src-e0c0ca83134dab5fa637e707a46195a16f964d43.zip
FreeBSD-src-e0c0ca83134dab5fa637e707a46195a16f964d43.tar.gz
Do not report current link state if interface is not UP.
Reviewed by: davidch
-rw-r--r--sys/dev/bce/if_bce.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index a881c9e..c3477f8 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -5855,6 +5855,10 @@ bce_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
BCE_LOCK(sc);
+ if ((ifp->if_flags & IFF_UP) == 0) {
+ BCE_UNLOCK(sc);
+ return;
+ }
mii = device_get_softc(sc->bce_miibus);
mii_pollstat(mii);
OpenPOWER on IntegriCloud