1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
3 * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
7 #ifndef __iwl_fw_api_nvm_reg_h__
8 #define __iwl_fw_api_nvm_reg_h__
11 * enum iwl_regulatory_and_nvm_subcmd_ids - regulatory/NVM commands
13 enum iwl_regulatory_and_nvm_subcmd_ids {
15 * @NVM_ACCESS_COMPLETE: &struct iwl_nvm_access_complete_cmd
17 NVM_ACCESS_COMPLETE = 0x0,
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 or
28 * &struct iwl_lari_config_change_cmd
30 LARI_CONFIG_CHANGE = 0x1,
34 * Command is &struct iwl_nvm_get_info,
35 * response is &struct iwl_nvm_get_info_rsp
40 * @TAS_CONFIG: &union iwl_tas_config_cmd
45 * @SAR_OFFSET_MAPPING_TABLE_CMD: &struct iwl_sar_offset_mapping_cmd
47 SAR_OFFSET_MAPPING_TABLE_CMD = 0x4,
50 * @MCC_ALLOWED_AP_TYPE_CMD: &struct iwl_mcc_allowed_ap_type_cmd
52 MCC_ALLOWED_AP_TYPE_CMD = 0x5,
55 * @PNVM_INIT_COMPLETE_NTFY: &struct iwl_pnvm_init_complete_ntfy
57 PNVM_INIT_COMPLETE_NTFY = 0xFE,
61 * enum iwl_nvm_access_op - NVM access opcode
62 * @IWL_NVM_READ: read NVM
63 * @IWL_NVM_WRITE: write NVM
65 enum iwl_nvm_access_op {
71 * enum iwl_nvm_access_target - target of the NVM_ACCESS_CMD
72 * @NVM_ACCESS_TARGET_CACHE: access the cache
73 * @NVM_ACCESS_TARGET_OTP: access the OTP
74 * @NVM_ACCESS_TARGET_EEPROM: access the EEPROM
76 enum iwl_nvm_access_target {
77 NVM_ACCESS_TARGET_CACHE = 0,
78 NVM_ACCESS_TARGET_OTP = 1,
79 NVM_ACCESS_TARGET_EEPROM = 2,
83 * enum iwl_nvm_section_type - section types for NVM_ACCESS_CMD
84 * @NVM_SECTION_TYPE_SW: software section
85 * @NVM_SECTION_TYPE_REGULATORY: regulatory section
86 * @NVM_SECTION_TYPE_CALIBRATION: calibration section
87 * @NVM_SECTION_TYPE_PRODUCTION: production section
88 * @NVM_SECTION_TYPE_REGULATORY_SDP: regulatory section used by 3168 series
89 * @NVM_SECTION_TYPE_MAC_OVERRIDE: MAC override section
90 * @NVM_SECTION_TYPE_PHY_SKU: PHY SKU section
91 * @NVM_MAX_NUM_SECTIONS: number of sections
93 enum 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,
105 * struct iwl_nvm_access_cmd - Request the device to send an NVM section
106 * @op_code: &enum iwl_nvm_access_op
107 * @target: &enum iwl_nvm_access_target
108 * @type: &enum iwl_nvm_section_type
109 * @offset: offset in bytes into the section
110 * @length: in bytes, to read/write
111 * @data: if write operation, the data to write. On read its empty
113 struct iwl_nvm_access_cmd {
120 } __packed; /* NVM_ACCESS_CMD_API_S_VER_2 */
123 * struct iwl_nvm_access_resp - response to NVM_ACCESS_CMD
124 * @offset: offset in bytes into the section
125 * @length: in bytes, either how much was written or read
126 * @type: NVM_SECTION_TYPE_*
127 * @status: 0 for success, fail otherwise
128 * @data: if read operation, the data returned. Empty on write.
130 struct iwl_nvm_access_resp {
136 } __packed; /* NVM_ACCESS_CMD_RESP_API_S_VER_2 */
139 * struct iwl_nvm_get_info - request to get NVM data
141 struct iwl_nvm_get_info {
143 } __packed; /* REGULATORY_NVM_GET_INFO_CMD_API_S_VER_1 */
146 * enum iwl_nvm_info_general_flags - flags in NVM_GET_INFO resp
147 * @NVM_GENERAL_FLAGS_EMPTY_OTP: 1 if OTP is empty
149 enum iwl_nvm_info_general_flags {
150 NVM_GENERAL_FLAGS_EMPTY_OTP = BIT(0),
154 * struct iwl_nvm_get_info_general - general NVM data
155 * @flags: bit 0: 1 - empty, 0 - non-empty
156 * @nvm_version: nvm version
157 * @board_type: board type
158 * @n_hw_addrs: number of reserved MAC addresses
160 struct iwl_nvm_get_info_general {
165 } __packed; /* REGULATORY_NVM_GET_INFO_GENERAL_S_VER_2 */
168 * enum iwl_nvm_mac_sku_flags - flags in &iwl_nvm_get_info_sku
169 * @NVM_MAC_SKU_FLAGS_BAND_2_4_ENABLED: true if 2.4 band enabled
170 * @NVM_MAC_SKU_FLAGS_BAND_5_2_ENABLED: true if 5.2 band enabled
171 * @NVM_MAC_SKU_FLAGS_802_11N_ENABLED: true if 11n enabled
172 * @NVM_MAC_SKU_FLAGS_802_11AC_ENABLED: true if 11ac enabled
173 * @NVM_MAC_SKU_FLAGS_MIMO_DISABLED: true if MIMO disabled
174 * @NVM_MAC_SKU_FLAGS_WAPI_ENABLED: true if WAPI enabled
175 * @NVM_MAC_SKU_FLAGS_REG_CHECK_ENABLED: true if regulatory checker enabled
176 * @NVM_MAC_SKU_FLAGS_API_LOCK_ENABLED: true if API lock enabled
178 enum 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),
184 * @NVM_MAC_SKU_FLAGS_802_11AX_ENABLED: true if 11ax enabled
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),
194 * struct iwl_nvm_get_info_sku - mac information
195 * @mac_sku_flags: flags for SKU, see &enum iwl_nvm_mac_sku_flags
197 struct iwl_nvm_get_info_sku {
198 __le32 mac_sku_flags;
199 } __packed; /* REGULATORY_NVM_GET_INFO_MAC_SKU_SECTION_S_VER_2 */
202 * struct iwl_nvm_get_info_phy - phy information
203 * @tx_chains: BIT 0 chain A, BIT 1 chain B
204 * @rx_chains: BIT 0 chain A, BIT 1 chain B
206 struct iwl_nvm_get_info_phy {
209 } __packed; /* REGULATORY_NVM_GET_INFO_PHY_SKU_SECTION_S_VER_1 */
211 #define IWL_NUM_CHANNELS_V1 51
212 #define IWL_NUM_CHANNELS 110
215 * struct iwl_nvm_get_info_regulatory_v1 - regulatory information
216 * @lar_enabled: is LAR enabled
217 * @channel_profile: regulatory data of this channel
218 * @reserved: reserved
220 struct iwl_nvm_get_info_regulatory_v1 {
222 __le16 channel_profile[IWL_NUM_CHANNELS_V1];
224 } __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_1 */
227 * struct iwl_nvm_get_info_regulatory - regulatory information
228 * @lar_enabled: is LAR enabled
229 * @n_channels: number of valid channels in the array
230 * @channel_profile: regulatory data of this channel
232 struct iwl_nvm_get_info_regulatory {
235 __le32 channel_profile[IWL_NUM_CHANNELS];
236 } __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_2 */
239 * struct iwl_nvm_get_info_rsp_v3 - response to get NVM data
240 * @general: general NVM data
241 * @mac_sku: data relating to MAC sku
242 * @phy_sku: data relating to PHY sku
243 * @regulatory: regulatory data
245 struct 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 */
253 * struct iwl_nvm_get_info_rsp - response to get NVM data
254 * @general: general NVM data
255 * @mac_sku: data relating to MAC sku
256 * @phy_sku: data relating to PHY sku
257 * @regulatory: regulatory data
259 struct 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 */
267 * struct iwl_nvm_access_complete_cmd - NVM_ACCESS commands are completed
268 * @reserved: reserved
270 struct iwl_nvm_access_complete_cmd {
272 } __packed; /* NVM_ACCESS_COMPLETE_CMD_API_S_VER_1 */
274 #define IWL_MCC_US 0x5553
275 #define IWL_MCC_CANADA 0x4341
278 * struct iwl_mcc_update_cmd - Request the device to update geographic
279 * 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, the
282 * MCC in the cmd response will be the relevant MCC in the NVM.
283 * @mcc: given mobile country code
284 * @source_id: the source from where we got the MCC, see iwl_mcc_source
285 * @reserved: reserved for alignment
286 * @key: integrity key for MCC API OEM testing
287 * @reserved2: reserved
289 struct iwl_mcc_update_cmd {
295 } __packed; /* LAR_UPDATE_MCC_CMD_API_S_VER_2 */
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 params
301 * for the 5 GHz band.
303 enum iwl_geo_information {
305 GEO_WMM_ETSI_5GHZ_INFO = BIT(0),
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 MCC
311 * (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_status
314 * @mcc: the new applied MCC
315 * @cap: capabilities for all channels which matches the MCC
316 * @source_id: the MCC source, see iwl_mcc_source
317 * @time: time elapsed from the MCC test start (in units of 30 seconds)
318 * @geo_info: geographic specific profile information
319 * 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 first
324 struct iwl_mcc_update_resp_v3 {
333 } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_3 */
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 MCC
338 * (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_status
341 * @mcc: the new applied MCC
342 * @cap: capabilities for all channels which matches the MCC
343 * @time: time elapsed from the MCC test start (in units of 30 seconds)
344 * @geo_info: geographic specific profile information
345 * see &enum iwl_geo_information.
346 * @source_id: the MCC source, see iwl_mcc_source
347 * @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 first
352 struct iwl_mcc_update_resp_v4 {
362 } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_4 */
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 MCC
367 * (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_status
370 * @mcc: the new applied MCC
371 * @padding: padding for 2 bytes.
372 * @cap: capabilities for all channels which matches the MCC
373 * @time: time elapsed from the MCC test start (in units of 30 seconds)
374 * @geo_info: geographic specific profile information
375 * see &enum iwl_geo_information.
376 * @source_id: the MCC source, see iwl_mcc_source
377 * @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 first
382 struct iwl_mcc_update_resp_v8 {
393 } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_8 */
396 * struct iwl_mcc_chub_notif - chub notifies of mcc change
397 * (MCC_CHUB_UPDATE_CMD = 0xc9)
398 * The Chub (Communication Hub, CommsHUB) is a HW component that connects to
399 * the cellular and connectivity cores that gets updates of the mcc, and
400 * notifies the ucode directly of any mcc change.
401 * The ucode requests the driver to request the device to update geographic
402 * 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, the
405 * MCC in the cmd response will be the relevant MCC in the NVM.
406 * @mcc: given mobile country code
407 * @source_id: identity of the change originator, see iwl_mcc_source
408 * @reserved1: reserved for alignment
410 struct iwl_mcc_chub_notif {
414 } __packed; /* LAR_MCC_NOTIFY_S */
416 enum iwl_mcc_update_status {
417 MCC_RESP_NEW_CHAN_PROFILE,
418 MCC_RESP_SAME_CHAN_PROFILE,
420 MCC_RESP_NVM_DISABLED,
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,
428 enum iwl_mcc_source {
429 MCC_SOURCE_OLD_FW = 0,
432 MCC_SOURCE_3G_LTE_HOST = 3,
433 MCC_SOURCE_3G_LTE_DEVICE = 4,
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,
443 #define IWL_WTAS_BLACK_LIST_MAX 16
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_array
448 * @block_list_array: list of countries where TAS must be disabled
450 struct 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 */
456 * struct iwl_tas_config_cmd_v3 - configures the TAS
457 * @override_tas_iec: indicates whether to override default value of IEC regulatory
458 * @enable_tas_iec: in case override_tas_iec is set -
459 * indicates whether IEC regulatory is enabled or disabled
461 struct iwl_tas_config_cmd_v3 {
462 __le16 override_tas_iec;
463 __le16 enable_tas_iec;
464 } __packed; /* TAS_CONFIG_CMD_API_S_VER_3 */
467 * struct iwl_tas_config_cmd_v4 - configures the TAS
468 * @override_tas_iec: indicates whether to override default value of IEC regulatory
469 * @enable_tas_iec: in case override_tas_iec is set -
470 * indicates whether IEC regulatory is enabled or disabled
471 * @usa_tas_uhb_allowed: if set, allow TAS UHB in the USA
472 * @reserved: reserved
474 struct iwl_tas_config_cmd_v4 {
477 u8 usa_tas_uhb_allowed;
479 } __packed; /* TAS_CONFIG_CMD_API_S_VER_4 */
481 struct iwl_tas_config_cmd {
482 struct iwl_tas_config_cmd_common common;
484 struct iwl_tas_config_cmd_v3 v3;
485 struct iwl_tas_config_cmd_v4 v4;
490 * enum iwl_lari_config_masks - bit masks for the various LARI config operations
491 * @LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK: disable 11ac in ukraine
492 * @LARI_CONFIG_CHANGE_ETSI_TO_PASSIVE_MSK: ETSI 5.8GHz SRD passive scan
493 * @LARI_CONFIG_CHANGE_ETSI_TO_DISABLED_MSK: ETSI 5.8GHz SRD disabled
494 * @LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK: enable 5.15/5.35GHz bands in
496 * @LARI_CONFIG_ENABLE_CHINA_22_REG_SUPPORT_MSK: enable 2022 china regulatory
498 enum 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),
506 #define IWL_11AX_UKRAINE_MASK 3
507 #define IWL_11AX_UKRAINE_SHIFT 8
510 * struct iwl_lari_config_change_cmd_v1 - change LARI configuration
511 * @config_bitmap: bit map of the config commands. each bit will trigger a
512 * different predefined FW config operation
514 struct iwl_lari_config_change_cmd_v1 {
515 __le32 config_bitmap;
516 } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_1 */
519 * struct iwl_lari_config_change_cmd_v2 - change LARI configuration
520 * @config_bitmap: bit map of the config commands. each bit will trigger a
521 * different predefined FW config operation
522 * @oem_uhb_allow_bitmap: bitmap of UHB enabled MCC sets
524 struct 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 */
530 * struct iwl_lari_config_change_cmd_v3 - change LARI configuration
531 * @config_bitmap: bit map of the config commands. each bit will trigger a
532 * different predefined FW config operation
533 * @oem_uhb_allow_bitmap: bitmap of UHB enabled MCC sets
534 * @oem_11ax_allow_bitmap: bitmap of 11ax allowed MCCs.
535 * For each supported country, a pair of regulatory override bit and 11ax mode exist
538 struct 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 */
545 * struct iwl_lari_config_change_cmd_v4 - change LARI configuration
546 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a
547 * 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 bits
550 * per country, one to indicate whether to override and the other to
551 * indicate the value to use.
552 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits
553 * per country, one to indicate whether to override and the other to
554 * indicate allow/disallow unii4 channels.
556 struct 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 */
564 * struct iwl_lari_config_change_cmd_v5 - change LARI configuration
565 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a
566 * 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 bits
569 * per country, one to indicate whether to override and the other to
570 * indicate the value to use.
571 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits
572 * per country, one to indicate whether to override and the other to
573 * 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 BIOS
578 struct 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 */
587 * struct iwl_lari_config_change_cmd_v6 - change LARI configuration
588 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a
589 * 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 bits
592 * per country, one to indicate whether to override and the other to
593 * indicate the value to use.
594 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits
595 * per country, one to indicate whether to override and the other to
596 * 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 BIOS
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 disabled
603 struct 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 */
613 * struct iwl_lari_config_change_cmd_v7 - change LARI configuration
614 * This structure is used also for lari cmd version 8 and 9.
615 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a
616 * 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 bits
619 * per country, one to indicate whether to override and the other to
620 * indicate the value to use.
621 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits
622 * per country, one to indicate whether to override and the other to
623 * 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 country
628 * Each bit represents a country or region, and a band to activate
629 * 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 be
635 * @edt_bitmap: Bitmap of energy detection threshold table.
636 * Disable/enable the EDT optimization method for different band.
638 struct 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;
647 /* LARI_CHANGE_CONF_CMD_S_VER_7 */
648 /* LARI_CHANGE_CONF_CMD_S_VER_8 */
649 /* LARI_CHANGE_CONF_CMD_S_VER_9 */
652 * struct iwl_lari_config_change_cmd_v10 - change LARI configuration
653 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a
654 * 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 bits
657 * per country, one to indicate whether to override and the other to
658 * indicate the value to use.
659 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits
660 * per country, one to indicate whether to override and the other to
661 * 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 country
665 * Each bit represents a country or region, and a band to activate
666 * 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 be
671 * @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.
678 struct 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;
686 __le32 oem_320mhz_allow_bitmap;
688 /* LARI_CHANGE_CONF_CMD_S_VER_10 */
691 * struct iwl_lari_config_change_cmd - change LARI configuration
692 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a
693 * 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 bits
696 * per country, one to indicate whether to override and the other to
697 * indicate the value to use.
698 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits
699 * per country, one to indicate whether to override and the other to
700 * 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 country
704 * Each bit represents a country or region, and a band to activate
705 * 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 are
708 * 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 be
712 * @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 the
720 * bit0: enable 11be in China(CB/CN).
721 * bit1: enable 11be in South Korea.
722 * bit 2 - 31: reserved.
724 struct 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;
732 __le32 oem_320mhz_allow_bitmap;
733 __le32 oem_11be_allow_bitmap;
735 /* LARI_CHANGE_CONF_CMD_S_VER_11 */
736 /* LARI_CHANGE_CONF_CMD_S_VER_12 */
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 0x1F
743 * struct iwl_pnvm_init_complete_ntfy - PNVM initialization complete
744 * @status: PNVM image loading status
746 struct iwl_pnvm_init_complete_ntfy {
748 } __packed; /* PNVM_INIT_COMPLETE_NTFY_S_VER_1 */
750 #define UATS_TABLE_ROW_SIZE 26
751 #define UATS_TABLE_COL_SIZE 13
754 * struct iwl_mcc_allowed_ap_type_cmd - struct for MCC_ALLOWED_AP_TYPE_CMD
755 * @offset_map: mapping a mcc to UHB AP type support (UATS) allowed
756 * @reserved: reserved
758 struct iwl_mcc_allowed_ap_type_cmd {
759 u8 offset_map[UATS_TABLE_ROW_SIZE][UATS_TABLE_COL_SIZE];
761 } __packed; /* MCC_ALLOWED_AP_TYPE_CMD_API_S_VER_1 */
763 #endif /* __iwl_fw_api_nvm_reg_h__ */