summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev/hme.c
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-11-09 22:22:36 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2002-11-09 22:22:36 +0000
commitbf64f129433f2025fe2ca3a96cc71b3b4b86ce12 (patch)
tree728a9d09d6e05d8957d0ff190ae5032bc344df2b /sys/arch/sparc/dev/hme.c
parent3029c10898f9ff74562a0d6d73d088aac1bd074b (diff)
- make IFF_SIMPLEX only set if the media is IFM_FDX (prevents ip6 from
seeing it's packets and thinking another machine with the same mac is on the wire when running half-duplex); from NetBSD. tested by matthieu, jason and him ok.
Diffstat (limited to 'sys/arch/sparc/dev/hme.c')
-rw-r--r--sys/arch/sparc/dev/hme.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/sparc/dev/hme.c b/sys/arch/sparc/dev/hme.c
index f01d1b044a1..dc29e999ffc 100644
--- a/sys/arch/sparc/dev/hme.c
+++ b/sys/arch/sparc/dev/hme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hme.c,v 1.39 2002/10/05 21:19:35 fgsch Exp $ */
+/* $OpenBSD: hme.c,v 1.40 2002/11/09 22:22:35 fgsch Exp $ */
/*
* Copyright (c) 1998 Jason L. Wright (jason@thought.net)
@@ -1127,8 +1127,11 @@ hme_mii_statchg(self)
struct hme_softc *sc = (struct hme_softc *)self;
struct hme_cr *cr = sc->sc_cr;
- if (sc->sc_mii.mii_media_active & IFM_FDX)
+ if ((IFM_OPTIONS(sc->sc_mii.mii_media_active) & IFM_FDX) != 0) {
cr->tx_cfg |= CR_TXCFG_FULLDPLX;
- else
+ sc->sc_arpcom.ac_if.if_flags |= IFF_SIMPLEX;
+ } else {
cr->tx_cfg &= ~CR_TXCFG_FULLDPLX;
+ sc->sc_arpcom.ac_if.if_flags &= ~IFF_SIMPLEX;
+ }
}