Correctly report the vmxnet3 link down media status
Reported by: lew@perftech.com MFC after: 1 week
This commit is contained in:
parent
9e2f8a9afd
commit
dd1aa0e47b
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user