Do not attempt to load 7265D iwm(4) firmware on all 7265 devices.
authorstsp <stsp@openbsd.org>
Tue, 20 Jul 2021 16:00:47 +0000 (16:00 +0000)
committerstsp <stsp@openbsd.org>
Tue, 20 Jul 2021 16:00:47 +0000 (16:00 +0000)
There are several variants of 7265 devices, all of which share a PCI ID.
7265D devices can be told apart by looking at the hardware revision number.
Non-D 7265 devices won't load 7265D firmware. Load the 7265-17 image instead.

Problem reported and fix tested on a non-D 7265 by Tilo Stritzky.
Tested on a 7265D by myself.

sys/dev/pci/if_iwm.c

index a3c97a3..00212d2 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_iwm.c,v 1.356 2021/07/20 14:44:37 stsp Exp $       */
+/*     $OpenBSD: if_iwm.c,v 1.357 2021/07/20 16:00:47 stsp Exp $       */
 
 /*
  * Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -11106,7 +11106,11 @@ iwm_attach(struct device *parent, struct device *self, void *aux)
                break;
        case PCI_PRODUCT_INTEL_WL_7265_1:
        case PCI_PRODUCT_INTEL_WL_7265_2:
-               sc->sc_fwname = "iwm-7265D-29";
+               if ((sc->sc_hw_rev & IWM_CSR_HW_REV_TYPE_MSK) ==
+                   IWM_CSR_HW_REV_TYPE_7265D)
+                       sc->sc_fwname = "iwm-7265D-29";
+               else
+                       sc->sc_fwname = "iwm-7265-17";
                sc->host_interrupt_operation_mode = 0;
                sc->sc_device_family = IWM_DEVICE_FAMILY_7000;
                sc->sc_fwdmasegsz = IWM_FWDMASEGSZ;