summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2019-10-28 17:22:11 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2019-10-28 17:22:11 +0000
commitc716625d335eb5c0b54a433f6181d394f51ccca6 (patch)
treeb5f4aedf308cd94d9f3d435c197d22d67734bd52 /sys
parentd01768eaf92406bda56aae46ea33f24783e9feb0 (diff)
The iwm_prepare_card_hw() call in iwm_attach() is only needed on 8k devices.
Patch by Imre Vadasz. ok patrick@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_iwm.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index 490ed0fd8ed..0dd894ef182 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.256 2019/10/28 17:19:22 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.257 2019/10/28 17:22:10 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -7740,17 +7740,17 @@ iwm_attach(struct device *parent, struct device *self, void *aux)
* "dash" value). To keep hw_rev backwards compatible - we'll store it
* in the old format.
*/
- if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000)
+ if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) {
+ uint32_t hw_step;
+
sc->sc_hw_rev = (sc->sc_hw_rev & 0xfff0) |
(IWM_CSR_HW_REV_STEP(sc->sc_hw_rev << 2) << 2);
- if (iwm_prepare_card_hw(sc) != 0) {
- printf("%s: could not initialize hardware\n", DEVNAME(sc));
- return;
- }
-
- if (sc->sc_device_family == IWM_DEVICE_FAMILY_8000) {
- uint32_t hw_step;
+ if (iwm_prepare_card_hw(sc) != 0) {
+ printf("%s: could not initialize hardware\n",
+ DEVNAME(sc));
+ return;
+ }
/*
* In order to recognize C step the driver should read the