summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_ipw.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2017-03-08 12:02:41 +0000
committermpi <mpi@openbsd.org>2017-03-08 12:02:41 +0000
commit47a8efaf356cbc414ae4bf15dd18c823d87baa62 (patch)
treefa9c2045e5b09b401006ba910847043faf0f7c59 /sys/dev/pci/if_ipw.c
parentEnable msk(4). (diff)
downloadwireguard-openbsd-47a8efaf356cbc414ae4bf15dd18c823d87baa62.tar.xz
wireguard-openbsd-47a8efaf356cbc414ae4bf15dd18c823d87baa62.zip
Do not clear IFF_UP, even in the error path, clearing IFF_RUNNING
is enough. This flag should only be set by the stack, drivers shouldn't mess with it. Discussed with dlg@ and mikeb@, ok mikeb@, stsp@
Diffstat (limited to 'sys/dev/pci/if_ipw.c')
-rw-r--r--sys/dev/pci/if_ipw.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c
index a75f4600219..2ff08aef73b 100644
--- a/sys/dev/pci/if_ipw.c
+++ b/sys/dev/pci/if_ipw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ipw.c,v 1.119 2017/01/22 10:17:38 dlg Exp $ */
+/* $OpenBSD: if_ipw.c,v 1.120 2017/03/08 12:02:41 mpi Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -809,7 +809,6 @@ ipw_newstate_intr(struct ipw_softc *sc, struct ipw_soft_buf *sbuf)
break;
case IPW_STATE_RADIO_DISABLED:
- ifp->if_flags &= ~IFF_UP;
ipw_stop(&ic->ic_if, 1);
break;
}
@@ -1047,7 +1046,6 @@ ipw_intr(void *arg)
if (r & (IPW_INTR_FATAL_ERROR | IPW_INTR_PARITY_ERROR)) {
printf("%s: fatal firmware error\n", sc->sc_dev.dv_xname);
- ifp->if_flags &= ~IFF_UP;
ipw_stop(ifp, 1);
return 1;
}
@@ -1336,7 +1334,6 @@ ipw_watchdog(struct ifnet *ifp)
if (sc->sc_tx_timer > 0) {
if (--sc->sc_tx_timer == 0) {
printf("%s: device timeout\n", sc->sc_dev.dv_xname);
- ifp->if_flags &= ~IFF_UP;
ipw_stop(ifp, 1);
ifp->if_oerrors++;
return;