summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2005-04-02 01:25:48 +0000
committerbrad <brad@openbsd.org>2005-04-02 01:25:48 +0000
commit4d5bd2c0f3bf9364082f510ddc7a92c639533d4a (patch)
tree3cd96a3c2ebedd795dc8a8c06ece4a4c7b11277a
parentmixer can endup mapped w/ a different tag and so give it one of its own; from 71@becile.com pr4162 (diff)
downloadwireguard-openbsd-4d5bd2c0f3bf9364082f510ddc7a92c639533d4a.tar.xz
wireguard-openbsd-4d5bd2c0f3bf9364082f510ddc7a92c639533d4a.zip
make use of if_link_state_change().
From FreeBSD ok pvalchev@
-rw-r--r--sys/dev/pci/if_vge.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c
index a82f03030ea..b6de8d70534 100644
--- a/sys/dev/pci/if_vge.c
+++ b/sys/dev/pci/if_vge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vge.c,v 1.7 2005/03/15 17:06:10 pvalchev Exp $ */
+/* $OpenBSD: if_vge.c,v 1.8 2005/04/02 01:25:48 brad Exp $ */
/* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */
/*
* Copyright (c) 2004
@@ -1230,10 +1230,14 @@ vge_tick(void *xsc)
if (sc->vge_link) {
if (!(mii->mii_media_status & IFM_ACTIVE))
sc->vge_link = 0;
+ ifp->if_link_state = LINK_STATE_UP;
+ if_link_state_change(ifp);
} else {
if (mii->mii_media_status & IFM_ACTIVE &&
IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
sc->vge_link = 1;
+ ifp->if_link_state = LINK_STATE_DOWN;
+ if_link_state_change(ifp);
if (!IFQ_IS_EMPTY(&ifp->if_snd))
vge_start(ifp);
}