Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 2009 07:50:14 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r192737 - head/sys/dev/msk
Message-ID:  <200905250750.n4P7oEYb015361@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Mon May 25 07:50:14 2009
New Revision: 192737
URL: http://svn.freebsd.org/changeset/base/192737

Log:
  If interface is not UP, don't return media status.

Modified:
  head/sys/dev/msk/if_msk.c

Modified: head/sys/dev/msk/if_msk.c
==============================================================================
--- head/sys/dev/msk/if_msk.c	Mon May 25 07:48:00 2009	(r192736)
+++ head/sys/dev/msk/if_msk.c	Mon May 25 07:50:14 2009	(r192737)
@@ -904,6 +904,10 @@ msk_mediastatus(struct ifnet *ifp, struc
 
 	sc_if = ifp->if_softc;
 	MSK_IF_LOCK(sc_if);
+	if ((ifp->if_flags & IFF_UP) == 0) {
+		MSK_IF_UNLOCK(sc_if);
+		return;
+	}
 	mii = device_get_softc(sc_if->msk_miibus);
 
 	mii_pollstat(mii);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905250750.n4P7oEYb015361>