Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Mar 2010 22:12:12 +0000 (UTC)
From:      Qing Li <qingli@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r205268 - head/sys/dev/mii
Message-ID:  <201003172212.o2HMCCB1032076@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: qingli
Date: Wed Mar 17 22:12:12 2010
New Revision: 205268
URL: http://svn.freebsd.org/changeset/base/205268

Log:
  Set the device capabilities to include dynamic link-state for
  those modern drivers.
  
  Reviewed by:	imp (and suggested by imp)
  MFC after:	3 days

Modified:
  head/sys/dev/mii/mii.c

Modified: head/sys/dev/mii/mii.c
==============================================================================
--- head/sys/dev/mii/mii.c	Wed Mar 17 21:19:30 2010	(r205267)
+++ head/sys/dev/mii/mii.c	Wed Mar 17 22:12:12 2010	(r205268)
@@ -173,6 +173,8 @@ miibus_attach(device_t dev)
 	 * XXX: EVIL HACK!
 	 */
 	mii->mii_ifp = *(struct ifnet**)device_get_softc(device_get_parent(dev));
+	mii->mii_ifp->if_capabilities |= IFCAP_LINKSTATE;
+	mii->mii_ifp->if_capenable |= IFCAP_LINKSTATE;
 	ivars = device_get_ivars(dev);
 	ifmedia_init(&mii->mii_media, IFM_IMASK, ivars->ifmedia_upd,
 	    ivars->ifmedia_sts);



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