diff options
author | 2006-03-16 02:32:37 +0000 | |
---|---|---|
committer | 2006-03-16 02:32:37 +0000 | |
commit | 0239910876f4e2aa2f4ee0c24fabd1cf37a0efef (patch) | |
tree | edccbed29b66a7d56d07b79e6ee34fa59eeec126 | |
parent | tidy up a bit. (diff) | |
download | wireguard-openbsd-0239910876f4e2aa2f4ee0c24fabd1cf37a0efef.tar.xz wireguard-openbsd-0239910876f4e2aa2f4ee0c24fabd1cf37a0efef.zip |
if the link is down then show a media status of none.
-rw-r--r-- | sys/dev/pci/if_ti.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c index 40c23386a14..3150672c1d7 100644 --- a/sys/dev/pci/if_ti.c +++ b/sys/dev/pci/if_ti.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ti.c,v 1.77 2006/03/16 02:23:53 brad Exp $ */ +/* $OpenBSD: if_ti.c,v 1.78 2006/03/16 02:32:37 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -2402,8 +2402,10 @@ ti_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; - if (sc->ti_linkstat == TI_EV_CODE_LINK_DOWN) + if (sc->ti_linkstat == TI_EV_CODE_LINK_DOWN) { + ifmr->ifm_active |= IFM_NONE; return; + } ifmr->ifm_status |= IFM_ACTIVE; |