summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2015-01-20 04:23:33 +0000
committerbrad <brad@openbsd.org>2015-01-20 04:23:33 +0000
commitbdc1bd242ecca120208b2b79c5177e783e1bfc35 (patch)
tree4ae929950295563b98af9da2526abaac1424d183
parentAnd the variable too. (diff)
downloadwireguard-openbsd-bdc1bd242ecca120208b2b79c5177e783e1bfc35.tar.xz
wireguard-openbsd-bdc1bd242ecca120208b2b79c5177e783e1bfc35.zip
Some fixes for handling link state changes.
-rw-r--r--sys/dev/ic/re.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index a901fdb3e9d..f7adfa4c54c 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.168 2015/01/15 23:06:08 brad Exp $ */
+/* $OpenBSD: re.c,v 1.169 2015/01/20 04:23:33 brad Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -1598,8 +1598,7 @@ re_intr(void *arg)
}
}
- if (tx)
- re_start(ifp);
+ re_start(ifp);
CSR_WRITE_2(sc, RL_IMR, sc->rl_intrs);
@@ -1980,8 +1979,6 @@ re_init(struct ifnet *ifp)
CSR_WRITE_2(sc, RL_MAXRXPKTLEN, 16383);
}
- mii_mediachg(&sc->sc_mii);
-
CSR_WRITE_1(sc, sc->rl_cfg1, CSR_READ_1(sc, sc->rl_cfg1) |
RL_CFG1_DRVLOAD);
@@ -1991,6 +1988,7 @@ re_init(struct ifnet *ifp)
splx(s);
sc->rl_flags &= ~RL_FLAG_LINK;
+ mii_mediachg(&sc->sc_mii);
timeout_add_sec(&sc->timer_handle, 1);