stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev,
	Miri Korenblit <miriam.rachel.korenblit@intel.com>,
	Johannes Berg <johannes.berg@intel.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 6.6 75/77] wifi: iwlwifi: support BIOS override for 5G9 in CA also in LARI version 8
Date: Tue, 25 Mar 2025 08:23:10 -0400	[thread overview]
Message-ID: <20250325122146.406017762@linuxfoundation.org> (raw)
In-Reply-To: <20250325122144.259256924@linuxfoundation.org>

6.6-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Miri Korenblit <miriam.rachel.korenblit@intel.com>

commit b1e8102a4048003097c7054cbc00bbda91a5ced7 upstream.

Commit 6b3e87cc0ca5 ("iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD
cmd v9")
added a few bits to iwl_lari_config_change_cmd::oem_unii4_allow_bitmap
if the FW has LARI version >= 9.
But we also need to send those bits for version 8 if the FW is capable
of this feature (indicated with capability bits)
Add the FW capability bit, and set the additional bits in the cmd when
the version is 8 and the FW capability bit is set.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20241226174257.dc5836f84514.I1e38f94465a36731034c94b9811de10cb6ee5921@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/wireless/intel/iwlwifi/fw/file.h |    4 ++
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c  |   37 +++++++++++++++++++++++++--
 2 files changed, 38 insertions(+), 3 deletions(-)

--- a/drivers/net/wireless/intel/iwlwifi/fw/file.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h
@@ -372,6 +372,8 @@ typedef unsigned int __bitwise iwl_ucode
  *      channels even when these are not enabled.
  * @IWL_UCODE_TLV_CAPA_DUMP_COMPLETE_SUPPORT: Support for indicating dump collection
  *	complete to FW.
+ * @IWL_UCODE_TLV_CAPA_BIOS_OVERRIDE_5G9_FOR_CA: supports (de)activating 5G9
+ *	for CA from BIOS.
  *
  * @NUM_IWL_UCODE_TLV_CAPA: number of bits used
  */
@@ -468,7 +470,7 @@ enum iwl_ucode_tlv_capa {
 	IWL_UCODE_TLV_CAPA_OFFLOAD_BTM_SUPPORT		= (__force iwl_ucode_tlv_capa_t)113,
 	IWL_UCODE_TLV_CAPA_STA_EXP_MFP_SUPPORT		= (__force iwl_ucode_tlv_capa_t)114,
 	IWL_UCODE_TLV_CAPA_SNIFF_VALIDATE_SUPPORT	= (__force iwl_ucode_tlv_capa_t)116,
-
+	IWL_UCODE_TLV_CAPA_BIOS_OVERRIDE_5G9_FOR_CA	= (__force iwl_ucode_tlv_capa_t)123,
 #ifdef __CHECKER__
 	/* sparse says it cannot increment the previous enum member */
 #define NUM_IWL_UCODE_TLV_CAPA 128
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1195,11 +1195,30 @@ static u8 iwl_mvm_eval_dsm_rfi(struct iw
 	return DSM_VALUE_RFI_DISABLE;
 }
 
+enum iwl_dsm_unii4_bitmap {
+	DSM_VALUE_UNII4_US_OVERRIDE_MSK		= BIT(0),
+	DSM_VALUE_UNII4_US_EN_MSK		= BIT(1),
+	DSM_VALUE_UNII4_ETSI_OVERRIDE_MSK	= BIT(2),
+	DSM_VALUE_UNII4_ETSI_EN_MSK		= BIT(3),
+	DSM_VALUE_UNII4_CANADA_OVERRIDE_MSK	= BIT(4),
+	DSM_VALUE_UNII4_CANADA_EN_MSK		= BIT(5),
+};
+
+#define DSM_UNII4_ALLOW_BITMAP (DSM_VALUE_UNII4_US_OVERRIDE_MSK		|\
+				DSM_VALUE_UNII4_US_EN_MSK		|\
+				DSM_VALUE_UNII4_ETSI_OVERRIDE_MSK	|\
+				DSM_VALUE_UNII4_ETSI_EN_MSK		|\
+				DSM_VALUE_UNII4_CANADA_OVERRIDE_MSK	|\
+				DSM_VALUE_UNII4_CANADA_EN_MSK)
+
 static void iwl_mvm_lari_cfg(struct iwl_mvm *mvm)
 {
 	int ret;
 	u32 value;
 	struct iwl_lari_config_change_cmd_v6 cmd = {};
+	u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw,
+					   WIDE_ID(REGULATORY_AND_NVM_GROUP,
+						   LARI_CONFIG_CHANGE), 1);
 
 	cmd.config_bitmap = iwl_acpi_get_lari_config_bitmap(&mvm->fwrt);
 
@@ -1211,8 +1230,22 @@ static void iwl_mvm_lari_cfg(struct iwl_
 	ret = iwl_acpi_get_dsm_u32(mvm->fwrt.dev, 0,
 				   DSM_FUNC_ENABLE_UNII4_CHAN,
 				   &iwl_guid, &value);
-	if (!ret)
-		cmd.oem_unii4_allow_bitmap = cpu_to_le32(value);
+	if (!ret) {
+		u32 _value = cpu_to_le32(value);
+
+		_value &= DSM_UNII4_ALLOW_BITMAP;
+
+		/* Since version 9, bits 4 and 5 are supported
+		 * regardless of this capability.
+		 */
+		if (cmd_ver < 9 &&
+		    !fw_has_capa(&mvm->fw->ucode_capa,
+				 IWL_UCODE_TLV_CAPA_BIOS_OVERRIDE_5G9_FOR_CA))
+			_value &= ~(DSM_VALUE_UNII4_CANADA_OVERRIDE_MSK |
+				   DSM_VALUE_UNII4_CANADA_EN_MSK);
+
+		cmd.oem_unii4_allow_bitmap = cpu_to_le32(_value);
+	}
 
 	ret = iwl_acpi_get_dsm_u32(mvm->fwrt.dev, 0,
 				   DSM_FUNC_ACTIVATE_CHANNEL,



  parent reply	other threads:[~2025-03-25 12:36 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 12:21 [PATCH 6.6 00/77] 6.6.85-rc1 review Greg Kroah-Hartman
2025-03-25 12:21 ` [PATCH 6.6 01/77] firmware: imx-scu: fix OF node leak in .probe() Greg Kroah-Hartman
2025-03-25 12:21 ` [PATCH 6.6 02/77] arm64: dts: freescale: tqma8mpql: Fix vqmmc-supply Greg Kroah-Hartman
2025-03-25 12:21 ` [PATCH 6.6 03/77] xfrm: fix tunnel mode TX datapath in packet offload mode Greg Kroah-Hartman
2025-03-25 12:21 ` [PATCH 6.6 04/77] xfrm_output: Force software GSO only in tunnel mode Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 05/77] soc: imx8m: Remove global soc_uid Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 06/77] soc: imx8m: Use devm_* to simplify probe failure handling Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 07/77] soc: imx8m: Unregister cpufreq and soc dev in cleanup path Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 08/77] ARM: dts: bcm2711: PL011 UARTs are actually r1p5 Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 09/77] arm64: dts: rockchip: Remove undocumented sdmmc property from lubancat-1 Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 10/77] RDMA/bnxt_re: Add missing paranthesis in map_qp_id_to_tbl_indx Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 11/77] RDMA/mlx5: Handle errors returned from mlx5r_ib_rate() Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 12/77] ARM: OMAP1: select CONFIG_GENERIC_IRQ_CHIP Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 13/77] ARM: dts: bcm2711: Dont mark timer regs unconfigured Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 14/77] RDMA/bnxt_re: Avoid clearing VLAN_ID mask in modify qp path Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 15/77] RDMA/hns: Fix soft lockup during bt pages loop Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 16/77] RDMA/hns: Fix unmatched condition in error path of alloc_user_qp_db() Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 17/77] RDMA/hns: Fix a missing rollback in error path of hns_roce_create_qp_common() Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 18/77] RDMA/hns: Fix wrong value of max_sge_rd Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 19/77] Bluetooth: Fix error code in chan_alloc_skb_cb() Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 20/77] Bluetooth: hci_event: Fix connection regression between LE and non-LE adapters Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 21/77] accel/qaic: Fix possible data corruption in BOs > 2G Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 22/77] ARM: davinci: da850: fix selecting ARCH_DAVINCI_DA8XX Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 23/77] ipv6: Fix memleak of nhc_pcpu_rth_output in fib_check_nh_v6_gw() Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 24/77] ipv6: Set errno after ip_fib_metrics_init() in ip6_route_info_create() Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 25/77] net: atm: fix use after free in lec_send() Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 26/77] net: lwtunnel: fix recursion loops Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 27/77] net/neighbor: add missing policy for NDTPA_QUEUE_LENBYTES Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 28/77] Revert "gre: Fix IPv6 link-local address generation." Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 29/77] i2c: omap: fix IRQ storms Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 30/77] can: rcar_canfd: Fix page entries in the AFL list Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 31/77] can: ucan: fix out of bound read in strscpy() source Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 32/77] can: flexcan: only change CAN state when link up in system PM Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 33/77] can: flexcan: disable transceiver during " Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 34/77] drm/v3d: Dont run jobs that have errors flagged in its fence Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 35/77] riscv: dts: starfive: Fix a typo in StarFive JH7110 pin function definitions Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 36/77] regulator: dummy: force synchronous probing Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 37/77] regulator: check that dummy regulator has been probed before using it Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 38/77] accel/qaic: Fix integer overflow in qaic_validate_req() Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 39/77] arm64: dts: freescale: imx8mp-verdin-dahlia: add Microphone Jack to sound card Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 40/77] arm64: dts: freescale: imx8mm-verdin-dahlia: " Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 41/77] arm64: dts: rockchip: fix pinmux of UART0 for PX30 Ringneck on Haikou Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 42/77] arm64: dts: rockchip: Add missing PCIe supplies to RockPro64 board dtsi Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 43/77] mmc: sdhci-brcmstb: add cqhci suspend/resume to PM ops Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 44/77] mmc: atmel-mci: Add missing clk_disable_unprepare() Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 45/77] mm: fix error handling in __filemap_get_folio() with FGP_NOWAIT Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 46/77] mm/migrate: fix shmem xarray update during migration Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 47/77] proc: fix UAF in proc_get_inode() Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 48/77] memcg: drain obj stock on cpu hotplug teardown Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 49/77] ARM: dts: imx6qdl-apalis: Fix poweroff on Apalis iMX6 Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 50/77] ARM: shmobile: smp: Enforce shmobile_smp_* alignment Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 51/77] efi/libstub: Avoid physical address 0x0 when doing random allocation Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 52/77] xsk: fix an integer overflow in xp_create_and_assign_umem() Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 53/77] batman-adv: Ignore own maximum aggregation size during RX Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 54/77] soc: qcom: pdr: Fix the potential deadlock Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 55/77] drm/radeon: fix uninitialized size issue in radeon_vce_cs_parse() Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 56/77] drm/sched: Fix fence reference count leak Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 57/77] drm/amdgpu: Fix MPEG2, MPEG4 and VC1 video caps max size Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 58/77] drm/amdgpu: Fix JPEG video caps max size for navi1x and raven Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 59/77] drm/amd/display: should support dmub hw lock on Replay Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 60/77] drm/amd/display: Use HW lock mgr for PSR1 when only one eDP Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 61/77] ksmbd: fix incorrect validation for num_aces field of smb_acl Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 62/77] mptcp: Fix data stream corruption in the address announcement Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 63/77] KVM: arm64: Calculate cptr_el2 traps on activating traps Greg Kroah-Hartman
2025-03-25 12:22 ` [PATCH 6.6 64/77] KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state Greg Kroah-Hartman
2025-03-25 12:23 ` [PATCH 6.6 65/77] KVM: arm64: Remove host FPSIMD saving for non-protected KVM Greg Kroah-Hartman
2025-03-25 12:23 ` [PATCH 6.6 66/77] KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN Greg Kroah-Hartman
2025-03-25 12:23 ` [PATCH 6.6 67/77] KVM: arm64: Remove VHE host restore of CPACR_EL1.SMEN Greg Kroah-Hartman
2025-03-25 12:23 ` [PATCH 6.6 68/77] KVM: arm64: Refactor exit handlers Greg Kroah-Hartman
2025-03-25 12:23 ` [PATCH 6.6 69/77] KVM: arm64: Mark some header functions as inline Greg Kroah-Hartman
2025-03-25 12:23 ` [PATCH 6.6 70/77] KVM: arm64: Eagerly switch ZCR_EL{1,2} Greg Kroah-Hartman
2025-03-25 12:23 ` [PATCH 6.6 71/77] arm64: dts: rockchip: fix u2phy1_host status for NanoPi R4S Greg Kroah-Hartman
2025-03-25 12:23 ` [PATCH 6.6 72/77] Revert "sched/core: Reduce cost of sched_move_task when config autogroup" Greg Kroah-Hartman
2025-03-25 12:23 ` [PATCH 6.6 73/77] btrfs: make sure that WRITTEN is set on all metadata blocks Greg Kroah-Hartman
2025-03-25 12:23 ` [PATCH 6.6 74/77] bnxt_en: Fix receive ring space parameters when XDP is active Greg Kroah-Hartman
2025-03-25 12:23 ` Greg Kroah-Hartman [this message]
2025-03-25 12:23 ` [PATCH 6.6 76/77] wifi: iwlwifi: mvm: ensure offloading TID queue exists Greg Kroah-Hartman
2025-03-25 12:23 ` [PATCH 6.6 77/77] netfilter: nft_counter: Use u64_stats_t for statistic Greg Kroah-Hartman
2025-03-25 15:07 ` [PATCH 6.6 00/77] 6.6.85-rc1 review Naresh Kamboju
2025-03-25 16:07   ` Dragan Simic
2025-03-25 23:36     ` Greg Kroah-Hartman
2025-03-26  2:33     ` Harshit Mogalapalli
2025-03-26  3:56       ` Dragan Simic
2025-03-26 15:38         ` Greg Kroah-Hartman
2025-03-27  7:12           ` Dragan Simic
2025-03-25 17:25 ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250325122146.406017762@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=emmanuel.grumbach@intel.com \
    --cc=johannes.berg@intel.com \
    --cc=miriam.rachel.korenblit@intel.com \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).