diff options
author | 2006-02-17 04:01:05 +0000 | |
---|---|---|
committer | 2006-02-17 04:01:05 +0000 | |
commit | b608ce5073e3a73fc4ef35b5bbb6345f77a82c34 (patch) | |
tree | f3448f296ea6c555e37394dc191de8445bfd338d /sys/dev/pci/if_em.c | |
parent | - simplify link state handling code. (diff) | |
download | wireguard-openbsd-b608ce5073e3a73fc4ef35b5bbb6345f77a82c34.tar.xz wireguard-openbsd-b608ce5073e3a73fc4ef35b5bbb6345f77a82c34.zip |
If there is no link then set IFM_NONE so ifconfig will show a media
status of (none) whether in auto or forced speed/duplex mode.
Diffstat (limited to 'sys/dev/pci/if_em.c')
-rw-r--r-- | sys/dev/pci/if_em.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index 8aae8bf0c80..a109dcffc58 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.106 2006/02/17 03:57:29 brad Exp $ */ +/* $OpenBSD: if_em.c,v 1.107 2006/02/17 04:01:05 brad Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include <dev/pci/if_em.h> @@ -747,8 +747,10 @@ em_media_status(struct ifnet *ifp, struct ifmediareq *ifmr) ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; - if (!sc->link_active) + if (!sc->link_active) { + ifmr->ifm_active |= IFM_NONE; return; + } ifmr->ifm_status |= IFM_ACTIVE; |