Don't report current link status if interface is not UP.
If interface is not UP, the current link status wouldn't reflect the negotiated status.
This commit is contained in:
parent
871d21ce2d
commit
5f26dcd859
@ -2177,6 +2177,10 @@ vge_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
|
||||
mii = device_get_softc(sc->vge_miibus);
|
||||
|
||||
VGE_LOCK(sc);
|
||||
if ((ifp->if_flags & IFF_UP) == 0) {
|
||||
VGE_UNLOCK(sc);
|
||||
return;
|
||||
}
|
||||
mii_pollstat(mii);
|
||||
VGE_UNLOCK(sc);
|
||||
ifmr->ifm_active = mii->mii_media_active;
|
||||
|
Loading…
x
Reference in New Issue
Block a user