From: stsp Date: Thu, 25 Nov 2021 14:51:26 +0000 (+0000) Subject: Prepare iwx(4) for using new firmware (API version -67) in the future. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1fb03427c22cf915d93048577c79282958ccb068;p=openbsd Prepare iwx(4) for using new firmware (API version -67) in the future. Bump command versions array size as required for -67 firmware. Ignore new TLVs found in -67 images. Add room for another ucode section needed for -67 on AX201 devices. --- diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index d20e233a57d..43b898c0ff6 100644 --- a/sys/dev/pci/if_iwx.c +++ b/sys/dev/pci/if_iwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwx.c,v 1.124 2021/11/22 11:01:12 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.125 2021/11/25 14:51:26 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -1377,6 +1377,11 @@ iwx_read_firmware(struct iwx_softc *sc) case IWX_UCODE_TLV_TYPE_HCMD: case IWX_UCODE_TLV_TYPE_REGIONS: case IWX_UCODE_TLV_TYPE_TRIGGERS: + case IWX_UCODE_TLV_TYPE_CONF_SET: + break; + + /* undocumented TLV found in iwx-cc-a0-67 image */ + case 0x100000b: break; default: diff --git a/sys/dev/pci/if_iwxreg.h b/sys/dev/pci/if_iwxreg.h index 92913cf703a..e0521b12974 100644 --- a/sys/dev/pci/if_iwxreg.h +++ b/sys/dev/pci/if_iwxreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwxreg.h,v 1.32 2021/11/22 10:31:58 stsp Exp $ */ +/* $OpenBSD: if_iwxreg.h,v 1.33 2021/11/25 14:51:26 stsp Exp $ */ /*- * Based on BSD-licensed source modules in the Linux iwlwifi driver, @@ -1243,7 +1243,8 @@ struct iwx_ucode_header { #define IWX_UCODE_TLV_TYPE_HCMD (IWX_UCODE_TLV_DEBUG_BASE + 2) #define IWX_UCODE_TLV_TYPE_REGIONS (IWX_UCODE_TLV_DEBUG_BASE + 3) #define IWX_UCODE_TLV_TYPE_TRIGGERS (IWX_UCODE_TLV_DEBUG_BASE + 4) -#define IWX_UCODE_TLV_DEBUG_MAX IWX_UCODE_TLV_TYPE_TRIGGERS +#define IWX_UCODE_TLV_TYPE_CONF_SET (IWX_UCODE_TLV_DEBUG_BASE + 5) +#define IWX_UCODE_TLV_DEBUG_MAX IWX_UCODE_TLV_TYPE_CONF_SET struct iwx_ucode_tlv { diff --git a/sys/dev/pci/if_iwxvar.h b/sys/dev/pci/if_iwxvar.h index 02bdd3aa1ff..93e4860a77b 100644 --- a/sys/dev/pci/if_iwxvar.h +++ b/sys/dev/pci/if_iwxvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwxvar.h,v 1.27 2021/11/22 10:54:36 stsp Exp $ */ +/* $OpenBSD: if_iwxvar.h,v 1.28 2021/11/25 14:51:26 stsp Exp $ */ /* * Copyright (c) 2014 genua mbh @@ -123,7 +123,7 @@ struct iwx_tx_radiotap_header { (1 << IEEE80211_RADIOTAP_RATE) | \ (1 << IEEE80211_RADIOTAP_CHANNEL)) -#define IWX_UCODE_SECT_MAX 48 +#define IWX_UCODE_SECT_MAX 49 /* * fw_status is used to determine if we've already parsed the firmware file @@ -536,7 +536,7 @@ struct iwx_softc { int sc_capa_n_scan_channels; uint8_t sc_ucode_api[howmany(IWX_NUM_UCODE_TLV_API, NBBY)]; uint8_t sc_enabled_capa[howmany(IWX_NUM_UCODE_TLV_CAPA, NBBY)]; -#define IWX_MAX_FW_CMD_VERSIONS 167 +#define IWX_MAX_FW_CMD_VERSIONS 704 struct iwx_fw_cmd_version cmd_versions[IWX_MAX_FW_CMD_VERSIONS]; int n_cmd_versions;