brintos

brintos / linux-shallow public Read only

0
0
Text · 26.2 KiB · d424d01 Raw
764 lines · c
1/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */2/*3 * Copyright (C) 2012-2014, 2018-2024 Intel Corporation4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH5 * Copyright (C) 2016-2017 Intel Deutschland GmbH6 */7#ifndef __iwl_fw_api_nvm_reg_h__8#define __iwl_fw_api_nvm_reg_h__9 10/**11 * enum iwl_regulatory_and_nvm_subcmd_ids - regulatory/NVM commands12 */13enum iwl_regulatory_and_nvm_subcmd_ids {14	/**15	 * @NVM_ACCESS_COMPLETE: &struct iwl_nvm_access_complete_cmd16	 */17	NVM_ACCESS_COMPLETE = 0x0,18 19	/**20	 * @LARI_CONFIG_CHANGE: &struct iwl_lari_config_change_cmd_v1,21	 *	&struct iwl_lari_config_change_cmd_v2,22	 *	&struct iwl_lari_config_change_cmd_v3,23	 *	&struct iwl_lari_config_change_cmd_v4,24	 *	&struct iwl_lari_config_change_cmd_v5,25	 *	&struct iwl_lari_config_change_cmd_v6,26	 *	&struct iwl_lari_config_change_cmd_v7,27	 *	&struct iwl_lari_config_change_cmd_v10 or28	 *	&struct iwl_lari_config_change_cmd29	 */30	LARI_CONFIG_CHANGE = 0x1,31 32	/**33	 * @NVM_GET_INFO:34	 * Command is &struct iwl_nvm_get_info,35	 * response is &struct iwl_nvm_get_info_rsp36	 */37	NVM_GET_INFO = 0x2,38 39	/**40	 * @TAS_CONFIG: &union iwl_tas_config_cmd41	 */42	TAS_CONFIG = 0x3,43 44	/**45	 * @SAR_OFFSET_MAPPING_TABLE_CMD: &struct iwl_sar_offset_mapping_cmd46	 */47	SAR_OFFSET_MAPPING_TABLE_CMD = 0x4,48 49	/**50	 * @MCC_ALLOWED_AP_TYPE_CMD: &struct iwl_mcc_allowed_ap_type_cmd51	 */52	MCC_ALLOWED_AP_TYPE_CMD = 0x5,53 54	/**55	 * @PNVM_INIT_COMPLETE_NTFY: &struct iwl_pnvm_init_complete_ntfy56	 */57	PNVM_INIT_COMPLETE_NTFY = 0xFE,58};59 60/**61 * enum iwl_nvm_access_op - NVM access opcode62 * @IWL_NVM_READ: read NVM63 * @IWL_NVM_WRITE: write NVM64 */65enum iwl_nvm_access_op {66	IWL_NVM_READ	= 0,67	IWL_NVM_WRITE	= 1,68};69 70/**71 * enum iwl_nvm_access_target - target of the NVM_ACCESS_CMD72 * @NVM_ACCESS_TARGET_CACHE: access the cache73 * @NVM_ACCESS_TARGET_OTP: access the OTP74 * @NVM_ACCESS_TARGET_EEPROM: access the EEPROM75 */76enum iwl_nvm_access_target {77	NVM_ACCESS_TARGET_CACHE = 0,78	NVM_ACCESS_TARGET_OTP = 1,79	NVM_ACCESS_TARGET_EEPROM = 2,80};81 82/**83 * enum iwl_nvm_section_type - section types for NVM_ACCESS_CMD84 * @NVM_SECTION_TYPE_SW: software section85 * @NVM_SECTION_TYPE_REGULATORY: regulatory section86 * @NVM_SECTION_TYPE_CALIBRATION: calibration section87 * @NVM_SECTION_TYPE_PRODUCTION: production section88 * @NVM_SECTION_TYPE_REGULATORY_SDP: regulatory section used by 3168 series89 * @NVM_SECTION_TYPE_MAC_OVERRIDE: MAC override section90 * @NVM_SECTION_TYPE_PHY_SKU: PHY SKU section91 * @NVM_MAX_NUM_SECTIONS: number of sections92 */93enum iwl_nvm_section_type {94	NVM_SECTION_TYPE_SW = 1,95	NVM_SECTION_TYPE_REGULATORY = 3,96	NVM_SECTION_TYPE_CALIBRATION = 4,97	NVM_SECTION_TYPE_PRODUCTION = 5,98	NVM_SECTION_TYPE_REGULATORY_SDP = 8,99	NVM_SECTION_TYPE_MAC_OVERRIDE = 11,100	NVM_SECTION_TYPE_PHY_SKU = 12,101	NVM_MAX_NUM_SECTIONS = 13,102};103 104/**105 * struct iwl_nvm_access_cmd - Request the device to send an NVM section106 * @op_code: &enum iwl_nvm_access_op107 * @target: &enum iwl_nvm_access_target108 * @type: &enum iwl_nvm_section_type109 * @offset: offset in bytes into the section110 * @length: in bytes, to read/write111 * @data: if write operation, the data to write. On read its empty112 */113struct iwl_nvm_access_cmd {114	u8 op_code;115	u8 target;116	__le16 type;117	__le16 offset;118	__le16 length;119	u8 data[];120} __packed; /* NVM_ACCESS_CMD_API_S_VER_2 */121 122/**123 * struct iwl_nvm_access_resp - response to NVM_ACCESS_CMD124 * @offset: offset in bytes into the section125 * @length: in bytes, either how much was written or read126 * @type: NVM_SECTION_TYPE_*127 * @status: 0 for success, fail otherwise128 * @data: if read operation, the data returned. Empty on write.129 */130struct iwl_nvm_access_resp {131	__le16 offset;132	__le16 length;133	__le16 type;134	__le16 status;135	u8 data[];136} __packed; /* NVM_ACCESS_CMD_RESP_API_S_VER_2 */137 138/*139 * struct iwl_nvm_get_info - request to get NVM data140 */141struct iwl_nvm_get_info {142	__le32 reserved;143} __packed; /* REGULATORY_NVM_GET_INFO_CMD_API_S_VER_1 */144 145/**146 * enum iwl_nvm_info_general_flags - flags in NVM_GET_INFO resp147 * @NVM_GENERAL_FLAGS_EMPTY_OTP: 1 if OTP is empty148 */149enum iwl_nvm_info_general_flags {150	NVM_GENERAL_FLAGS_EMPTY_OTP	= BIT(0),151};152 153/**154 * struct iwl_nvm_get_info_general - general NVM data155 * @flags: bit 0: 1 - empty, 0 - non-empty156 * @nvm_version: nvm version157 * @board_type: board type158 * @n_hw_addrs: number of reserved MAC addresses159 */160struct iwl_nvm_get_info_general {161	__le32 flags;162	__le16 nvm_version;163	u8 board_type;164	u8 n_hw_addrs;165} __packed; /* REGULATORY_NVM_GET_INFO_GENERAL_S_VER_2 */166 167/**168 * enum iwl_nvm_mac_sku_flags - flags in &iwl_nvm_get_info_sku169 * @NVM_MAC_SKU_FLAGS_BAND_2_4_ENABLED: true if 2.4 band enabled170 * @NVM_MAC_SKU_FLAGS_BAND_5_2_ENABLED: true if 5.2 band enabled171 * @NVM_MAC_SKU_FLAGS_802_11N_ENABLED: true if 11n enabled172 * @NVM_MAC_SKU_FLAGS_802_11AC_ENABLED: true if 11ac enabled173 * @NVM_MAC_SKU_FLAGS_MIMO_DISABLED: true if MIMO disabled174 * @NVM_MAC_SKU_FLAGS_WAPI_ENABLED: true if WAPI enabled175 * @NVM_MAC_SKU_FLAGS_REG_CHECK_ENABLED: true if regulatory checker enabled176 * @NVM_MAC_SKU_FLAGS_API_LOCK_ENABLED: true if API lock enabled177 */178enum iwl_nvm_mac_sku_flags {179	NVM_MAC_SKU_FLAGS_BAND_2_4_ENABLED	= BIT(0),180	NVM_MAC_SKU_FLAGS_BAND_5_2_ENABLED	= BIT(1),181	NVM_MAC_SKU_FLAGS_802_11N_ENABLED	= BIT(2),182	NVM_MAC_SKU_FLAGS_802_11AC_ENABLED	= BIT(3),183	/**184	 * @NVM_MAC_SKU_FLAGS_802_11AX_ENABLED: true if 11ax enabled185	 */186	NVM_MAC_SKU_FLAGS_802_11AX_ENABLED	= BIT(4),187	NVM_MAC_SKU_FLAGS_MIMO_DISABLED		= BIT(5),188	NVM_MAC_SKU_FLAGS_WAPI_ENABLED		= BIT(8),189	NVM_MAC_SKU_FLAGS_REG_CHECK_ENABLED	= BIT(14),190	NVM_MAC_SKU_FLAGS_API_LOCK_ENABLED	= BIT(15),191};192 193/**194 * struct iwl_nvm_get_info_sku - mac information195 * @mac_sku_flags: flags for SKU, see &enum iwl_nvm_mac_sku_flags196 */197struct iwl_nvm_get_info_sku {198	__le32 mac_sku_flags;199} __packed; /* REGULATORY_NVM_GET_INFO_MAC_SKU_SECTION_S_VER_2 */200 201/**202 * struct iwl_nvm_get_info_phy - phy information203 * @tx_chains: BIT 0 chain A, BIT 1 chain B204 * @rx_chains: BIT 0 chain A, BIT 1 chain B205 */206struct iwl_nvm_get_info_phy {207	__le32 tx_chains;208	__le32 rx_chains;209} __packed; /* REGULATORY_NVM_GET_INFO_PHY_SKU_SECTION_S_VER_1 */210 211#define IWL_NUM_CHANNELS_V1	51212#define IWL_NUM_CHANNELS	110213 214/**215 * struct iwl_nvm_get_info_regulatory_v1 - regulatory information216 * @lar_enabled: is LAR enabled217 * @channel_profile: regulatory data of this channel218 * @reserved: reserved219 */220struct iwl_nvm_get_info_regulatory_v1 {221	__le32 lar_enabled;222	__le16 channel_profile[IWL_NUM_CHANNELS_V1];223	__le16 reserved;224} __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_1 */225 226/**227 * struct iwl_nvm_get_info_regulatory - regulatory information228 * @lar_enabled: is LAR enabled229 * @n_channels: number of valid channels in the array230 * @channel_profile: regulatory data of this channel231 */232struct iwl_nvm_get_info_regulatory {233	__le32 lar_enabled;234	__le32 n_channels;235	__le32 channel_profile[IWL_NUM_CHANNELS];236} __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_2 */237 238/**239 * struct iwl_nvm_get_info_rsp_v3 - response to get NVM data240 * @general: general NVM data241 * @mac_sku: data relating to MAC sku242 * @phy_sku: data relating to PHY sku243 * @regulatory: regulatory data244 */245struct iwl_nvm_get_info_rsp_v3 {246	struct iwl_nvm_get_info_general general;247	struct iwl_nvm_get_info_sku mac_sku;248	struct iwl_nvm_get_info_phy phy_sku;249	struct iwl_nvm_get_info_regulatory_v1 regulatory;250} __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_3 */251 252/**253 * struct iwl_nvm_get_info_rsp - response to get NVM data254 * @general: general NVM data255 * @mac_sku: data relating to MAC sku256 * @phy_sku: data relating to PHY sku257 * @regulatory: regulatory data258 */259struct iwl_nvm_get_info_rsp {260	struct iwl_nvm_get_info_general general;261	struct iwl_nvm_get_info_sku mac_sku;262	struct iwl_nvm_get_info_phy phy_sku;263	struct iwl_nvm_get_info_regulatory regulatory;264} __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_4 */265 266/**267 * struct iwl_nvm_access_complete_cmd - NVM_ACCESS commands are completed268 * @reserved: reserved269 */270struct iwl_nvm_access_complete_cmd {271	__le32 reserved;272} __packed; /* NVM_ACCESS_COMPLETE_CMD_API_S_VER_1 */273 274#define IWL_MCC_US	0x5553275#define IWL_MCC_CANADA	0x4341276 277/**278 * struct iwl_mcc_update_cmd - Request the device to update geographic279 * regulatory profile according to the given MCC (Mobile Country Code).280 * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.281 * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the282 * MCC in the cmd response will be the relevant MCC in the NVM.283 * @mcc: given mobile country code284 * @source_id: the source from where we got the MCC, see iwl_mcc_source285 * @reserved: reserved for alignment286 * @key: integrity key for MCC API OEM testing287 * @reserved2: reserved288 */289struct iwl_mcc_update_cmd {290	__le16 mcc;291	u8 source_id;292	u8 reserved;293	__le32 key;294	u8 reserved2[20];295} __packed; /* LAR_UPDATE_MCC_CMD_API_S_VER_2 */296 297/**298 * enum iwl_geo_information - geographic information.299 * @GEO_NO_INFO: no special info for this geo profile.300 * @GEO_WMM_ETSI_5GHZ_INFO: this geo profile limits the WMM params301 *	for the 5 GHz band.302 */303enum iwl_geo_information {304	GEO_NO_INFO =			0,305	GEO_WMM_ETSI_5GHZ_INFO =	BIT(0),306};307 308/**309 * struct iwl_mcc_update_resp_v3 - response to MCC_UPDATE_CMD.310 * Contains the new channel control profile map, if changed, and the new MCC311 * (mobile country code).312 * The new MCC may be different than what was requested in MCC_UPDATE_CMD.313 * @status: see &enum iwl_mcc_update_status314 * @mcc: the new applied MCC315 * @cap: capabilities for all channels which matches the MCC316 * @source_id: the MCC source, see iwl_mcc_source317 * @time: time elapsed from the MCC test start (in units of 30 seconds)318 * @geo_info: geographic specific profile information319 *	see &enum iwl_geo_information.320 * @n_channels: number of channels in @channels_data.321 * @channels: channel control data map, DWORD for each channel. Only the first322 *	16bits are used.323 */324struct iwl_mcc_update_resp_v3 {325	__le32 status;326	__le16 mcc;327	u8 cap;328	u8 source_id;329	__le16 time;330	__le16 geo_info;331	__le32 n_channels;332	__le32 channels[];333} __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_3 */334 335/**336 * struct iwl_mcc_update_resp_v4 - response to MCC_UPDATE_CMD.337 * Contains the new channel control profile map, if changed, and the new MCC338 * (mobile country code).339 * The new MCC may be different than what was requested in MCC_UPDATE_CMD.340 * @status: see &enum iwl_mcc_update_status341 * @mcc: the new applied MCC342 * @cap: capabilities for all channels which matches the MCC343 * @time: time elapsed from the MCC test start (in units of 30 seconds)344 * @geo_info: geographic specific profile information345 *	see &enum iwl_geo_information.346 * @source_id: the MCC source, see iwl_mcc_source347 * @reserved: for four bytes alignment.348 * @n_channels: number of channels in @channels_data.349 * @channels: channel control data map, DWORD for each channel. Only the first350 *	16bits are used.351 */352struct iwl_mcc_update_resp_v4 {353	__le32 status;354	__le16 mcc;355	__le16 cap;356	__le16 time;357	__le16 geo_info;358	u8 source_id;359	u8 reserved[3];360	__le32 n_channels;361	__le32 channels[];362} __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_4 */363 364/**365 * struct iwl_mcc_update_resp_v8 - response to MCC_UPDATE_CMD.366 * Contains the new channel control profile map, if changed, and the new MCC367 * (mobile country code).368 * The new MCC may be different than what was requested in MCC_UPDATE_CMD.369 * @status: see &enum iwl_mcc_update_status370 * @mcc: the new applied MCC371 * @padding: padding for 2 bytes.372 * @cap: capabilities for all channels which matches the MCC373 * @time: time elapsed from the MCC test start (in units of 30 seconds)374 * @geo_info: geographic specific profile information375 *     see &enum iwl_geo_information.376 * @source_id: the MCC source, see iwl_mcc_source377 * @reserved: for four bytes alignment.378 * @n_channels: number of channels in @channels_data.379 * @channels: channel control data map, DWORD for each channel. Only the first380 *     16bits are used.381 */382struct iwl_mcc_update_resp_v8 {383	__le32 status;384	__le16 mcc;385	u8 padding[2];386	__le32 cap;387	__le16 time;388	__le16 geo_info;389	u8 source_id;390	u8 reserved[3];391	__le32 n_channels;392	__le32 channels[];393} __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_8 */394 395/**396 * struct iwl_mcc_chub_notif - chub notifies of mcc change397 * (MCC_CHUB_UPDATE_CMD = 0xc9)398 * The Chub (Communication Hub, CommsHUB) is a HW component that connects to399 * the cellular and connectivity cores that gets updates of the mcc, and400 * notifies the ucode directly of any mcc change.401 * The ucode requests the driver to request the device to update geographic402 * regulatory  profile according to the given MCC (Mobile Country Code).403 * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.404 * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the405 * MCC in the cmd response will be the relevant MCC in the NVM.406 * @mcc: given mobile country code407 * @source_id: identity of the change originator, see iwl_mcc_source408 * @reserved1: reserved for alignment409 */410struct iwl_mcc_chub_notif {411	__le16 mcc;412	u8 source_id;413	u8 reserved1;414} __packed; /* LAR_MCC_NOTIFY_S */415 416enum iwl_mcc_update_status {417	MCC_RESP_NEW_CHAN_PROFILE,418	MCC_RESP_SAME_CHAN_PROFILE,419	MCC_RESP_INVALID,420	MCC_RESP_NVM_DISABLED,421	MCC_RESP_ILLEGAL,422	MCC_RESP_LOW_PRIORITY,423	MCC_RESP_TEST_MODE_ACTIVE,424	MCC_RESP_TEST_MODE_NOT_ACTIVE,425	MCC_RESP_TEST_MODE_DENIAL_OF_SERVICE,426};427 428enum iwl_mcc_source {429	MCC_SOURCE_OLD_FW = 0,430	MCC_SOURCE_ME = 1,431	MCC_SOURCE_BIOS = 2,432	MCC_SOURCE_3G_LTE_HOST = 3,433	MCC_SOURCE_3G_LTE_DEVICE = 4,434	MCC_SOURCE_WIFI = 5,435	MCC_SOURCE_RESERVED = 6,436	MCC_SOURCE_DEFAULT = 7,437	MCC_SOURCE_UNINITIALIZED = 8,438	MCC_SOURCE_MCC_API = 9,439	MCC_SOURCE_GET_CURRENT = 0x10,440	MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11,441};442 443#define IWL_WTAS_BLACK_LIST_MAX		16444/**445 * struct iwl_tas_config_cmd_common - configures the TAS.446 * This is also the v2 structure.447 * @block_list_size: size of relevant field in block_list_array448 * @block_list_array: list of countries where TAS must be disabled449 */450struct iwl_tas_config_cmd_common {451	__le32 block_list_size;452	__le32 block_list_array[IWL_WTAS_BLACK_LIST_MAX];453} __packed; /* TAS_CONFIG_CMD_API_S_VER_2 */454 455/**456 * struct iwl_tas_config_cmd_v3 - configures the TAS457 * @override_tas_iec: indicates whether to override default value of IEC regulatory458 * @enable_tas_iec: in case override_tas_iec is set -459 *	indicates whether IEC regulatory is enabled or disabled460 */461struct iwl_tas_config_cmd_v3 {462	__le16 override_tas_iec;463	__le16 enable_tas_iec;464} __packed; /* TAS_CONFIG_CMD_API_S_VER_3 */465 466/**467 * struct iwl_tas_config_cmd_v4 - configures the TAS468 * @override_tas_iec: indicates whether to override default value of IEC regulatory469 * @enable_tas_iec: in case override_tas_iec is set -470 *	indicates whether IEC regulatory is enabled or disabled471 * @usa_tas_uhb_allowed: if set, allow TAS UHB in the USA472 * @reserved: reserved473*/474struct iwl_tas_config_cmd_v4 {475	u8 override_tas_iec;476	u8 enable_tas_iec;477	u8 usa_tas_uhb_allowed;478	u8 reserved;479} __packed; /* TAS_CONFIG_CMD_API_S_VER_4 */480 481struct iwl_tas_config_cmd {482	struct iwl_tas_config_cmd_common common;483	union {484		struct iwl_tas_config_cmd_v3 v3;485		struct iwl_tas_config_cmd_v4 v4;486	};487};488 489/**490 * enum iwl_lari_config_masks - bit masks for the various LARI config operations491 * @LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK: disable 11ac in ukraine492 * @LARI_CONFIG_CHANGE_ETSI_TO_PASSIVE_MSK: ETSI 5.8GHz SRD passive scan493 * @LARI_CONFIG_CHANGE_ETSI_TO_DISABLED_MSK: ETSI 5.8GHz SRD disabled494 * @LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK: enable 5.15/5.35GHz bands in495 * 	Indonesia496 * @LARI_CONFIG_ENABLE_CHINA_22_REG_SUPPORT_MSK: enable 2022 china regulatory497 */498enum iwl_lari_config_masks {499	LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK		= BIT(0),500	LARI_CONFIG_CHANGE_ETSI_TO_PASSIVE_MSK		= BIT(1),501	LARI_CONFIG_CHANGE_ETSI_TO_DISABLED_MSK		= BIT(2),502	LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK		= BIT(3),503	LARI_CONFIG_ENABLE_CHINA_22_REG_SUPPORT_MSK	= BIT(7),504};505 506#define IWL_11AX_UKRAINE_MASK 3507#define IWL_11AX_UKRAINE_SHIFT 8508 509/**510 * struct iwl_lari_config_change_cmd_v1 - change LARI configuration511 * @config_bitmap: bit map of the config commands. each bit will trigger a512 * different predefined FW config operation513 */514struct iwl_lari_config_change_cmd_v1 {515	__le32 config_bitmap;516} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_1 */517 518/**519 * struct iwl_lari_config_change_cmd_v2 - change LARI configuration520 * @config_bitmap: bit map of the config commands. each bit will trigger a521 * different predefined FW config operation522 * @oem_uhb_allow_bitmap: bitmap of UHB enabled MCC sets523 */524struct iwl_lari_config_change_cmd_v2 {525	__le32 config_bitmap;526	__le32 oem_uhb_allow_bitmap;527} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_2 */528 529/**530 * struct iwl_lari_config_change_cmd_v3 - change LARI configuration531 * @config_bitmap: bit map of the config commands. each bit will trigger a532 * different predefined FW config operation533 * @oem_uhb_allow_bitmap: bitmap of UHB enabled MCC sets534 * @oem_11ax_allow_bitmap: bitmap of 11ax allowed MCCs.535 * For each supported country, a pair of regulatory override bit and 11ax mode exist536 * in the bit field.537 */538struct iwl_lari_config_change_cmd_v3 {539	__le32 config_bitmap;540	__le32 oem_uhb_allow_bitmap;541	__le32 oem_11ax_allow_bitmap;542} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_3 */543 544/**545 * struct iwl_lari_config_change_cmd_v4 - change LARI configuration546 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a547 *     different predefined FW config operation.548 * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets.549 * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits550 *     per country, one to indicate whether to override and the other to551 *     indicate the value to use.552 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits553 *     per country, one to indicate whether to override and the other to554 *     indicate allow/disallow unii4 channels.555 */556struct iwl_lari_config_change_cmd_v4 {557	__le32 config_bitmap;558	__le32 oem_uhb_allow_bitmap;559	__le32 oem_11ax_allow_bitmap;560	__le32 oem_unii4_allow_bitmap;561} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_4 */562 563/**564 * struct iwl_lari_config_change_cmd_v5 - change LARI configuration565 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a566 *     different predefined FW config operation.567 * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets.568 * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits569 *     per country, one to indicate whether to override and the other to570 *     indicate the value to use.571 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits572 *     per country, one to indicate whether to override and the other to573 *     indicate allow/disallow unii4 channels.574 * @chan_state_active_bitmap: Bitmap for overriding channel state to active.575 *     Each bit represents a country or region to activate, according to the BIOS576 *     definitions.577 */578struct iwl_lari_config_change_cmd_v5 {579	__le32 config_bitmap;580	__le32 oem_uhb_allow_bitmap;581	__le32 oem_11ax_allow_bitmap;582	__le32 oem_unii4_allow_bitmap;583	__le32 chan_state_active_bitmap;584} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_5 */585 586/**587 * struct iwl_lari_config_change_cmd_v6 - change LARI configuration588 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a589 *     different predefined FW config operation.590 * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets.591 * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits592 *     per country, one to indicate whether to override and the other to593 *     indicate the value to use.594 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits595 *     per country, one to indicate whether to override and the other to596 *     indicate allow/disallow unii4 channels.597 * @chan_state_active_bitmap: Bitmap for overriding channel state to active.598 *     Each bit represents a country or region to activate, according to the BIOS599 *     definitions.600 * @force_disable_channels_bitmap: Bitmap of disabled bands/channels.601 *     Each bit represents a set of channels in a specific band that should be disabled602 */603struct iwl_lari_config_change_cmd_v6 {604	__le32 config_bitmap;605	__le32 oem_uhb_allow_bitmap;606	__le32 oem_11ax_allow_bitmap;607	__le32 oem_unii4_allow_bitmap;608	__le32 chan_state_active_bitmap;609	__le32 force_disable_channels_bitmap;610} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_6 */611 612/**613 * struct iwl_lari_config_change_cmd_v7 - change LARI configuration614 * This structure is used also for lari cmd version 8 and 9.615 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a616 *     different predefined FW config operation.617 * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets.618 * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits619 *     per country, one to indicate whether to override and the other to620 *     indicate the value to use.621 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits622 *     per country, one to indicate whether to override and the other to623 *     indicate allow/disallow unii4 channels.624 *     For LARI cmd version 4 to 8 - bits 0:3 are supported.625 *     For LARI cmd version 9 - bits 0:5 are supported.626 * @chan_state_active_bitmap: Bitmap to enable different bands per country627 *     or region.628 *     Each bit represents a country or region, and a band to activate629 *     according to the BIOS definitions.630 *     For LARI cmd version 7 - bits 0:3 are supported.631 *     For LARI cmd version 8 - bits 0:4 are supported.632 * @force_disable_channels_bitmap: Bitmap of disabled bands/channels.633 *     Each bit represents a set of channels in a specific band that should be634 *     disabled635 * @edt_bitmap: Bitmap of energy detection threshold table.636 *	Disable/enable the EDT optimization method for different band.637 */638struct iwl_lari_config_change_cmd_v7 {639	__le32 config_bitmap;640	__le32 oem_uhb_allow_bitmap;641	__le32 oem_11ax_allow_bitmap;642	__le32 oem_unii4_allow_bitmap;643	__le32 chan_state_active_bitmap;644	__le32 force_disable_channels_bitmap;645	__le32 edt_bitmap;646} __packed;647/* LARI_CHANGE_CONF_CMD_S_VER_7 */648/* LARI_CHANGE_CONF_CMD_S_VER_8 */649/* LARI_CHANGE_CONF_CMD_S_VER_9 */650 651/**652 * struct iwl_lari_config_change_cmd_v10 - change LARI configuration653 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a654 *	different predefined FW config operation.655 * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets.656 * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits657 *	per country, one to indicate whether to override and the other to658 *	indicate the value to use.659 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits660 *	per country, one to indicate whether to override and the other to661 *	indicate allow/disallow unii4 channels.662 *	For LARI cmd version 10 - bits 0:5 are supported.663 * @chan_state_active_bitmap: Bitmap to enable different bands per country664 *	or region.665 *	Each bit represents a country or region, and a band to activate666 *	according to the BIOS definitions.667 *	For LARI cmd version 10 - bits 0:4 are supported.668 * @force_disable_channels_bitmap: Bitmap of disabled bands/channels.669 *	Each bit represents a set of channels in a specific band that should be670 *	disabled671 * @edt_bitmap: Bitmap of energy detection threshold table.672 *	Disable/enable the EDT optimization method for different band.673 * @oem_320mhz_allow_bitmap: 320Mhz bandwidth enablement bitmap per MCC.674 *	bit0: enable 320Mhz in Japan.675 *	bit1: enable 320Mhz in South Korea.676 *	bit 2 - 31: reserved.677 */678struct iwl_lari_config_change_cmd_v10 {679	__le32 config_bitmap;680	__le32 oem_uhb_allow_bitmap;681	__le32 oem_11ax_allow_bitmap;682	__le32 oem_unii4_allow_bitmap;683	__le32 chan_state_active_bitmap;684	__le32 force_disable_channels_bitmap;685	__le32 edt_bitmap;686	__le32 oem_320mhz_allow_bitmap;687} __packed;688/* LARI_CHANGE_CONF_CMD_S_VER_10 */689 690/**691 * struct iwl_lari_config_change_cmd - change LARI configuration692 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a693 *	different predefined FW config operation.694 * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets.695 * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits696 *	per country, one to indicate whether to override and the other to697 *	indicate the value to use.698 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits699 *	per country, one to indicate whether to override and the other to700 *	indicate allow/disallow unii4 channels.701 *	For LARI cmd version 11 - bits 0:5 are supported.702 * @chan_state_active_bitmap: Bitmap to enable different bands per country703 *	or region.704 *	Each bit represents a country or region, and a band to activate705 *	according to the BIOS definitions.706 *	For LARI cmd version 11 - bits 0:4 are supported.707 *	For LARI cmd version 12 - bits 0:6 are supported and bits 7:31 are708 *	reserved. No need to mask out the reserved bits.709 * @force_disable_channels_bitmap: Bitmap of disabled bands/channels.710 *	Each bit represents a set of channels in a specific band that should be711 *	disabled712 * @edt_bitmap: Bitmap of energy detection threshold table.713 *	Disable/enable the EDT optimization method for different band.714 * @oem_320mhz_allow_bitmap: 320Mhz bandwidth enablement bitmap per MCC.715 *	bit0: enable 320Mhz in Japan.716 *	bit1: enable 320Mhz in South Korea.717 *	bit 2 - 31: reserved.718 * @oem_11be_allow_bitmap: Bitmap of 11be allowed MCCs. No need to mask out the719 *	unsupported bits720 *	bit0: enable 11be in China(CB/CN).721 *	bit1: enable 11be in South Korea.722 *	bit 2 - 31: reserved.723 */724struct iwl_lari_config_change_cmd {725	__le32 config_bitmap;726	__le32 oem_uhb_allow_bitmap;727	__le32 oem_11ax_allow_bitmap;728	__le32 oem_unii4_allow_bitmap;729	__le32 chan_state_active_bitmap;730	__le32 force_disable_channels_bitmap;731	__le32 edt_bitmap;732	__le32 oem_320mhz_allow_bitmap;733	__le32 oem_11be_allow_bitmap;734} __packed;735/* LARI_CHANGE_CONF_CMD_S_VER_11 */736/* LARI_CHANGE_CONF_CMD_S_VER_12 */737 738/* Activate UNII-1 (5.2GHz) for World Wide */739#define ACTIVATE_5G2_IN_WW_MASK			BIT(4)740#define CHAN_STATE_ACTIVE_BITMAP_CMD_V11	0x1F741 742/**743 * struct iwl_pnvm_init_complete_ntfy - PNVM initialization complete744 * @status: PNVM image loading status745 */746struct iwl_pnvm_init_complete_ntfy {747	__le32 status;748} __packed; /* PNVM_INIT_COMPLETE_NTFY_S_VER_1 */749 750#define UATS_TABLE_ROW_SIZE	26751#define UATS_TABLE_COL_SIZE	13752 753/**754 * struct iwl_mcc_allowed_ap_type_cmd - struct for MCC_ALLOWED_AP_TYPE_CMD755 * @offset_map: mapping a mcc to UHB AP type support (UATS) allowed756 * @reserved: reserved757 */758struct iwl_mcc_allowed_ap_type_cmd {759	u8 offset_map[UATS_TABLE_ROW_SIZE][UATS_TABLE_COL_SIZE];760	__le16 reserved;761} __packed; /* MCC_ALLOWED_AP_TYPE_CMD_API_S_VER_1 */762 763#endif /* __iwl_fw_api_nvm_reg_h__ */764