summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2017-06-16 08:45:34 +0000
committerstsp <stsp@openbsd.org>2017-06-16 08:45:34 +0000
commit5ae9823c62a94d858cce9b175d4e1c505f7a9164 (patch)
treecd9bc17dd35b7cbcfd1eeba6ed6bac8345645ac6
parents/CPU_LIDSUSPEND/CPU_LIDACTION/ (diff)
downloadwireguard-openbsd-5ae9823c62a94d858cce9b175d4e1c505f7a9164.tar.xz
wireguard-openbsd-5ae9823c62a94d858cce9b175d4e1c505f7a9164.zip
In iwm_init() save the generation counter once before looping over
tsleep(9), instead of saving it during every iteration.
-rw-r--r--sys/dev/pci/if_iwm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index cc4fcf44980..d25dbc9695b 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.196 2017/06/14 16:58:28 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.197 2017/06/16 08:45:34 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -6126,8 +6126,8 @@ iwm_init(struct ifnet *ifp)
* ieee80211_begin_scan() ends up scheduling iwm_newstate_task().
* Wait until the transition to SCAN state has completed.
*/
+ generation = sc->sc_generation;
do {
- generation = sc->sc_generation;
err = tsleep(&ic->ic_state, PCATCH, "iwminit", hz);
if (generation != sc->sc_generation)
return ENXIO;