Correctly report the vmxnet3 link down media status

Reported by:	lew@perftech.com
MFC after:	1 week
This commit is contained in:
Bryan Venteicher 2017-11-28 06:21:37 +00:00
parent 51de47e3f8
commit 1b108b19ed
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326309

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