diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-05-13 01:40:40 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-05-13 01:40:40 +0000 |
commit | b3322fa5678192b118237590187191aad4f7e4ee (patch) | |
tree | a161111bd9e5f5e8825d89eab31b03fe82ae23f1 /sys/dev/pci/if_em.c | |
parent | 7e5a9b60f2fba8de719d7f511bdd7dbc42deec00 (diff) |
Since Ethernet links can only be full duplex or half duplex the link
state reporting code in the MII layer / em(4) and vge(4) will never
fall back to the point of only reporting the link as being UP without
the duplex setting being reported, so simplify the code a bit here.
ok dlg@
Diffstat (limited to 'sys/dev/pci/if_em.c')
-rw-r--r-- | sys/dev/pci/if_em.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index 788f9072566..90a5d5f49c4 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.181 2008/04/09 12:50:11 dlg Exp $ */ +/* $OpenBSD: if_em.c,v 1.182 2008/05/13 01:40:39 brad Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include <dev/pci/if_em.h> @@ -1407,10 +1407,8 @@ em_update_link_status(struct em_softc *sc) ifp->if_baudrate = sc->link_speed * 1000000; if (sc->link_duplex == FULL_DUPLEX) ifp->if_link_state = LINK_STATE_FULL_DUPLEX; - else if (sc->link_duplex == HALF_DUPLEX) - ifp->if_link_state = LINK_STATE_HALF_DUPLEX; else - ifp->if_link_state = LINK_STATE_UP; + ifp->if_link_state = LINK_STATE_HALF_DUPLEX; if_link_state_change(ifp); } } else { |