1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 /* 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 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, 26 * &struct iwl_lari_config_change_cmd_v7, 27 * &struct iwl_lari_config_change_cmd_v10 or 28 * &struct iwl_lari_config_change_cmd 29 */ 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_rsp 36 */ 37 NVM_GET_INFO = 0x2, 38 39 /** 40 * @TAS_CONFIG: &union iwl_tas_config_cmd 41 */ 42 TAS_CONFIG = 0x3, 43 44 /** 45 * @SAR_OFFSET_MAPPING_TABLE_CMD: &struct iwl_sar_offset_mapping_cmd 46 */ 47 SAR_OFFSET_MAPPING_TABLE_CMD = 0x4, 48 49 /** 50 * @MCC_ALLOWED_AP_TYPE_CMD: &struct iwl_mcc_allowed_ap_type_cmd 51 */ 52 MCC_ALLOWED_AP_TYPE_CMD = 0x5, 53 54 /** 55 * @PNVM_INIT_COMPLETE_NTFY: &struct iwl_pnvm_init_complete_ntfy 56 */ 57 PNVM_INIT_COMPLETE_NTFY = 0xFE, 58 }; 59 60 /** 61 * enum iwl_nvm_access_op - NVM access opcode 62 * @IWL_NVM_READ: read NVM 63 * @IWL_NVM_WRITE: write NVM 64 */ 65 enum 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_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 75 */ 76 enum 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_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 92 */ 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, 102 }; 103 104 /** 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 112 */ 113 struct 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_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. 129 */ 130 struct 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 data 140 */ 141 struct 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 resp 147 * @NVM_GENERAL_FLAGS_EMPTY_OTP: 1 if OTP is empty 148 */ 149 enum 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 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 159 */ 160 struct 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_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 177 */ 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), 183 /** 184 * @NVM_MAC_SKU_FLAGS_802_11AX_ENABLED: true if 11ax enabled 185 */ 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 information 195 * @mac_sku_flags: flags for SKU, see &enum iwl_nvm_mac_sku_flags 196 */ 197 struct 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 information 203 * @tx_chains: BIT 0 chain A, BIT 1 chain B 204 * @rx_chains: BIT 0 chain A, BIT 1 chain B 205 */ 206 struct 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 51 212 #define IWL_NUM_CHANNELS 110 213 214 /** 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 219 */ 220 struct 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 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 231 */ 232 struct 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 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 244 */ 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 */ 251 252 /** 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 258 */ 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 */ 265 266 /** 267 * struct iwl_nvm_access_complete_cmd - NVM_ACCESS commands are completed 268 * @reserved: reserved 269 */ 270 struct iwl_nvm_access_complete_cmd { 271 __le32 reserved; 272 } __packed; /* NVM_ACCESS_COMPLETE_CMD_API_S_VER_1 */ 273 274 #define IWL_MCC_US 0x5553 275 #define IWL_MCC_CANADA 0x4341 276 277 /** 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 288 */ 289 struct 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 params 301 * for the 5 GHz band. 302 */ 303 enum 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 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 322 * 16bits are used. 323 */ 324 struct 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 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 350 * 16bits are used. 351 */ 352 struct 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 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 380 * 16bits are used. 381 */ 382 struct 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 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 409 */ 410 struct iwl_mcc_chub_notif { 411 __le16 mcc; 412 u8 source_id; 413 u8 reserved1; 414 } __packed; /* LAR_MCC_NOTIFY_S */ 415 416 enum 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 428 enum 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 16 444 /** 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 449 */ 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 */ 454 455 /** 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 460 */ 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 */ 465 466 /** 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 473 */ 474 struct 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 481 struct 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 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 495 * Indonesia 496 * @LARI_CONFIG_ENABLE_CHINA_22_REG_SUPPORT_MSK: enable 2022 china regulatory 497 */ 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), 504 }; 505 506 #define IWL_11AX_UKRAINE_MASK 3 507 #define IWL_11AX_UKRAINE_SHIFT 8 508 509 /** 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 513 */ 514 struct 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 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 523 */ 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 */ 528 529 /** 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 536 * in the bit field. 537 */ 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 */ 543 544 /** 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. 555 */ 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 */ 562 563 /** 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 576 * definitions. 577 */ 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 */ 585 586 /** 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 599 * 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 disabled 602 */ 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 */ 611 612 /** 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 627 * or region. 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 634 * disabled 635 * @edt_bitmap: Bitmap of energy detection threshold table. 636 * Disable/enable the EDT optimization method for different band. 637 */ 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; 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 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 664 * or region. 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 670 * disabled 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. 677 */ 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; 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 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 703 * or region. 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 711 * disabled 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 719 * unsupported bits 720 * bit0: enable 11be in China(CB/CN). 721 * bit1: enable 11be in South Korea. 722 * bit 2 - 31: reserved. 723 */ 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; 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 0x1F 741 742 /** 743 * struct iwl_pnvm_init_complete_ntfy - PNVM initialization complete 744 * @status: PNVM image loading status 745 */ 746 struct iwl_pnvm_init_complete_ntfy { 747 __le32 status; 748 } __packed; /* PNVM_INIT_COMPLETE_NTFY_S_VER_1 */ 749 750 #define UATS_TABLE_ROW_SIZE 26 751 #define UATS_TABLE_COL_SIZE 13 752 753 /** 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 757 */ 758 struct 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