On Wed, Mar 11, 2026 at 04:12:49AM -0600, Stefan Sperling wrote:
> CVSROOT: /cvs
> Module name: src
> Changes by: [email protected] 2026/03/11 04:12:49
>
> Modified files:
> sys/dev/pci : if_iwx.c if_iwxreg.h if_iwxvar.h
>
> Log message:
> Add support Intel AX211 BZ MACs paired WiFi 6e RFs to iwx(4).
This breaks AX201 support.
iwx0 at pci0 dev 20 function 3 "Intel Wi-Fi 6 AX201" rev 0x20, msix
[...]
iwx0: could not load firmware, 35
iwx0: failed to load init firmware
I don't have BZ hardware to test with, but AX201 works again with the
below that reverts the changes in iwx_ctxt_info_init. (sc_hw_rev isn't
what was directly read, per "In the 8000 HW family the format of the 4
bytes of CSR_HW_REV have changed"... in iwx_attach.)
diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c
index 68c176c926b..e5a502c9a10 100644
--- a/sys/dev/pci/if_iwx.c
+++ b/sys/dev/pci/if_iwx.c
@@ -922,7 +922,8 @@ iwx_ctxt_info_init(struct iwx_softc *sc, const struct
iwx_fw_sects *fws)
memset(ctxt_info, 0, sizeof(*ctxt_info));
ctxt_info->version.version = 0;
- ctxt_info->version.mac_id = htole16(sc->sc_hw_rev);
+ ctxt_info->version.mac_id =
+ htole16((uint16_t)IWX_READ(sc, IWX_CSR_HW_REV));
/* size is in DWs */
ctxt_info->version.size = htole16(sizeof(*ctxt_info) / 4);
@@ -1017,7 +1018,7 @@ iwx_ctxt_info_gen3_init(struct iwx_softc *sc, const
struct iwx_fw_sects *fws)
memset(prph_scratch, 0, sizeof(*prph_scratch));
prph_sc_ctrl = &prph_scratch->ctrl_cfg;
prph_sc_ctrl->version.version = 0;
- prph_sc_ctrl->version.mac_id = htole16(sc->sc_hw_rev);
+ prph_sc_ctrl->version.mac_id = htole16(IWX_READ(sc, IWX_CSR_HW_REV));
prph_sc_ctrl->version.size = htole16(sizeof(*prph_scratch) / 4);
control_flags = IWX_PRPH_SCRATCH_RB_SIZE_4K |