summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2008-07-11 15:00:17 +0000
committerbrad <brad@openbsd.org>2008-07-11 15:00:17 +0000
commit3a32f1fa18184c14a4ca616459da8096b63efeb3 (patch)
tree62b57ac6f0313f2bdf1ce48f41f44a6cf78241cd
parentwrite a syslog debug message when a new GREY or TRAPPED entry is added (diff)
downloadwireguard-openbsd-3a32f1fa18184c14a4ca616459da8096b63efeb3.tar.xz
wireguard-openbsd-3a32f1fa18184c14a4ca616459da8096b63efeb3.zip
Check the correct BMSR bit in the capabilities field when checking
for 100baseT4. The dcphy(4) driver could inadvertently display 100baseT4 for the media type for PHY not actually capable of 100baseT4. From FreeBSD ok dlg@
-rw-r--r--sys/dev/mii/dcphy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/mii/dcphy.c b/sys/dev/mii/dcphy.c
index a6b5e638fd7..0cf7e3be0b7 100644
--- a/sys/dev/mii/dcphy.c
+++ b/sys/dev/mii/dcphy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dcphy.c,v 1.19 2008/06/10 21:15:14 brad Exp $ */
+/* $OpenBSD: dcphy.c,v 1.20 2008/07/11 15:00:17 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -333,7 +333,7 @@ dcphy_status(struct mii_softc *sc)
if (tstat & DC_TSTAT_LP_CAN_NWAY) {
anlpar = tstat >> 16;
if (anlpar & ANLPAR_T4 &&
- sc->mii_capabilities & BMSR_100TXHDX)
+ sc->mii_capabilities & BMSR_100T4)
mii->mii_media_active |= IFM_100_T4|IFM_HDX;
else if (anlpar & ANLPAR_TX_FD &&
sc->mii_capabilities & BMSR_100TXFDX)