-/* $OpenBSD: if_iwm.c,v 1.54 2015/10/10 19:04:57 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.55 2015/10/11 10:22:28 stsp Exp $ */
/*
* Copyright (c) 2014 genua mbh <info@genua.de>
/* if the command wants an answer, busy sc_cmd_resp */
if (wantresp) {
KASSERT(!async);
- while (sc->sc_wantresp != -1)
+ while (sc->sc_wantresp != IWM_CMD_RESP_IDLE)
tsleep(&sc->sc_wantresp, 0, "iwmcmdsl", 0);
sc->sc_wantresp = ring->qid << 16 | ring->cur;
DPRINTFN(12, ("wantresp is %x\n", sc->sc_wantresp));
void
iwm_free_resp(struct iwm_softc *sc, struct iwm_host_cmd *hcmd)
{
- KASSERT(sc->sc_wantresp != -1);
+ KASSERT(sc->sc_wantresp != IWM_CMD_RESP_IDLE);
KASSERT((hcmd->flags & (IWM_CMD_WANT_SKB|IWM_CMD_SYNC))
== (IWM_CMD_WANT_SKB|IWM_CMD_SYNC));
- sc->sc_wantresp = -1;
+ sc->sc_wantresp = IWM_CMD_RESP_IDLE;
wakeup(&sc->sc_wantresp);
}
}
printf(", %s\n", intrstr);
- sc->sc_wantresp = -1;
+ sc->sc_wantresp = IWM_CMD_RESP_IDLE;
switch (PCI_PRODUCT(pa->pa_id)) {
case PCI_PRODUCT_INTEL_WL_3160_1:
-/* $OpenBSD: if_iwmvar.h,v 1.10 2015/10/05 13:05:08 stsp Exp $ */
+/* $OpenBSD: if_iwmvar.h,v 1.11 2015/10/11 10:22:28 stsp Exp $ */
/*
* Copyright (c) 2014 genua mbh <info@genua.de>
int uc_intr;
};
+/* sc_wantresp */
+#define IWM_CMD_RESP_IDLE -1
+
#define IWM_CMD_RESP_MAX PAGE_SIZE
#define IWM_OTP_LOW_IMAGE_SIZE 2048