1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 /* 3 * Copyright (C) 2012-2014, 2018-2023 Intel Corporation 4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 5 * Copyright (C) 2016-2017 Intel Deutschland GmbH 6 */ 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 commands 12 */ 13 enum iwl_regulatory_and_nvm_subcmd_ids { 14 /** 15 * @NVM_ACCESS_COMPLETE: &struct iwl_nvm_access_complete_cmd 16 */ 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 or 26 * &struct iwl_lari_config_change_cmd_v7 27 */ 28 LARI_CONFIG_CHANGE = 0x1, 29 30 /** 31 * @NVM_GET_INFO: 32 * Command is &struct iwl_nvm_get_info, 33 * response is &struct iwl_nvm_get_info_rsp 34 */ 35 NVM_GET_INFO = 0x2, 36 37 /** 38 * @TAS_CONFIG: &union iwl_tas_config_cmd 39 */ 40 TAS_CONFIG = 0x3, 41 42 /** 43 * @SAR_OFFSET_MAPPING_TABLE_CMD: &struct iwl_sar_offset_mapping_cmd 44 */ 45 SAR_OFFSET_MAPPING_TABLE_CMD = 0x4, 46 47 /** 48 * @UATS_TABLE_CMD: &struct iwl_uats_table_cmd 49 */ 50 UATS_TABLE_CMD = 0x5, 51 52 /** 53 * @PNVM_INIT_COMPLETE_NTFY: &struct iwl_pnvm_init_complete_ntfy 54 */ 55 PNVM_INIT_COMPLETE_NTFY = 0xFE, 56 }; 57 58 /** 59 * enum iwl_nvm_access_op - NVM access opcode 60 * @IWL_NVM_READ: read NVM 61 * @IWL_NVM_WRITE: write NVM 62 */ 63 enum iwl_nvm_access_op { 64 IWL_NVM_READ = 0, 65 IWL_NVM_WRITE = 1, 66 }; 67 68 /** 69 * enum iwl_nvm_access_target - target of the NVM_ACCESS_CMD 70 * @NVM_ACCESS_TARGET_CACHE: access the cache 71 * @NVM_ACCESS_TARGET_OTP: access the OTP 72 * @NVM_ACCESS_TARGET_EEPROM: access the EEPROM 73 */ 74 enum iwl_nvm_access_target { 75 NVM_ACCESS_TARGET_CACHE = 0, 76 NVM_ACCESS_TARGET_OTP = 1, 77 NVM_ACCESS_TARGET_EEPROM = 2, 78 }; 79 80 /** 81 * enum iwl_nvm_section_type - section types for NVM_ACCESS_CMD 82 * @NVM_SECTION_TYPE_SW: software section 83 * @NVM_SECTION_TYPE_REGULATORY: regulatory section 84 * @NVM_SECTION_TYPE_CALIBRATION: calibration section 85 * @NVM_SECTION_TYPE_PRODUCTION: production section 86 * @NVM_SECTION_TYPE_REGULATORY_SDP: regulatory section used by 3168 series 87 * @NVM_SECTION_TYPE_MAC_OVERRIDE: MAC override section 88 * @NVM_SECTION_TYPE_PHY_SKU: PHY SKU section 89 * @NVM_MAX_NUM_SECTIONS: number of sections 90 */ 91 enum iwl_nvm_section_type { 92 NVM_SECTION_TYPE_SW = 1, 93 NVM_SECTION_TYPE_REGULATORY = 3, 94 NVM_SECTION_TYPE_CALIBRATION = 4, 95 NVM_SECTION_TYPE_PRODUCTION = 5, 96 NVM_SECTION_TYPE_REGULATORY_SDP = 8, 97 NVM_SECTION_TYPE_MAC_OVERRIDE = 11, 98 NVM_SECTION_TYPE_PHY_SKU = 12, 99 NVM_MAX_NUM_SECTIONS = 13, 100 }; 101 102 /** 103 * struct iwl_nvm_access_cmd - Request the device to send an NVM section 104 * @op_code: &enum iwl_nvm_access_op 105 * @target: &enum iwl_nvm_access_target 106 * @type: &enum iwl_nvm_section_type 107 * @offset: offset in bytes into the section 108 * @length: in bytes, to read/write 109 * @data: if write operation, the data to write. On read its empty 110 */ 111 struct iwl_nvm_access_cmd { 112 u8 op_code; 113 u8 target; 114 __le16 type; 115 __le16 offset; 116 __le16 length; 117 u8 data[]; 118 } __packed; /* NVM_ACCESS_CMD_API_S_VER_2 */ 119 120 /** 121 * struct iwl_nvm_access_resp_ver2 - response to NVM_ACCESS_CMD 122 * @offset: offset in bytes into the section 123 * @length: in bytes, either how much was written or read 124 * @type: NVM_SECTION_TYPE_* 125 * @status: 0 for success, fail otherwise 126 * @data: if read operation, the data returned. Empty on write. 127 */ 128 struct iwl_nvm_access_resp { 129 __le16 offset; 130 __le16 length; 131 __le16 type; 132 __le16 status; 133 u8 data[]; 134 } __packed; /* NVM_ACCESS_CMD_RESP_API_S_VER_2 */ 135 136 /* 137 * struct iwl_nvm_get_info - request to get NVM data 138 */ 139 struct iwl_nvm_get_info { 140 __le32 reserved; 141 } __packed; /* REGULATORY_NVM_GET_INFO_CMD_API_S_VER_1 */ 142 143 /** 144 * enum iwl_nvm_info_general_flags - flags in NVM_GET_INFO resp 145 * @NVM_GENERAL_FLAGS_EMPTY_OTP: 1 if OTP is empty 146 */ 147 enum iwl_nvm_info_general_flags { 148 NVM_GENERAL_FLAGS_EMPTY_OTP = BIT(0), 149 }; 150 151 /** 152 * struct iwl_nvm_get_info_general - general NVM data 153 * @flags: bit 0: 1 - empty, 0 - non-empty 154 * @nvm_version: nvm version 155 * @board_type: board type 156 * @n_hw_addrs: number of reserved MAC addresses 157 */ 158 struct iwl_nvm_get_info_general { 159 __le32 flags; 160 __le16 nvm_version; 161 u8 board_type; 162 u8 n_hw_addrs; 163 } __packed; /* REGULATORY_NVM_GET_INFO_GENERAL_S_VER_2 */ 164 165 /** 166 * enum iwl_nvm_mac_sku_flags - flags in &iwl_nvm_get_info_sku 167 * @NVM_MAC_SKU_FLAGS_BAND_2_4_ENABLED: true if 2.4 band enabled 168 * @NVM_MAC_SKU_FLAGS_BAND_5_2_ENABLED: true if 5.2 band enabled 169 * @NVM_MAC_SKU_FLAGS_802_11N_ENABLED: true if 11n enabled 170 * @NVM_MAC_SKU_FLAGS_802_11AC_ENABLED: true if 11ac enabled 171 * @NVM_MAC_SKU_FLAGS_MIMO_DISABLED: true if MIMO disabled 172 * @NVM_MAC_SKU_FLAGS_WAPI_ENABLED: true if WAPI enabled 173 * @NVM_MAC_SKU_FLAGS_REG_CHECK_ENABLED: true if regulatory checker enabled 174 * @NVM_MAC_SKU_FLAGS_API_LOCK_ENABLED: true if API lock enabled 175 */ 176 enum iwl_nvm_mac_sku_flags { 177 NVM_MAC_SKU_FLAGS_BAND_2_4_ENABLED = BIT(0), 178 NVM_MAC_SKU_FLAGS_BAND_5_2_ENABLED = BIT(1), 179 NVM_MAC_SKU_FLAGS_802_11N_ENABLED = BIT(2), 180 NVM_MAC_SKU_FLAGS_802_11AC_ENABLED = BIT(3), 181 /** 182 * @NVM_MAC_SKU_FLAGS_802_11AX_ENABLED: true if 11ax enabled 183 */ 184 NVM_MAC_SKU_FLAGS_802_11AX_ENABLED = BIT(4), 185 NVM_MAC_SKU_FLAGS_MIMO_DISABLED = BIT(5), 186 NVM_MAC_SKU_FLAGS_WAPI_ENABLED = BIT(8), 187 NVM_MAC_SKU_FLAGS_REG_CHECK_ENABLED = BIT(14), 188 NVM_MAC_SKU_FLAGS_API_LOCK_ENABLED = BIT(15), 189 }; 190 191 /** 192 * struct iwl_nvm_get_info_sku - mac information 193 * @mac_sku_flags: flags for SKU, see &enum iwl_nvm_mac_sku_flags 194 */ 195 struct iwl_nvm_get_info_sku { 196 __le32 mac_sku_flags; 197 } __packed; /* REGULATORY_NVM_GET_INFO_MAC_SKU_SECTION_S_VER_2 */ 198 199 /** 200 * struct iwl_nvm_get_info_phy - phy information 201 * @tx_chains: BIT 0 chain A, BIT 1 chain B 202 * @rx_chains: BIT 0 chain A, BIT 1 chain B 203 */ 204 struct iwl_nvm_get_info_phy { 205 __le32 tx_chains; 206 __le32 rx_chains; 207 } __packed; /* REGULATORY_NVM_GET_INFO_PHY_SKU_SECTION_S_VER_1 */ 208 209 #define IWL_NUM_CHANNELS_V1 51 210 #define IWL_NUM_CHANNELS 110 211 212 /** 213 * struct iwl_nvm_get_info_regulatory - regulatory information 214 * @lar_enabled: is LAR enabled 215 * @channel_profile: regulatory data of this channel 216 * @reserved: reserved 217 */ 218 struct iwl_nvm_get_info_regulatory_v1 { 219 __le32 lar_enabled; 220 __le16 channel_profile[IWL_NUM_CHANNELS_V1]; 221 __le16 reserved; 222 } __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_1 */ 223 224 /** 225 * struct iwl_nvm_get_info_regulatory - regulatory information 226 * @lar_enabled: is LAR enabled 227 * @n_channels: number of valid channels in the array 228 * @channel_profile: regulatory data of this channel 229 */ 230 struct iwl_nvm_get_info_regulatory { 231 __le32 lar_enabled; 232 __le32 n_channels; 233 __le32 channel_profile[IWL_NUM_CHANNELS]; 234 } __packed; /* REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_2 */ 235 236 /** 237 * struct iwl_nvm_get_info_rsp_v3 - response to get NVM data 238 * @general: general NVM data 239 * @mac_sku: data relating to MAC sku 240 * @phy_sku: data relating to PHY sku 241 * @regulatory: regulatory data 242 */ 243 struct iwl_nvm_get_info_rsp_v3 { 244 struct iwl_nvm_get_info_general general; 245 struct iwl_nvm_get_info_sku mac_sku; 246 struct iwl_nvm_get_info_phy phy_sku; 247 struct iwl_nvm_get_info_regulatory_v1 regulatory; 248 } __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_3 */ 249 250 /** 251 * struct iwl_nvm_get_info_rsp - response to get NVM data 252 * @general: general NVM data 253 * @mac_sku: data relating to MAC sku 254 * @phy_sku: data relating to PHY sku 255 * @regulatory: regulatory data 256 */ 257 struct iwl_nvm_get_info_rsp { 258 struct iwl_nvm_get_info_general general; 259 struct iwl_nvm_get_info_sku mac_sku; 260 struct iwl_nvm_get_info_phy phy_sku; 261 struct iwl_nvm_get_info_regulatory regulatory; 262 } __packed; /* REGULATORY_NVM_GET_INFO_RSP_API_S_VER_4 */ 263 264 /** 265 * struct iwl_nvm_access_complete_cmd - NVM_ACCESS commands are completed 266 * @reserved: reserved 267 */ 268 struct iwl_nvm_access_complete_cmd { 269 __le32 reserved; 270 } __packed; /* NVM_ACCESS_COMPLETE_CMD_API_S_VER_1 */ 271 272 /** 273 * struct iwl_mcc_update_cmd - Request the device to update geographic 274 * regulatory profile according to the given MCC (Mobile Country Code). 275 * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain. 276 * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the 277 * MCC in the cmd response will be the relevant MCC in the NVM. 278 * @mcc: given mobile country code 279 * @source_id: the source from where we got the MCC, see iwl_mcc_source 280 * @reserved: reserved for alignment 281 * @key: integrity key for MCC API OEM testing 282 * @reserved2: reserved 283 */ 284 struct iwl_mcc_update_cmd { 285 __le16 mcc; 286 u8 source_id; 287 u8 reserved; 288 __le32 key; 289 u8 reserved2[20]; 290 } __packed; /* LAR_UPDATE_MCC_CMD_API_S_VER_2 */ 291 292 /** 293 * enum iwl_geo_information - geographic information. 294 * @GEO_NO_INFO: no special info for this geo profile. 295 * @GEO_WMM_ETSI_5GHZ_INFO: this geo profile limits the WMM params 296 * for the 5 GHz band. 297 */ 298 enum iwl_geo_information { 299 GEO_NO_INFO = 0, 300 GEO_WMM_ETSI_5GHZ_INFO = BIT(0), 301 }; 302 303 /** 304 * struct iwl_mcc_update_resp_v3 - response to MCC_UPDATE_CMD. 305 * Contains the new channel control profile map, if changed, and the new MCC 306 * (mobile country code). 307 * The new MCC may be different than what was requested in MCC_UPDATE_CMD. 308 * @status: see &enum iwl_mcc_update_status 309 * @mcc: the new applied MCC 310 * @cap: capabilities for all channels which matches the MCC 311 * @source_id: the MCC source, see iwl_mcc_source 312 * @time: time elapsed from the MCC test start (in units of 30 seconds) 313 * @geo_info: geographic specific profile information 314 * see &enum iwl_geo_information. 315 * @n_channels: number of channels in @channels_data. 316 * @channels: channel control data map, DWORD for each channel. Only the first 317 * 16bits are used. 318 */ 319 struct iwl_mcc_update_resp_v3 { 320 __le32 status; 321 __le16 mcc; 322 u8 cap; 323 u8 source_id; 324 __le16 time; 325 __le16 geo_info; 326 __le32 n_channels; 327 __le32 channels[]; 328 } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_3 */ 329 330 /** 331 * struct iwl_mcc_update_resp_v4 - response to MCC_UPDATE_CMD. 332 * Contains the new channel control profile map, if changed, and the new MCC 333 * (mobile country code). 334 * The new MCC may be different than what was requested in MCC_UPDATE_CMD. 335 * @status: see &enum iwl_mcc_update_status 336 * @mcc: the new applied MCC 337 * @cap: capabilities for all channels which matches the MCC 338 * @time: time elapsed from the MCC test start (in units of 30 seconds) 339 * @geo_info: geographic specific profile information 340 * see &enum iwl_geo_information. 341 * @source_id: the MCC source, see iwl_mcc_source 342 * @reserved: for four bytes alignment. 343 * @n_channels: number of channels in @channels_data. 344 * @channels: channel control data map, DWORD for each channel. Only the first 345 * 16bits are used. 346 */ 347 struct iwl_mcc_update_resp_v4 { 348 __le32 status; 349 __le16 mcc; 350 __le16 cap; 351 __le16 time; 352 __le16 geo_info; 353 u8 source_id; 354 u8 reserved[3]; 355 __le32 n_channels; 356 __le32 channels[]; 357 } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_4 */ 358 359 /** 360 * struct iwl_mcc_update_resp_v8 - response to MCC_UPDATE_CMD. 361 * Contains the new channel control profile map, if changed, and the new MCC 362 * (mobile country code). 363 * The new MCC may be different than what was requested in MCC_UPDATE_CMD. 364 * @status: see &enum iwl_mcc_update_status 365 * @mcc: the new applied MCC 366 * @padding: padding for 2 bytes. 367 * @cap: capabilities for all channels which matches the MCC 368 * @time: time elapsed from the MCC test start (in units of 30 seconds) 369 * @geo_info: geographic specific profile information 370 * see &enum iwl_geo_information. 371 * @source_id: the MCC source, see iwl_mcc_source 372 * @reserved: for four bytes alignment. 373 * @n_channels: number of channels in @channels_data. 374 * @channels: channel control data map, DWORD for each channel. Only the first 375 * 16bits are used. 376 */ 377 struct iwl_mcc_update_resp_v8 { 378 __le32 status; 379 __le16 mcc; 380 u8 padding[2]; 381 __le32 cap; 382 __le16 time; 383 __le16 geo_info; 384 u8 source_id; 385 u8 reserved[3]; 386 __le32 n_channels; 387 __le32 channels[]; 388 } __packed; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_8 */ 389 390 /** 391 * struct iwl_mcc_chub_notif - chub notifies of mcc change 392 * (MCC_CHUB_UPDATE_CMD = 0xc9) 393 * The Chub (Communication Hub, CommsHUB) is a HW component that connects to 394 * the cellular and connectivity cores that gets updates of the mcc, and 395 * notifies the ucode directly of any mcc change. 396 * The ucode requests the driver to request the device to update geographic 397 * regulatory profile according to the given MCC (Mobile Country Code). 398 * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain. 399 * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the 400 * MCC in the cmd response will be the relevant MCC in the NVM. 401 * @mcc: given mobile country code 402 * @source_id: identity of the change originator, see iwl_mcc_source 403 * @reserved1: reserved for alignment 404 */ 405 struct iwl_mcc_chub_notif { 406 __le16 mcc; 407 u8 source_id; 408 u8 reserved1; 409 } __packed; /* LAR_MCC_NOTIFY_S */ 410 411 enum iwl_mcc_update_status { 412 MCC_RESP_NEW_CHAN_PROFILE, 413 MCC_RESP_SAME_CHAN_PROFILE, 414 MCC_RESP_INVALID, 415 MCC_RESP_NVM_DISABLED, 416 MCC_RESP_ILLEGAL, 417 MCC_RESP_LOW_PRIORITY, 418 MCC_RESP_TEST_MODE_ACTIVE, 419 MCC_RESP_TEST_MODE_NOT_ACTIVE, 420 MCC_RESP_TEST_MODE_DENIAL_OF_SERVICE, 421 }; 422 423 enum iwl_mcc_source { 424 MCC_SOURCE_OLD_FW = 0, 425 MCC_SOURCE_ME = 1, 426 MCC_SOURCE_BIOS = 2, 427 MCC_SOURCE_3G_LTE_HOST = 3, 428 MCC_SOURCE_3G_LTE_DEVICE = 4, 429 MCC_SOURCE_WIFI = 5, 430 MCC_SOURCE_RESERVED = 6, 431 MCC_SOURCE_DEFAULT = 7, 432 MCC_SOURCE_UNINITIALIZED = 8, 433 MCC_SOURCE_MCC_API = 9, 434 MCC_SOURCE_GET_CURRENT = 0x10, 435 MCC_SOURCE_GETTING_MCC_TEST_MODE = 0x11, 436 }; 437 438 #define IWL_TAS_BLOCK_LIST_MAX 16 439 /** 440 * struct iwl_tas_config_cmd_v2 - configures the TAS 441 * @block_list_size: size of relevant field in block_list_array 442 * @block_list_array: list of countries where TAS must be disabled 443 */ 444 struct iwl_tas_config_cmd_v2 { 445 __le32 block_list_size; 446 __le32 block_list_array[IWL_TAS_BLOCK_LIST_MAX]; 447 } __packed; /* TAS_CONFIG_CMD_API_S_VER_2 */ 448 449 /** 450 * struct iwl_tas_config_cmd_v3 - configures the TAS 451 * @block_list_size: size of relevant field in block_list_array 452 * @block_list_array: list of countries where TAS must be disabled 453 * @override_tas_iec: indicates whether to override default value of IEC regulatory 454 * @enable_tas_iec: in case override_tas_iec is set - 455 * indicates whether IEC regulatory is enabled or disabled 456 */ 457 struct iwl_tas_config_cmd_v3 { 458 __le32 block_list_size; 459 __le32 block_list_array[IWL_TAS_BLOCK_LIST_MAX]; 460 __le16 override_tas_iec; 461 __le16 enable_tas_iec; 462 } __packed; /* TAS_CONFIG_CMD_API_S_VER_3 */ 463 464 /** 465 * struct iwl_tas_config_cmd_v3 - configures the TAS 466 * @block_list_size: size of relevant field in block_list_array 467 * @block_list_array: list of countries where TAS must be disabled 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 473 */ 474 struct iwl_tas_config_cmd_v4 { 475 __le32 block_list_size; 476 __le32 block_list_array[IWL_TAS_BLOCK_LIST_MAX]; 477 u8 override_tas_iec; 478 u8 enable_tas_iec; 479 u8 usa_tas_uhb_allowed; 480 u8 reserved; 481 } __packed; /* TAS_CONFIG_CMD_API_S_VER_4 */ 482 483 union iwl_tas_config_cmd { 484 struct iwl_tas_config_cmd_v2 v2; 485 struct iwl_tas_config_cmd_v3 v3; 486 struct iwl_tas_config_cmd_v4 v4; 487 }; 488 /** 489 * enum iwl_lari_config_masks - bit masks for the various LARI config operations 490 * @LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK: disable 11ac in ukraine 491 * @LARI_CONFIG_CHANGE_ETSI_TO_PASSIVE_MSK: ETSI 5.8GHz SRD passive scan 492 * @LARI_CONFIG_CHANGE_ETSI_TO_DISABLED_MSK: ETSI 5.8GHz SRD disabled 493 * @LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK: enable 5.15/5.35GHz bands in 494 * Indonesia 495 * @LARI_CONFIG_ENABLE_CHINA_22_REG_SUPPORT_MSK: enable 2022 china regulatory 496 */ 497 enum iwl_lari_config_masks { 498 LARI_CONFIG_DISABLE_11AC_UKRAINE_MSK = BIT(0), 499 LARI_CONFIG_CHANGE_ETSI_TO_PASSIVE_MSK = BIT(1), 500 LARI_CONFIG_CHANGE_ETSI_TO_DISABLED_MSK = BIT(2), 501 LARI_CONFIG_ENABLE_5G2_IN_INDONESIA_MSK = BIT(3), 502 LARI_CONFIG_ENABLE_CHINA_22_REG_SUPPORT_MSK = BIT(7), 503 }; 504 505 #define IWL_11AX_UKRAINE_MASK 3 506 #define IWL_11AX_UKRAINE_SHIFT 8 507 508 /** 509 * struct iwl_lari_config_change_cmd_v1 - change LARI configuration 510 * @config_bitmap: bit map of the config commands. each bit will trigger a 511 * different predefined FW config operation 512 */ 513 struct iwl_lari_config_change_cmd_v1 { 514 __le32 config_bitmap; 515 } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_1 */ 516 517 /** 518 * struct iwl_lari_config_change_cmd_v2 - change LARI configuration 519 * @config_bitmap: bit map of the config commands. each bit will trigger a 520 * different predefined FW config operation 521 * @oem_uhb_allow_bitmap: bitmap of UHB enabled MCC sets 522 */ 523 struct iwl_lari_config_change_cmd_v2 { 524 __le32 config_bitmap; 525 __le32 oem_uhb_allow_bitmap; 526 } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_2 */ 527 528 /** 529 * struct iwl_lari_config_change_cmd_v3 - change LARI configuration 530 * @config_bitmap: bit map of the config commands. each bit will trigger a 531 * different predefined FW config operation 532 * @oem_uhb_allow_bitmap: bitmap of UHB enabled MCC sets 533 * @oem_11ax_allow_bitmap: bitmap of 11ax allowed MCCs. 534 * For each supported country, a pair of regulatory override bit and 11ax mode exist 535 * in the bit field. 536 */ 537 struct iwl_lari_config_change_cmd_v3 { 538 __le32 config_bitmap; 539 __le32 oem_uhb_allow_bitmap; 540 __le32 oem_11ax_allow_bitmap; 541 } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_3 */ 542 543 /** 544 * struct iwl_lari_config_change_cmd_v4 - change LARI configuration 545 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a 546 * different predefined FW config operation. 547 * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets. 548 * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits 549 * per country, one to indicate whether to override and the other to 550 * indicate the value to use. 551 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits 552 * per country, one to indicate whether to override and the other to 553 * indicate allow/disallow unii4 channels. 554 */ 555 struct iwl_lari_config_change_cmd_v4 { 556 __le32 config_bitmap; 557 __le32 oem_uhb_allow_bitmap; 558 __le32 oem_11ax_allow_bitmap; 559 __le32 oem_unii4_allow_bitmap; 560 } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_4 */ 561 562 /** 563 * struct iwl_lari_config_change_cmd_v5 - change LARI configuration 564 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a 565 * different predefined FW config operation. 566 * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets. 567 * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits 568 * per country, one to indicate whether to override and the other to 569 * indicate the value to use. 570 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits 571 * per country, one to indicate whether to override and the other to 572 * indicate allow/disallow unii4 channels. 573 * @chan_state_active_bitmap: Bitmap for overriding channel state to active. 574 * Each bit represents a country or region to activate, according to the BIOS 575 * definitions. 576 */ 577 struct iwl_lari_config_change_cmd_v5 { 578 __le32 config_bitmap; 579 __le32 oem_uhb_allow_bitmap; 580 __le32 oem_11ax_allow_bitmap; 581 __le32 oem_unii4_allow_bitmap; 582 __le32 chan_state_active_bitmap; 583 } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_5 */ 584 585 /** 586 * struct iwl_lari_config_change_cmd_v6 - change LARI configuration 587 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a 588 * different predefined FW config operation. 589 * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets. 590 * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits 591 * per country, one to indicate whether to override and the other to 592 * indicate the value to use. 593 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits 594 * per country, one to indicate whether to override and the other to 595 * indicate allow/disallow unii4 channels. 596 * @chan_state_active_bitmap: Bitmap for overriding channel state to active. 597 * Each bit represents a country or region to activate, according to the BIOS 598 * definitions. 599 * @force_disable_channels_bitmap: Bitmap of disabled bands/channels. 600 * Each bit represents a set of channels in a specific band that should be disabled 601 */ 602 struct iwl_lari_config_change_cmd_v6 { 603 __le32 config_bitmap; 604 __le32 oem_uhb_allow_bitmap; 605 __le32 oem_11ax_allow_bitmap; 606 __le32 oem_unii4_allow_bitmap; 607 __le32 chan_state_active_bitmap; 608 __le32 force_disable_channels_bitmap; 609 } __packed; /* LARI_CHANGE_CONF_CMD_S_VER_6 */ 610 611 /** 612 * struct iwl_lari_config_change_cmd_v7 - change LARI configuration 613 * This structure is used also for lari cmd version 8. 614 * @config_bitmap: Bitmap of the config commands. Each bit will trigger a 615 * different predefined FW config operation. 616 * @oem_uhb_allow_bitmap: Bitmap of UHB enabled MCC sets. 617 * @oem_11ax_allow_bitmap: Bitmap of 11ax allowed MCCs. There are two bits 618 * per country, one to indicate whether to override and the other to 619 * indicate the value to use. 620 * @oem_unii4_allow_bitmap: Bitmap of unii4 allowed MCCs.There are two bits 621 * per country, one to indicate whether to override and the other to 622 * indicate allow/disallow unii4 channels. 623 * @chan_state_active_bitmap: Bitmap to enable different bands per country 624 * or region. 625 * Each bit represents a country or region, and a band to activate 626 * according to the BIOS definitions. 627 * For LARI cmd version 7 - bits 0:3 are supported. 628 * For LARI cmd version 8 - bits 0:4 are supported. 629 * @force_disable_channels_bitmap: Bitmap of disabled bands/channels. 630 * Each bit represents a set of channels in a specific band that should be 631 * disabled 632 * @edt_bitmap: Bitmap of energy detection threshold table. 633 * Disable/enable the EDT optimization method for different band. 634 */ 635 struct iwl_lari_config_change_cmd_v7 { 636 __le32 config_bitmap; 637 __le32 oem_uhb_allow_bitmap; 638 __le32 oem_11ax_allow_bitmap; 639 __le32 oem_unii4_allow_bitmap; 640 __le32 chan_state_active_bitmap; 641 __le32 force_disable_channels_bitmap; 642 __le32 edt_bitmap; 643 } __packed; 644 /* LARI_CHANGE_CONF_CMD_S_VER_7 */ 645 /* LARI_CHANGE_CONF_CMD_S_VER_8 */ 646 647 /* Activate UNII-1 (5.2GHz) for World Wide */ 648 #define ACTIVATE_5G2_IN_WW_MASK BIT(4) 649 650 /** 651 * struct iwl_pnvm_init_complete_ntfy - PNVM initialization complete 652 * @status: PNVM image loading status 653 */ 654 struct iwl_pnvm_init_complete_ntfy { 655 __le32 status; 656 } __packed; /* PNVM_INIT_COMPLETE_NTFY_S_VER_1 */ 657 658 #define UATS_TABLE_ROW_SIZE 26 659 #define UATS_TABLE_COL_SIZE 13 660 661 /** 662 * struct iwl_uats_table_cmd - struct for UATS_TABLE_CMD 663 * @offset_map: mapping a mcc to UHB AP type support (UATS) allowed 664 * @reserved: reserved 665 */ 666 struct iwl_uats_table_cmd { 667 u8 offset_map[UATS_TABLE_ROW_SIZE][UATS_TABLE_COL_SIZE]; 668 __le16 reserved; 669 } __packed; /* UATS_TABLE_CMD_S_VER_1 */ 670 671 #endif /* __iwl_fw_api_nvm_reg_h__ */ 672