Commit a581a028 authored by Miri Korenblit's avatar Miri Korenblit Committed by Johannes Berg
Browse files

wifi: iwlwifi: support BIOS override for UNII4 in CA/US also in LARI versions < 12



Commit ef7ddf4e ("iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v12")
added a few bits to iwl_lari_config_change_cmd::chan_state_active_bitmap
if the FW has LARI version >= 12.
But we also need to send those bits for version 8-11 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: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: default avatarJohannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20241226174257.672651ad849c.I67a00d9544c48ad964f8e998ebe8c168071c3d01@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 09bdddd3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -384,7 +384,8 @@ typedef unsigned int __bitwise iwl_ucode_tlv_capa_t;
 *	to report the CSI information with (certain) RX frames
 * @IWL_UCODE_TLV_CAPA_FTM_CALIBRATED: has FTM calibrated and thus supports both
 *	initiator and responder
 * @IWL_UCODE_TLV_CAPA_MLME_OFFLOAD: supports MLME offload
 * @IWL_UCODE_TLV_CAPA_BIOS_OVERRIDE_UNII4_US_CA: supports (de)activating UNII-4
 *	for US/CA/WW from BIOS
 * @IWL_UCODE_TLV_CAPA_PROTECTED_TWT: Supports protection of TWT action frames
 * @IWL_UCODE_TLV_CAPA_FW_RESET_HANDSHAKE: Supports the firmware handshake in
 *	reset flow
@@ -474,7 +475,7 @@ enum iwl_ucode_tlv_capa {
	IWL_UCODE_TLV_CAPA_DBG_BUF_ALLOC_CMD_SUPP	= (__force iwl_ucode_tlv_capa_t)93,

	/* set 3 */
	IWL_UCODE_TLV_CAPA_MLME_OFFLOAD			= (__force iwl_ucode_tlv_capa_t)96,
	IWL_UCODE_TLV_CAPA_BIOS_OVERRIDE_UNII4_US_CA	= (__force iwl_ucode_tlv_capa_t)96,

	/*
	 * @IWL_UCODE_TLV_CAPA_PSC_CHAN_SUPPORT: supports PSC channels
+7 −1
Original line number Diff line number Diff line
@@ -564,7 +564,13 @@ int iwl_fill_lari_config(struct iwl_fw_runtime *fwrt,
	if (!ret) {
		if (cmd_ver < 8)
			value &= ~ACTIVATE_5G2_IN_WW_MASK;
		if (cmd_ver < 12)

		/* Since version 12, bits 5 and 6 are supported
		 * regardless of this capability.
		 */
		if (cmd_ver < 12 &&
		    !fw_has_capa(&fwrt->fw->ucode_capa,
				 IWL_UCODE_TLV_CAPA_BIOS_OVERRIDE_UNII4_US_CA))
			value &= CHAN_STATE_ACTIVE_BITMAP_CMD_V11;

		cmd->chan_state_active_bitmap = cpu_to_le32(value);