-/* $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
#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>
}
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;
bus_dmamap_destroy(sc->sc_dmat, sbuf->map);
}
}
+
+ task_del(systq, &sc->sc_scantask);
+ task_del(systq, &sc->sc_authandassoctask);
}
int
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:
-/* $OpenBSD: if_ipwvar.h,v 1.23 2013/12/06 21:03:04 deraadt Exp $ */
+/* $OpenBSD: if_ipwvar.h,v 1.24 2014/12/19 15:19:47 krw Exp $ */
/*-
* Copyright (c) 2004-2006
struct ipw_soft_bd srbd_list[IPW_NRBD];
struct ipw_soft_buf rx_sbuf_list[IPW_NRBD];
+ struct task sc_scantask;
+ struct task sc_authandassoctask;
+
SLIST_HEAD(, ipw_soft_hdr) free_shdr;
SLIST_HEAD(, ipw_soft_buf) free_sbuf;