Index: if_vtnet.c =================================================================== --- if_vtnet.c (revision 299234) +++ if_vtnet.c (working copy) @@ -2800,7 +2802,7 @@ VTNET_CORE_LOCK_ASSERT(sc); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - sc->vtnet_link_active = 0; + vtnet_update_link_status(sc); callout_stop(&sc->vtnet_tick_ch); /* Only advisory. */ @@ -3494,20 +3496,11 @@ static int vtnet_is_link_up(struct vtnet_softc *sc) { - device_t dev; struct ifnet *ifp; - uint16_t status; - dev = sc->vtnet_dev; ifp = sc->vtnet_ifp; - if ((ifp->if_capabilities & IFCAP_LINKSTATE) == 0) - status = VIRTIO_NET_S_LINK_UP; - else - status = virtio_read_dev_config_2(dev, - offsetof(struct virtio_net_config, status)); - - return ((status & VIRTIO_NET_S_LINK_UP) != 0); + return ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0); } static void