Path: blob/main/sys/contrib/dev/iwlwifi/fw/api/nvm-reg.h
48425 views
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */1/*2* Copyright (C) 2012-2014, 2018-2025 Intel Corporation3* Copyright (C) 2013-2015 Intel Mobile Communications GmbH4* Copyright (C) 2016-2017 Intel Deutschland GmbH5*/6#ifndef __iwl_fw_api_nvm_reg_h__7#define __iwl_fw_api_nvm_reg_h__89/**10* enum iwl_regulatory_and_nvm_subcmd_ids - regulatory/NVM commands11*/12enum iwl_regulatory_and_nvm_subcmd_ids {13/**14* @NVM_ACCESS_COMPLETE: &struct iwl_nvm_access_complete_cmd15*/16NVM_ACCESS_COMPLETE = 0x0,1718/**19* @LARI_CONFIG_CHANGE: &struct iwl_lari_config_change_cmd_v1,20* &struct iwl_lari_config_change_cmd_v2,21* &struct iwl_lari_config_change_cmd_v3,22* &struct iwl_lari_config_change_cmd_v4,23* &struct iwl_lari_config_change_cmd_v5,24* &struct iwl_lari_config_change_cmd_v6,25* &struct iwl_lari_config_change_cmd_v7,26* &struct iwl_lari_config_change_cmd_v10 or27* &struct iwl_lari_config_change_cmd28*/29LARI_CONFIG_CHANGE = 0x1,3031/**32* @NVM_GET_INFO:33* Command is &struct iwl_nvm_get_info,34* response is &struct iwl_nvm_get_info_rsp35*/36NVM_GET_INFO = 0x2,3738/**39* @TAS_CONFIG: &union iwl_tas_config_cmd40*/41TAS_CONFIG = 0x3,4243/**44* @SAR_OFFSET_MAPPING_TABLE_CMD: &struct iwl_sar_offset_mapping_cmd45*/46SAR_OFFSET_MAPPING_TABLE_CMD = 0x4,4748/**49* @MCC_ALLOWED_AP_TYPE_CMD: &struct iwl_mcc_allowed_ap_type_cmd50*/51MCC_ALLOWED_AP_TYPE_CMD = 0x5,5253/**54* @PNVM_INIT_COMPLETE_NTFY: &struct iwl_pnvm_init_complete_ntfy55*/56PNVM_INIT_COMPLETE_NTFY = 0xFE,57};5859/**60* enum iwl_nvm_access_op - NVM access opcode61* @IWL_NVM_READ: read NVM62* @IWL_NVM_WRITE: write NVM63*/64enum iwl_nvm_access_op {65IWL_NVM_READ = 0,66IWL_NVM_WRITE = 1,67};6869/**70* enum iwl_nvm_access_target - target of the NVM_ACCESS_CMD71* @NVM_ACCESS_TARGET_CACHE: access the cache72* @NVM_ACCESS_TARGET_OTP: access the OTP73* @NVM_ACCESS_TARGET_EEPROM: access the EEPROM74*/75enum iwl_nvm_access_target {76NVM_ACCESS_TARGET_CACHE = 0,77NVM_ACCESS_TARGET_OTP = 1,78NVM_ACCESS_TARGET_EEPROM = 2,79};8081/**82* enum iwl_nvm_section_type - section types for NVM_ACCESS_CMD83* @NVM_SECTION_TYPE_SW: software section84* @NVM_SECTION_TYPE_REGULATORY: regulatory section85* @NVM_SECTION_TYPE_CALIBRATION: calibration section86* @NVM_SECTION_TYPE_PRODUCTION: production section87* @NVM_SECTION_TYPE_REGULATORY_SDP: regulatory section used by 3168 series88* @NVM_SECTION_TYPE_MAC_OVERRIDE: MAC override section89* @NVM_SECTION_TYPE_PHY_SKU: PHY SKU section90* @NVM_MAX_NUM_SECTIONS: number of sections91*/92enum iwl_nvm_section_type {93NVM_SECTION_TYPE_SW = 1,94NVM_SECTION_TYPE_REGULATORY = 3,95NVM_SECTION_TYPE_CALIBRATION = 4,96NVM_SECTION_TYPE_PRODUCTION = 5,97NVM_SECTION_TYPE_REGULATORY_SDP = 8,98NVM_SECTION_TYPE_MAC_OVERRIDE = 11,99NVM_SECTION_TYPE_PHY_SKU = 12,100NVM_MAX_NUM_SECTIONS = 13,101};102103/**104* struct iwl_nvm_access_cmd - Request the device to send an NVM section105* @op_code: &enum iwl_nvm_access_op106* @target: &enum iwl_nvm_access_target107* @type: &enum iwl_nvm_section_type108* @offset: offset in bytes into the section109* @length: in bytes, to read/write110* @data: if write operation, the data to write. On read its empty111*/112struct iwl_nvm_access_cmd {113u8 op_code;114u8 target;115__le16 type;116__le16 offset;117__le16 length;118u8 data[];119} __packed; /* NVM_ACCESS_CMD_API_S_VER_2 */120121/**122* struct iwl_nvm_access_resp - response to NVM_ACCESS_CMD123* @offset: offset in bytes into the section124* @length: in bytes, either how much was written or read125* @type: NVM_SECTION_TYPE_*126* @status: 0 for success, fail otherwise127* @data: if read operation, the data returned. Empty on write.128*/129struct iwl_nvm_access_resp {130__le16 offset;131__le16 length;132__le16 type;133__le16 status;134u8 data[];135} __packed; /* NVM_ACCESS_CMD_RESP_API_S_VER_2 */136137/*138* struct iwl_nvm_get_info - request to get NVM data139*/140struct iwl_nvm_get_info {141__le32 reserved;142} __packed; /* REGULATORY_NVM_GET_INFO_CMD_API_S_VER_1 */143144/**145* enum iwl_nvm_info_general_flags - flags in NVM_GET_INFO resp146* @NVM_GENERAL_FLAGS_EMPTY_OTP: 1 if OTP is empty147*/148enum iwl_nvm_info_general_flags {149NVM_GENERAL_FLAGS_EMPTY_OTP = BIT(0),150};151152/**153* struct iwl_nvm_get_info_general - general NVM data154* @flags: bit 0: 1 - empty, 0 - non-empty155* @nvm_version: nvm version156* @board_type: board type157* @n_hw_addrs: number of reserved MAC addresses158*/159struct iwl_nvm_get_info_general {160__le32 flags;161__le16 nvm_version;162u8 board_type;163u8 n_hw_addrs;164} __packed; /* REGULATORY_NVM_GET_INFO_GENERAL_S_VER_2 */165166/**167* enum iwl_nvm_mac_sku_flags - flags in &iwl_nvm_get_info_sku168* @NVM_MAC_SKU_FLAGS_BAND_2_4_ENABLED: true if 2.4 band enabled169* @NVM_MAC_SKU_FLAGS_BAND_5_2_ENABLED: true if 5.2 band enabled170* @NVM_MAC_SKU_FLAGS_802_11N_ENABLED: true if 11n enabled171* @NVM_MAC_SKU_FLAGS_802_11AC_ENABLED: true if 11ac enabled172* @NVM_MAC_SKU_FLAGS_MIMO_DISABLED: true if MIMO disabled173* @NVM_MAC_SKU_FLAGS_WAPI_ENABLED: true if WAPI enabled174* @NVM_MAC_SKU_FLAGS_REG_CHECK_ENABLED: true if regulatory checker enabled175* @NVM_MAC_SKU_FLAGS_API_LOCK_ENABLED: true if API lock enabled176*/177enum iwl_nvm_mac_sku_flags {178NVM_MAC_SKU_FLAGS_BAND_2_4_ENABLED = BIT(0),179NVM_MAC_SKU_FLAGS_BAND_5_2_ENABLED = BIT(1),180NVM_MAC_SKU_FLAGS_802_11N_ENABLED = BIT(2),181NVM_MAC_SKU_FLAGS_802_11AC_ENABLED = BIT(3),182/**183* @NVM_MAC_SKU_FLAGS_802_11AX_ENABLED: true if 11ax enabled184*/185NVM_MAC_SKU_FLAGS_802_11AX_ENABLED = BIT(4),186NVM_MAC_SKU_FLAGS_MIMO_DISABLED = BIT(5),187NVM_MAC_SKU_FLAGS_WAPI_ENABLED = BIT(8),188NVM_MAC_SKU_FLAGS_REG_CHECK_ENABLED = BIT(14),189NVM_MAC_SKU_FLAGS_API_LOCK_ENABLED = BIT(15),190};191192/**193* struct iwl_nvm_get_info_sku - mac information194* @mac_sku_flags: flags for SKU, see &enum iwl_nvm_mac_sku_flags195*/196struct iwl_nvm_get_info_sku {197__le32 mac_sku_flags;198} __packed; /* REGULATORY_NVM_GET_INFO_MAC_SKU_SECTION_S_VER_2 */199200/**201* struct iwl_nvm_get_info_phy - phy information202* @tx_chains: BIT 0 chain A, BIT 1 chain B203* @rx_chains: BIT 0 chain A, BIT 1 chain B204*/205struct iwl_nvm_get_info_phy {206__le32 tx_chains;207__le32 rx_chains;208} __packed; /* REGULATORY_NVM_GET_INFO_PHY_SKU_SECTION_S_VER_1 */209210#define IWL_NUM_CHANNELS_V1 51211#define IWL_NUM_CHANNELS 110212213/**214* struct iwl_nvm_get_info_regulatory_v1 - regulatory information215* @lar_enabled: is LAR enabled216* @channel_profile: regulatory data of this channel217* @reserved: reserved218*/219struct iwl_nvm_get_info_regulatory_v1 {220__le32 lar_enabled;221__le16 channel_profile[IWL_NUM_CHANNELS_V1];222__le16 reserved;223} __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_1 */224225/**226* struct iwl_nvm_get_info_regulatory - regulatory information227* @lar_enabled: is LAR enabled228* @n_channels: number of valid channels in the array229* @channel_profile: regulatory data of this channel230*/231struct iwl_nvm_get_info_regulatory {232__le32 lar_enabled;233__le32 n_channels;234__le32 channel_profile[IWL_NUM_CHANNELS];235} __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_2 */236237/**238* struct iwl_nvm_get_info_rsp_v3 - response to get NVM data239* @general: general NVM data240* @mac_sku: data relating to MAC sku241* @phy_sku: data relating to PHY sku242* @regulatory: regulatory data243*/244struct iwl_nvm_get_info_rsp_v3 {245struct iwl_nvm_get_info_general general;246struct iwl_nvm_get_info_sku mac_sku;247struct iwl_nvm_get_info_phy phy_sku;248struct iwl_nvm_get_info_regulatory_v1 regulatory;249} __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_3 */250251/**252* struct iwl_nvm_get_info_rsp - response to get NVM data253* @general: general NVM data254* @mac_sku: data relating to MAC sku255* @phy_sku: data relating to PHY sku256* @regulatory: regulatory data257*/258struct iwl_nvm_get_info_rsp {259struct iwl_nvm_get_info_general general;260struct iwl_nvm_get_info_sku mac_sku;261struct iwl_nvm_get_info_phy phy_sku;262struct iwl_nvm_get_info_regulatory regulatory;263} __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_4 */264265/**266* struct iwl_nvm_access_complete_cmd - NVM_ACCESS commands are completed267* @reserved: reserved268*/269struct iwl_nvm_access_complete_cmd {270__le32 reserved;271} __packed; /* NVM_ACCESS_COMPLETE_CMD_API_S_VER_1 */272273#define IWL_MCC_US 0x5553274#define IWL_MCC_CANADA 0x4341275276/**277* struct iwl_mcc_update_cmd - Request the device to update geographic278* regulatory profile according to the given MCC (Mobile Country Code).279* The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.280* 'ZZ' MCC will be used to switch to NVM default profile; in this case, the281* MCC in the cmd response will be the relevant MCC in the NVM.282* @mcc: given mobile country code283* @source_id: the source from where we got the MCC, see iwl_mcc_source284* @reserved: reserved for alignment285* @key: integrity key for MCC API OEM testing286* @reserved2: reserved287*/288struct iwl_mcc_update_cmd {289__le16 mcc;290u8 source_id;291u8 reserved;292__le32 key;293u8 reserved2[20];294} __packed; /* LAR_UPDATE_MCC_CMD_API_S_VER_2 */295296/**297* enum iwl_geo_information - geographic information.298* @GEO_NO_INFO: no special info for this geo profile.299* @GEO_WMM_ETSI_5GHZ_INFO: this geo profile limits the WMM params300* for the 5 GHz band.301*/302enum iwl_geo_information {303GEO_NO_INFO = 0,304GEO_WMM_ETSI_5GHZ_INFO = BIT(0),305};306307/**308* struct iwl_mcc_update_resp_v3 - response to MCC_UPDATE_CMD.309* Contains the new channel control profile map, if changed, and the new MCC310* (mobile country code).311* The new MCC may be different than what was requested in MCC_UPDATE_CMD.312* @status: see &enum iwl_mcc_update_status313* @mcc: the new applied MCC314* @cap: capabilities for all channels which matches the MCC315* @source_id: the MCC source, see iwl_mcc_source316* @time: time elapsed from the MCC test start (in units of 30 seconds)317* @geo_info: geographic specific profile information318* see &enum iwl_geo_information.319* @n_channels: number of channels in @channels_data.320* @channels: channel control data map, DWORD for each channel. Only the first321* 16bits are used.322*/323struct iwl_mcc_update_resp_v3 {324__le32 status;325__le16 mcc;326u8 cap;327u8 source_id;328__le16 time;329__le16 geo_info;330__le32 n_channels;331__le32 channels[];332} __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_3 */333334/**335* struct iwl_mcc_update_resp_v4 - response to MCC_UPDATE_CMD.336* Contains the new channel control profile map, if changed, and the new MCC337* (mobile country code).338* The new MCC may be different than what was requested in MCC_UPDATE_CMD.339* @status: see &enum iwl_mcc_update_status340* @mcc: the new applied MCC341* @cap: capabilities for all channels which matches the MCC342* @time: time elapsed from the MCC test start (in units of 30 seconds)343* @geo_info: geographic specific profile information344* see &enum iwl_geo_information.345* @source_id: the MCC source, see iwl_mcc_source346* @reserved: for four bytes alignment.347* @n_channels: number of channels in @channels_data.348* @channels: channel control data map, DWORD for each channel. Only the first349* 16bits are used.350*/351struct iwl_mcc_update_resp_v4 {352__le32 status;353__le16 mcc;354__le16 cap;355__le16 time;356__le16 geo_info;357u8 source_id;358u8 reserved[3];359__le32 n_channels;360__le32 channels[];361} __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_4 */362363/**364* struct iwl_mcc_update_resp_v8 - response to MCC_UPDATE_CMD.365* Contains the new channel control profile map, if changed, and the new MCC366* (mobile country code).367* The new MCC may be different than what was requested in MCC_UPDATE_CMD.368* @status: see &enum iwl_mcc_update_status369* @mcc: the new applied MCC370* @padding: padding for 2 bytes.371* @cap: capabilities for all channels which matches the MCC372* @time: time elapsed from the MCC test start (in units of 30 seconds)373* @geo_info: geographic specific profile information374* see &enum iwl_geo_information.375* @source_id: the MCC source, see iwl_mcc_source376* @reserved: for four bytes alignment.377* @n_channels: number of channels in @channels_data.378* @channels: channel control data map, DWORD for each channel. Only the first379* 16bits are used.380*/381struct iwl_mcc_update_resp_v8 {382__le32 status;383__le16 mcc;384u8 padding[2];385__le32 cap;386__le16 time;387__le16 geo_info;388u8 source_id;389u8 reserved[3];390__le32 n_channels;391__le32 channels[];392} __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_8 */393394/**395* struct iwl_mcc_chub_notif - chub notifies of mcc change396* (MCC_CHUB_UPDATE_CMD = 0xc9)397* The Chub (Communication Hub, CommsHUB) is a HW component that connects to398* the cellular and connectivity cores that gets updates of the mcc, and399* notifies the ucode directly of any mcc change.400* The ucode requests the driver to request the device to update geographic401* regulatory profile according to the given MCC (Mobile Country Code).402* The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.403* 'ZZ' MCC will be used to switch to NVM default profile; in this case, the404* MCC in the cmd response will be the relevant MCC in the NVM.405* @mcc: given mobile country code406* @source_id: identity of the change originator, see iwl_mcc_source407* @reserved1: reserved for alignment408*/409struct iwl_mcc_chub_notif {410__le16 mcc;411u8 source_id;412u8 reserved1;413} __packed; /* LAR_MCC_NOTIFY_S */414415enum iwl_mcc_update_status {416MCC_RESP_NEW_CHAN_PROFILE,417MCC_RESP_SAME_CHAN_PROFILE,418MCC_RESP_INVALID,419MCC_RESP_NVM_DISABLED,420MCC_RESP_ILLEGAL,421MCC_RESP_LOW_PRIORITY,422MCC_RESP_TEST_MODE_ACTIVE,423MCC_RESP_TEST_MODE_NOT_ACTIVE,424MCC_RESP_TEST_MODE_DENIAL_OF_SERVICE,425};426427enum iwl_mcc_source {428MCC_SOURCE_OLD_FW = 0,429MCC_SOURCE_ME = 1,430MCC_SOURCE_BIOS = 2,431MCC_SOURCE_3G_LTE_HOST = 3,432MCC_SOURCE_3G_LTE_DEVICE = 4,433MCC_SOURCE_WIFI = 5,434MCC_SOURCE_RESERVED = 6,435MCC_SOURCE_DEFAULT = 7,436MCC_SOURCE_UNINITIALIZED = 8,437MCC_SOURCE_MCC_API = 9,438MCC_SOURCE_GET_CURRENT = 0x10,439MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11,440};441442#define IWL_WTAS_BLACK_LIST_MAX 16443/**444* struct iwl_tas_config_cmd_common - configures the TAS.445* This is also the v2 structure.446* @block_list_size: size of relevant field in block_list_array447* @block_list_array: list of countries where TAS must be disabled448*/449struct iwl_tas_config_cmd_common {450__le32 block_list_size;451__le32 block_list_array[IWL_WTAS_BLACK_LIST_MAX];452} __packed; /* TAS_CONFIG_CMD_API_S_VER_2 */453454/**455* struct iwl_tas_config_cmd_v3 - configures the TAS456* @override_tas_iec: indicates whether to override default value of IEC regulatory457* @enable_tas_iec: in case override_tas_iec is set -458* indicates whether IEC regulatory is enabled or disabled459*/460struct iwl_tas_config_cmd_v3 {461__le16 override_tas_iec;462__le16 enable_tas_iec;463} __packed; /* TAS_CONFIG_CMD_API_S_VER_3 */464465/**466* enum iwl_tas_uhb_allowed_flags - per country TAS UHB allowed flags.467* @TAS_UHB_ALLOWED_CANADA: TAS UHB is allowed in Canada. This flag is valid468* only when fw has %IWL_UCODE_TLV_CAPA_UHB_CANADA_TAS_SUPPORT capability.469*/470enum iwl_tas_uhb_allowed_flags {471TAS_UHB_ALLOWED_CANADA = BIT(0),472};473474/**475* struct iwl_tas_config_cmd_v4 - configures the TAS476* @override_tas_iec: indicates whether to override default value of IEC regulatory477* @enable_tas_iec: in case override_tas_iec is set -478* indicates whether IEC regulatory is enabled or disabled479* @usa_tas_uhb_allowed: if set, allow TAS UHB in the USA480* @uhb_allowed_flags: see &enum iwl_tas_uhb_allowed_flags.481*/482struct iwl_tas_config_cmd_v4 {483u8 override_tas_iec;484u8 enable_tas_iec;485u8 usa_tas_uhb_allowed;486u8 uhb_allowed_flags;487} __packed; /* TAS_CONFIG_CMD_API_S_VER_4 */488489struct iwl_tas_config_cmd_v2_v4 {490struct iwl_tas_config_cmd_common common;491union {492struct iwl_tas_config_cmd_v3 v3;493struct iwl_tas_config_cmd_v4 v4;494};495};496497/**498* enum bios_source - source of bios data499* @BIOS_SOURCE_NONE: BIOS source is not defined500* @BIOS_SOURCE_ACPI: BIOS source is ACPI501* @BIOS_SOURCE_UEFI: BIOS source is UEFI502*/503enum bios_source {504BIOS_SOURCE_NONE,505BIOS_SOURCE_ACPI,506BIOS_SOURCE_UEFI,507};508509/**510* struct bios_value_u32 - BIOS configuration.511* @table_source: see &enum bios_source512* @table_revision: table revision.513* @reserved: reserved514* @value: value in bios.515*/516struct bios_value_u32 {517u8 table_source;518u8 table_revision;519u8 reserved[2];520__le32 value;521} __packed; /* BIOS_TABLE_SOURCE_U32_S_VER_1 */522523/**524* struct iwl_tas_config_cmd - configures the TAS.525* @block_list_size: size of relevant field in block_list_array526* @block_list_array: list of countries where TAS must be disabled527* @reserved: reserved528* @tas_config_info: see @struct bios_value_u32529*/530struct iwl_tas_config_cmd {531__le16 block_list_size;532__le16 block_list_array[IWL_WTAS_BLACK_LIST_MAX];533u8 reserved[2];534struct bios_value_u32 tas_config_info;535} __packed; /* TAS_CONFIG_CMD_API_S_VER_5 */536537/**538* enum iwl_lari_config_masks - bit masks for the various LARI config operations539* @LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK: disable 11ac in ukraine540* @LARI_CONFIG_CHANGE_ETSI_TO_PASSIVE_MSK: ETSI 5.8GHz SRD passive scan541* @LARI_CONFIG_CHANGE_ETSI_TO_DISABLED_MSK: ETSI 5.8GHz SRD disabled542* @LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK: enable 5.15/5.35GHz bands in543* Indonesia544* @LARI_CONFIG_ENABLE_CHINA_22_REG_SUPPORT_MSK: enable 2022 china regulatory545*/546enum iwl_lari_config_masks {547LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK = BIT(0),548LARI_CONFIG_CHANGE_ETSI_TO_PASSIVE_MSK = BIT(1),549LARI_CONFIG_CHANGE_ETSI_TO_DISABLED_MSK = BIT(2),550LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK = BIT(3),551LARI_CONFIG_ENABLE_CHINA_22_REG_SUPPORT_MSK = BIT(7),552};553554#define IWL_11AX_UKRAINE_MASK 3555#define IWL_11AX_UKRAINE_SHIFT 8556557/**558* struct iwl_lari_config_change_cmd_v1 - change LARI configuration559* @config_bitmap: bit map of the config commands. each bit will trigger a560* different predefined FW config operation561*/562struct iwl_lari_config_change_cmd_v1 {563__le32 config_bitmap;564} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_1 */565566/**567* struct iwl_lari_config_change_cmd_v2 - change LARI configuration568* @config_bitmap: bit map of the config commands. each bit will trigger a569* different predefined FW config operation570* @oem_uhb_allow_bitmap: bitmap of UHB enabled MCC sets571*/572struct iwl_lari_config_change_cmd_v2 {573__le32 config_bitmap;574__le32 oem_uhb_allow_bitmap;575} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_2 */576577/**578* struct iwl_lari_config_change_cmd_v3 - change LARI configuration579* @config_bitmap: bit map of the config commands. each bit will trigger a580* different predefined FW config operation581* @oem_uhb_allow_bitmap: bitmap of UHB enabled MCC sets582* @oem_11ax_allow_bitmap: bitmap of 11ax allowed MCCs.583* For each supported country, a pair of regulatory override bit and 11ax mode exist584* in the bit field.585*/586struct iwl_lari_config_change_cmd_v3 {587__le32 config_bitmap;588__le32 oem_uhb_allow_bitmap;589__le32 oem_11ax_allow_bitmap;590} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_3 */591592/**593* struct iwl_lari_config_change_cmd_v4 - change LARI configuration594* @config_bitmap: Bitmap of the config commands. Each bit will trigger a595* different predefined FW config operation.596* @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets.597* @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits598* per country, one to indicate whether to override and the other to599* indicate the value to use.600* @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits601* per country, one to indicate whether to override and the other to602* indicate allow/disallow unii4 channels.603*/604struct iwl_lari_config_change_cmd_v4 {605__le32 config_bitmap;606__le32 oem_uhb_allow_bitmap;607__le32 oem_11ax_allow_bitmap;608__le32 oem_unii4_allow_bitmap;609} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_4 */610611/**612* struct iwl_lari_config_change_cmd_v5 - change LARI configuration613* @config_bitmap: Bitmap of the config commands. Each bit will trigger a614* different predefined FW config operation.615* @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets.616* @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits617* per country, one to indicate whether to override and the other to618* indicate the value to use.619* @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits620* per country, one to indicate whether to override and the other to621* indicate allow/disallow unii4 channels.622* @chan_state_active_bitmap: Bitmap for overriding channel state to active.623* Each bit represents a country or region to activate, according to the BIOS624* definitions.625*/626struct iwl_lari_config_change_cmd_v5 {627__le32 config_bitmap;628__le32 oem_uhb_allow_bitmap;629__le32 oem_11ax_allow_bitmap;630__le32 oem_unii4_allow_bitmap;631__le32 chan_state_active_bitmap;632} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_5 */633634/**635* struct iwl_lari_config_change_cmd_v6 - change LARI configuration636* @config_bitmap: Bitmap of the config commands. Each bit will trigger a637* different predefined FW config operation.638* @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets.639* @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits640* per country, one to indicate whether to override and the other to641* indicate the value to use.642* @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits643* per country, one to indicate whether to override and the other to644* indicate allow/disallow unii4 channels.645* @chan_state_active_bitmap: Bitmap for overriding channel state to active.646* Each bit represents a country or region to activate, according to the BIOS647* definitions.648* @force_disable_channels_bitmap: Bitmap of disabled bands/channels.649* Each bit represents a set of channels in a specific band that should be disabled650*/651struct iwl_lari_config_change_cmd_v6 {652__le32 config_bitmap;653__le32 oem_uhb_allow_bitmap;654__le32 oem_11ax_allow_bitmap;655__le32 oem_unii4_allow_bitmap;656__le32 chan_state_active_bitmap;657__le32 force_disable_channels_bitmap;658} __packed; /* LARI_CHANGE_CONF_CMD_S_VER_6 */659660/**661* struct iwl_lari_config_change_cmd_v7 - change LARI configuration662* This structure is used also for lari cmd version 8 and 9.663* @config_bitmap: Bitmap of the config commands. Each bit will trigger a664* different predefined FW config operation.665* @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets.666* @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits667* per country, one to indicate whether to override and the other to668* indicate the value to use.669* @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits670* per country, one to indicate whether to override and the other to671* indicate allow/disallow unii4 channels.672* For LARI cmd version 4 to 8 - bits 0:3 are supported.673* For LARI cmd version 9 - bits 0:5 are supported.674* @chan_state_active_bitmap: Bitmap to enable different bands per country675* or region.676* Each bit represents a country or region, and a band to activate677* according to the BIOS definitions.678* For LARI cmd version 7 - bits 0:3 are supported.679* For LARI cmd version 8 - bits 0:4 are supported.680* @force_disable_channels_bitmap: Bitmap of disabled bands/channels.681* Each bit represents a set of channels in a specific band that should be682* disabled683* @edt_bitmap: Bitmap of energy detection threshold table.684* Disable/enable the EDT optimization method for different band.685*/686struct iwl_lari_config_change_cmd_v7 {687__le32 config_bitmap;688__le32 oem_uhb_allow_bitmap;689__le32 oem_11ax_allow_bitmap;690__le32 oem_unii4_allow_bitmap;691__le32 chan_state_active_bitmap;692__le32 force_disable_channels_bitmap;693__le32 edt_bitmap;694} __packed;695/* LARI_CHANGE_CONF_CMD_S_VER_7 */696/* LARI_CHANGE_CONF_CMD_S_VER_8 */697/* LARI_CHANGE_CONF_CMD_S_VER_9 */698699/**700* struct iwl_lari_config_change_cmd_v10 - change LARI configuration701* @config_bitmap: Bitmap of the config commands. Each bit will trigger a702* different predefined FW config operation.703* @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets.704* @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits705* per country, one to indicate whether to override and the other to706* indicate the value to use.707* @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits708* per country, one to indicate whether to override and the other to709* indicate allow/disallow unii4 channels.710* For LARI cmd version 10 - bits 0:5 are supported.711* @chan_state_active_bitmap: Bitmap to enable different bands per country712* or region.713* Each bit represents a country or region, and a band to activate714* according to the BIOS definitions.715* For LARI cmd version 10 - bits 0:4 are supported.716* @force_disable_channels_bitmap: Bitmap of disabled bands/channels.717* Each bit represents a set of channels in a specific band that should be718* disabled719* @edt_bitmap: Bitmap of energy detection threshold table.720* Disable/enable the EDT optimization method for different band.721* @oem_320mhz_allow_bitmap: 320Mhz bandwidth enablement bitmap per MCC.722* bit0: enable 320Mhz in Japan.723* bit1: enable 320Mhz in South Korea.724* bit 2 - 31: reserved.725*/726struct iwl_lari_config_change_cmd_v10 {727__le32 config_bitmap;728__le32 oem_uhb_allow_bitmap;729__le32 oem_11ax_allow_bitmap;730__le32 oem_unii4_allow_bitmap;731__le32 chan_state_active_bitmap;732__le32 force_disable_channels_bitmap;733__le32 edt_bitmap;734__le32 oem_320mhz_allow_bitmap;735} __packed;736/* LARI_CHANGE_CONF_CMD_S_VER_10 */737738/**739* struct iwl_lari_config_change_cmd - change LARI configuration740* @config_bitmap: Bitmap of the config commands. Each bit will trigger a741* different predefined FW config operation.742* @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets.743* @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits744* per country, one to indicate whether to override and the other to745* indicate the value to use.746* @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits747* per country, one to indicate whether to override and the other to748* indicate allow/disallow unii4 channels.749* For LARI cmd version 11 - bits 0:5 are supported.750* @chan_state_active_bitmap: Bitmap to enable different bands per country751* or region.752* Each bit represents a country or region, and a band to activate753* according to the BIOS definitions.754* For LARI cmd version 11 - bits 0:4 are supported.755* For LARI cmd version 12 - bits 0:6 are supported and bits 7:31 are756* reserved.757* @force_disable_channels_bitmap: Bitmap of disabled bands/channels.758* Each bit represents a set of channels in a specific band that should be759* disabled760* @edt_bitmap: Bitmap of energy detection threshold table.761* Disable/enable the EDT optimization method for different band.762* @oem_320mhz_allow_bitmap: 320Mhz bandwidth enablement bitmap per MCC.763* bit0: enable 320Mhz in Japan.764* bit1: enable 320Mhz in South Korea.765* bit 2 - 31: reserved.766* @oem_11be_allow_bitmap: Bitmap of 11be allowed MCCs. No need to mask out the767* unsupported bits768* bit0: enable 11be in China(CB/CN).769* bit1: enable 11be in South Korea.770* bit 2 - 31: reserved.771*/772struct iwl_lari_config_change_cmd {773__le32 config_bitmap;774__le32 oem_uhb_allow_bitmap;775__le32 oem_11ax_allow_bitmap;776__le32 oem_unii4_allow_bitmap;777__le32 chan_state_active_bitmap;778__le32 force_disable_channels_bitmap;779__le32 edt_bitmap;780__le32 oem_320mhz_allow_bitmap;781__le32 oem_11be_allow_bitmap;782} __packed;783/* LARI_CHANGE_CONF_CMD_S_VER_11 */784/* LARI_CHANGE_CONF_CMD_S_VER_12 */785786/* Activate UNII-1 (5.2GHz) for World Wide */787#define ACTIVATE_5G2_IN_WW_MASK BIT(4)788#define CHAN_STATE_ACTIVE_BITMAP_CMD_V11 0x1F789#define CHAN_STATE_ACTIVE_BITMAP_CMD_V12 0x7F790791/**792* struct iwl_pnvm_init_complete_ntfy - PNVM initialization complete793* @status: PNVM image loading status794*/795struct iwl_pnvm_init_complete_ntfy {796__le32 status;797} __packed; /* PNVM_INIT_COMPLETE_NTFY_S_VER_1 */798799#define UATS_TABLE_ROW_SIZE 26800#define UATS_TABLE_COL_SIZE 13801802/**803* struct iwl_mcc_allowed_ap_type_cmd - struct for MCC_ALLOWED_AP_TYPE_CMD804* @offset_map: mapping a mcc to UHB AP type support (UATS) allowed805* @reserved: reserved806*/807struct iwl_mcc_allowed_ap_type_cmd {808u8 offset_map[UATS_TABLE_ROW_SIZE][UATS_TABLE_COL_SIZE];809__le16 reserved;810} __packed; /* MCC_ALLOWED_AP_TYPE_CMD_API_S_VER_1 */811812#endif /* __iwl_fw_api_nvm_reg_h__ */813814815