diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-02-17 04:01:06 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-02-17 04:01:06 +0000 |
commit | 7c83adc1a51b654245ba0fca53cad9e00af6e715 (patch) | |
tree | c1ecc5559d2ac3b174435ced943e24e0ed96641b | |
parent | b3e38b72cdf98319a5ac5fcd816d60f559e85e2b (diff) |
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.
-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; |