diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-12-15 21:47:28 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2006-12-15 21:47:28 +0000 |
commit | 5ef1b5e9ff6a1e234c458f79be776e8614ca9214 (patch) | |
tree | a4c655458d500871ba8709e1ac257db1bb66119e | |
parent | 75f735fa2ea4911149de695ae0a34bf02c583cd5 (diff) |
use mii_media_active instead of mii_media_status to get the full
duplex state. this will actually enable duplex reporting for drivers
using the mii layer.
figured out by Moritz Grimm with sk(4)
-rw-r--r-- | sys/dev/mii/mii_physubr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/mii/mii_physubr.c b/sys/dev/mii/mii_physubr.c index b243abb64af..1ef0455bc73 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.28 2006/11/28 19:21:15 reyk Exp $ */ +/* $OpenBSD: mii_physubr.c,v 1.29 2006/12/15 21:47:27 reyk Exp $ */ /* $NetBSD: mii_physubr.c,v 1.20 2001/04/13 23:30:09 thorpej Exp $ */ /*- @@ -351,9 +351,9 @@ mii_phy_statusmsg(struct mii_softc *sc) if (mii->mii_media_status & IFM_AVALID) { if (mii->mii_media_status & IFM_ACTIVE) { - if (mii->mii_media_status & IFM_FDX) + if (mii->mii_media_active & IFM_FDX) link_state = LINK_STATE_FULL_DUPLEX; - else if (mii->mii_media_status & IFM_HDX) + else if (mii->mii_media_active & IFM_HDX) link_state = LINK_STATE_HALF_DUPLEX; else link_state = LINK_STATE_UP; |