From 833d79f65feb26cf3701deff24217db1bf20211d Mon Sep 17 00:00:00 2001 From: stsp Date: Fri, 13 May 2022 05:06:56 +0000 Subject: [PATCH] Make iwx(4) load a0-hr-b0 firmware on AX211 devices which require it. Firmware for these devices was added in iwx-firmware-20220110p0. On Linux these devices may show up as "AX201", even though they belong to the AX210 hardware family. Intel's driver can be confusing at times. Tested by Guilherme M. Schroeder, who previously had a non-working device. --- sys/dev/pci/if_iwx.c | 36 +++++++++++++++++++++++++++++++++++- sys/dev/pci/if_iwxvar.h | 7 ++++++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/if_iwx.c b/sys/dev/pci/if_iwx.c index 451df3cbf2b..3c5564850fa 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.146 2022/05/12 21:33:31 stsp Exp $ */ +/* $OpenBSD: if_iwx.c,v 1.147 2022/05/13 05:06:56 stsp Exp $ */ /* * Copyright (c) 2014, 2016 genua gmbh @@ -10269,6 +10269,40 @@ static const struct iwx_dev_info iwx_dev_info_table[] = { IWX_CFG_NO_160, IWX_CFG_CORES_BT, IWX_CFG_NO_CDB, IWX_CFG_ANY, iwx_2ax_cfg_so_jf_b0), /* 9462 */ + /* So with Hr */ + _IWX_DEV_INFO(IWX_CFG_ANY, IWX_CFG_ANY, + IWX_CFG_MAC_TYPE_SO, IWX_CFG_ANY, + IWX_CFG_RF_TYPE_HR2, IWX_CFG_ANY, + IWX_CFG_NO_160, IWX_CFG_ANY, IWX_CFG_NO_CDB, IWX_CFG_ANY, + iwx_cfg_so_a0_hr_b0), /* AX203 */ + _IWX_DEV_INFO(IWX_CFG_ANY, IWX_CFG_ANY, + IWX_CFG_MAC_TYPE_SO, IWX_CFG_ANY, + IWX_CFG_RF_TYPE_HR1, IWX_CFG_ANY, + IWX_CFG_160, IWX_CFG_ANY, IWX_CFG_NO_CDB, IWX_CFG_ANY, + iwx_cfg_so_a0_hr_b0), /* ax101 */ + _IWX_DEV_INFO(IWX_CFG_ANY, IWX_CFG_ANY, + IWX_CFG_MAC_TYPE_SO, IWX_CFG_ANY, + IWX_CFG_RF_TYPE_HR2, IWX_CFG_ANY, + IWX_CFG_160, IWX_CFG_ANY, IWX_CFG_NO_CDB, IWX_CFG_ANY, + iwx_cfg_so_a0_hr_b0), /* ax201 */ + + /* So-F with Hr */ + _IWX_DEV_INFO(IWX_CFG_ANY, IWX_CFG_ANY, + IWX_CFG_MAC_TYPE_SOF, IWX_CFG_ANY, + IWX_CFG_RF_TYPE_HR2, IWX_CFG_ANY, + IWX_CFG_NO_160, IWX_CFG_ANY, IWX_CFG_NO_CDB, IWX_CFG_ANY, + iwx_cfg_so_a0_hr_b0), /* AX203 */ + _IWX_DEV_INFO(IWX_CFG_ANY, IWX_CFG_ANY, + IWX_CFG_MAC_TYPE_SOF, IWX_CFG_ANY, + IWX_CFG_RF_TYPE_HR1, IWX_CFG_ANY, + IWX_CFG_160, IWX_CFG_ANY, IWX_CFG_NO_CDB, IWX_CFG_ANY, + iwx_cfg_so_a0_hr_b0), /* AX101 */ + _IWX_DEV_INFO(IWX_CFG_ANY, IWX_CFG_ANY, + IWX_CFG_MAC_TYPE_SOF, IWX_CFG_ANY, + IWX_CFG_RF_TYPE_HR2, IWX_CFG_ANY, + IWX_CFG_160, IWX_CFG_ANY, IWX_CFG_NO_CDB, IWX_CFG_ANY, + iwx_cfg_so_a0_hr_b0), /* AX201 */ + /* So-F with GF */ _IWX_DEV_INFO(IWX_CFG_ANY, IWX_CFG_ANY, IWX_CFG_MAC_TYPE_SOF, IWX_CFG_ANY, diff --git a/sys/dev/pci/if_iwxvar.h b/sys/dev/pci/if_iwxvar.h index 12fe78dc55d..3e6edbcdf5e 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.35 2022/05/12 12:29:28 stsp Exp $ */ +/* $OpenBSD: if_iwxvar.h,v 1.36 2022/05/13 05:06:56 stsp Exp $ */ /* * Copyright (c) 2014 genua mbh @@ -485,6 +485,7 @@ struct iwx_device_cfg { #define IWX_SO_A_GF_A_PNVM "iwx-so-a0-gf-a0.pnvm" #define IWX_SO_A_GF4_A_FW "iwx-so-a0-gf4-a0-67" #define IWX_SO_A_GF4_A_PNVM "iwx-so-a0-gf4-a0.pnvm" +#define IWX_SO_A_HR_B_FW "iwx-so-a0-hr-b0-64" #define IWX_SO_A_JF_B_FW "iwx-so-a0-jf-b0-64" const struct iwx_device_cfg iwx_9560_quz_a0_jf_b0_cfg = { @@ -529,6 +530,10 @@ const struct iwx_device_cfg iwx_ax201_cfg_quz_hr = { .fw_name = IWX_QUZ_A_HR_B_FW, }; +const struct iwx_device_cfg iwx_cfg_so_a0_hr_b0 = { + .fw_name = IWX_SO_A_HR_B_FW, +}; + const struct iwx_device_cfg iwx_cfg_quz_a0_hr_b0 = { .fw_name = IWX_QUZ_A_HR_B_FW, }; -- 2.20.1