Commit ef7ddf4e authored by Anjaneyulu's avatar Anjaneyulu Committed by Johannes Berg
Browse files

wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v12



Add support for activate/deactivate unii4 in USA, Canada and WW by
reading DSM function 8 from UEFI or ACPI and sending it to the FW.

Signed-off-by: default avatarAnjaneyulu <pagadala.yesu.anjaneyulu@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20240703125541.674604cbb6d1.Ibb946ae8ce7a760940a3c9d101e7f4f1808c43e4@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 1895712a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -704,6 +704,8 @@ struct iwl_lari_config_change_cmd_v10 {
 *	Each bit represents a country or region, and a band to activate
 *	according to the BIOS definitions.
 *	For LARI cmd version 11 - bits 0:4 are supported.
 *	For LARI cmd version 12 - bits 0:6 are supported and bits 7:31 are
 *	reserved. No need to mask out the reserved bits.
 * @force_disable_channels_bitmap: Bitmap of disabled bands/channels.
 *	Each bit represents a set of channels in a specific band that should be
 *	disabled
@@ -731,9 +733,11 @@ struct iwl_lari_config_change_cmd {
	__le32 oem_11be_allow_bitmap;
} __packed;
/* LARI_CHANGE_CONF_CMD_S_VER_11 */
/* LARI_CHANGE_CONF_CMD_S_VER_12 */

/* Activate UNII-1 (5.2GHz) for World Wide */
#define ACTIVATE_5G2_IN_WW_MASK			BIT(4)
#define CHAN_STATE_ACTIVE_BITMAP_CMD_V11	0x1F

/**
 * struct iwl_pnvm_init_complete_ntfy - PNVM initialization complete
+4 −0
Original line number Diff line number Diff line
@@ -497,6 +497,7 @@ static size_t iwl_get_lari_config_cmd_size(u8 cmd_ver)
	size_t cmd_size;

	switch (cmd_ver) {
	case 12:
	case 11:
		cmd_size = sizeof(struct iwl_lari_config_change_cmd);
		break;
@@ -563,6 +564,9 @@ 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)
			value &= CHAN_STATE_ACTIVE_BITMAP_CMD_V11;

		cmd->chan_state_active_bitmap = cpu_to_le32(value);
	}