diff options
| author | Tom Jones <thj@FreeBSD.org> | 2025-04-14 08:10:48 +0000 |
|---|---|---|
| committer | Tom Jones <thj@FreeBSD.org> | 2025-04-14 08:16:40 +0000 |
| commit | 1110ed3b46ea2765fd45ebfb4e0f0fd997ecb92e (patch) | |
| tree | c9d588e4f5ede81ab19dad49ef3b8cebc9ed407a | |
| parent | 9cc73397534ee5373593f5946abe0b00c1d2b657 (diff) | |
iwx: Use subdevice for comparison
iwx goes through a couple of steps to match devices to firmware. There
is a default match of pcie device and subdevices and then a secondary
pass to find a template configuration struct.
Previously we were looking up the device not the subdevice and that
led to ax210 cards in some devices (Framework 13) from being matched to
the correct firmware.
PR: 285905
Reviewed by: bz, adrian
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49759
| -rw-r--r-- | sys/dev/iwx/if_iwx.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index 9e5d5a9569d5..6d3aa1b49c15 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -10022,12 +10022,11 @@ out: const struct iwx_device_cfg * iwx_find_device_cfg(struct iwx_softc *sc) { - uint16_t mac_type, rf_type; + uint16_t sdev_id, mac_type, rf_type; uint8_t mac_step, cdb, jacket, rf_id, no_160, cores; int i; - uint16_t sdev_id; - sdev_id = pci_get_device(sc->sc_dev); + sdev_id = pci_get_subdevice(sc->sc_dev); mac_type = IWX_CSR_HW_REV_TYPE(sc->sc_hw_rev); mac_step = IWX_CSR_HW_REV_STEP(sc->sc_hw_rev << 2); rf_type = IWX_CSR_HW_RFID_TYPE(sc->sc_hw_rf_id); |
