From 7c83adc1a51b654245ba0fca53cad9e00af6e715 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Fri, 17 Feb 2006 04:01:06 +0000 Subject: 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. --- sys/dev/pci/if_em.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys') 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 @@ -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; -- cgit v1.2.3