Correctly report the vmxnet3 link down media status

Reported by:	lew@perftech.com
MFC after:	1 week
This commit is contained in:
bryanv 2017-11-28 06:21:37 +00:00
parent 9e2f8a9afd
commit dd1aa0e47b

View File

@ -3485,14 +3485,15 @@ vmxnet3_media_status(struct ifnet *ifp, struct ifmediareq *ifmr)
sc = ifp->if_softc;
ifmr->ifm_active = IFM_ETHER | IFM_AUTO;
ifmr->ifm_status = IFM_AVALID;
ifmr->ifm_active = IFM_ETHER;
VMXNET3_CORE_LOCK(sc);
if (vmxnet3_link_is_up(sc) != 0)
if (vmxnet3_link_is_up(sc) != 0) {
ifmr->ifm_status |= IFM_ACTIVE;
else
ifmr->ifm_status |= IFM_NONE;
ifmr->ifm_active |= IFM_AUTO;
} else
ifmr->ifm_active |= IFM_NONE;
VMXNET3_CORE_UNLOCK(sc);
}