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/mii | |
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/mii')
-rw-r--r-- | sys/dev/mii/mii_physubr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c index 8caebf80e1c..dc2fce81681 100644 --- a/sys/dev/mii/mii_physubr.c +++ b/sys/dev/mii/mii_physubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mii_physubr.c,v 1.33 2007/09/17 17:34:22 brad Exp $ */ +/* $OpenBSD: mii_physubr.c,v 1.34 2008/05/13 01:40:39 brad Exp $ */ /* $NetBSD: mii_physubr.c,v 1.20 2001/04/13 23:30:09 thorpej Exp $ */ /*- @@ -369,10 +369,8 @@ mii_phy_statusmsg(struct mii_softc *sc) if (mii->mii_media_status & IFM_ACTIVE) { if (mii->mii_media_active & IFM_FDX) link_state = LINK_STATE_FULL_DUPLEX; - else if (mii->mii_media_active & IFM_HDX) - link_state = LINK_STATE_HALF_DUPLEX; else - link_state = LINK_STATE_UP; + link_state = LINK_STATE_HALF_DUPLEX; } else link_state = LINK_STATE_DOWN; } else |