From 49a0d9aa914c9575442785dad0c4788915d9a514 Mon Sep 17 00:00:00 2001 From: stsp Date: Thu, 29 Jul 2021 11:50:37 +0000 Subject: [PATCH] Increase fixed limits for the number of iwx(4) command versions, channels, and microcode sections. Required for loading new firmware images. ok kevlo@ --- sys/dev/pci/if_iwx.c | 4 ++-- sys/dev/pci/if_iwxvar.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 5ec96aa5f19..106ad52e91d 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.71 2021/07/26 14:15:40 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.72 2021/07/29 11:50:37 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -924,7 +924,7 @@ iwx_firmware_store_section(struct iwx_softc *sc, enum iwx_ucode_type type, #define IWX_DEFAULT_SCAN_CHANNELS 40 /* Newer firmware might support more channels. Raise this value if needed. */ -#define IWX_MAX_SCAN_CHANNELS 52 /* as of 8265-34 firmware image */ +#define IWX_MAX_SCAN_CHANNELS 67 /* as of iwx-cc-a0-62 firmware */ struct iwx_tlv_calib_data { uint32_t ucode_type; diff --git a/sys/dev/pci/if_iwxvar.h b/sys/dev/pci/if_iwxvar.h index 928b4d9ec79..8eaf8ab5b79 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.17 2021/06/30 09:46:46 stsp Exp $ */ +/* $OpenBSD: if_iwxvar.h,v 1.18 2021/07/29 11:50:37 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 42 +#define IWX_UCODE_SECT_MAX 48 #define IWX_FWDMASEGSZ (192*1024) #define IWX_FWDMASEGSZ_8000 (320*1024) /* sanity check value */ @@ -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 64 +#define IWX_MAX_FW_CMD_VERSIONS 167 struct iwx_fw_cmd_version cmd_versions[IWX_MAX_FW_CMD_VERSIONS]; int n_cmd_versions; -- 2.20.1