summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_ipw.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2014-12-19 15:19:47 +0000
committerkrw <krw@openbsd.org>2014-12-19 15:19:47 +0000
commit12679decf0b2d766becc536ca3bcd3ab473cef71 (patch)
treead7a9399f7181cec448bb81eca3d29cf3d257269 /sys/dev/pci/if_ipw.c
parentshuffle function declarations a bit; stylistic changes only. (diff)
downloadwireguard-openbsd-12679decf0b2d766becc536ca3bcd3ab473cef71.tar.xz
wireguard-openbsd-12679decf0b2d766becc536ca3bcd3ab473cef71.zip
Change scan and auth+assoc workq entries to taskq entries.
Identical diff originally and independently developed by blambert@.
Diffstat (limited to 'sys/dev/pci/if_ipw.c')
-rw-r--r--sys/dev/pci/if_ipw.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c
index 752829375b4..04b4b3ebe33 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.101 2014/07/22 13:12:11 mpi Exp $ */
+/* $OpenBSD: if_ipw.c,v 1.102 2014/12/19 15:19:47 krw Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -25,7 +25,7 @@
#include <sys/param.h>
#include <sys/sockio.h>
-#include <sys/workq.h>
+#include <sys/task.h>
#include <sys/mbuf.h>
#include <sys/kernel.h>
#include <sys/socket.h>
@@ -205,6 +205,9 @@ ipw_attach(struct device *parent, struct device *self, void *aux)
}
printf(": %s", intrstr);
+ task_set(&sc->sc_scantask, ipw_scan, sc, NULL);
+ task_set(&sc->sc_authandassoctask, ipw_auth_and_assoc, sc, NULL);
+
if (ipw_reset(sc) != 0) {
printf(": could not reset adapter\n");
return;
@@ -606,6 +609,9 @@ ipw_release(struct ipw_softc *sc)
bus_dmamap_destroy(sc->sc_dmat, sbuf->map);
}
}
+
+ task_del(systq, &sc->sc_scantask);
+ task_del(systq, &sc->sc_authandassoctask);
}
int
@@ -680,15 +686,11 @@ ipw_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
switch (nstate) {
case IEEE80211_S_SCAN:
- error = workq_add_task(NULL, 0, ipw_scan, sc, NULL);
- if (error != 0)
- return error;
+ task_add(systq, &sc->sc_scantask);
break;
case IEEE80211_S_AUTH:
- error = workq_add_task(NULL, 0, ipw_auth_and_assoc, sc, NULL);
- if (error != 0)
- return error;
+ task_add(systq, &sc->sc_authandassoctask);
break;
case IEEE80211_S_RUN: