Set the device capabilities to include dynamic link-state for

those modern drivers.

Reviewed by:	imp (and suggested by imp)
MFC after:	3 days
This commit is contained in:
Qing Li 2010-03-17 22:12:12 +00:00
parent 5e4bb93cca
commit 86b330a5f4

View File

@ -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);