summaryrefslogtreecommitdiff
path: root/sys/dev/iwm
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2019-11-07 23:29:43 +0000
committerMark Johnston <markj@FreeBSD.org>2019-11-07 23:29:43 +0000
commit3cc50d22fd8b51d696f24e5aefdf2ee44a69a62e (patch)
tree377b992161845fb02b868583d60faa0039a16ba1 /sys/dev/iwm
parenteff8a9793e8f38c5c821da68fdd555e5b6b764cd (diff)
Notes
Diffstat (limited to 'sys/dev/iwm')
-rw-r--r--sys/dev/iwm/if_iwm.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
index 4c64bd916fe2..99f0d578afcf 100644
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -5743,8 +5743,6 @@ iwm_pci_detach(device_t dev)
rman_get_rid(sc->sc_mem), sc->sc_mem);
}
-
-
static int
iwm_attach(device_t dev)
{
@@ -5761,6 +5759,10 @@ iwm_attach(device_t dev)
callout_init_mtx(&sc->sc_led_blink_to, &sc->sc_mtx, 0);
TASK_INIT(&sc->sc_es_task, 0, iwm_endscan_cb, sc);
+ error = iwm_dev_check(dev);
+ if (error != 0)
+ goto fail;
+
sc->sc_notif_wait = iwm_notification_wait_init(sc);
if (sc->sc_notif_wait == NULL) {
device_printf(dev, "failed to init notification wait struct\n");
@@ -5786,11 +5788,6 @@ iwm_attach(device_t dev)
sc->sc_wantresp = -1;
- /* Match device id */
- error = iwm_dev_check(dev);
- if (error != 0)
- goto fail;
-
sc->sc_hw_rev = IWM_READ(sc, IWM_CSR_HW_REV);
/*
* In the 8000 HW family the format of the 4 bytes of CSR_HW_REV have