1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 /* 3 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 4 * Copyright (C) 2016-2017 Intel Deutschland GmbH 5 * Copyright (C) 2018-2020 Intel Corporation 6 */ 7 #ifndef __iwl_fw_api_commands_h__ 8 #define __iwl_fw_api_commands_h__ 9 10 /** 11 * enum iwl_mvm_command_groups - command groups for the firmware 12 * @LEGACY_GROUP: legacy group, uses command IDs from &enum iwl_legacy_cmds 13 * @LONG_GROUP: legacy group with long header, also uses command IDs 14 * from &enum iwl_legacy_cmds 15 * @SYSTEM_GROUP: system group, uses command IDs from 16 * &enum iwl_system_subcmd_ids 17 * @MAC_CONF_GROUP: MAC configuration group, uses command IDs from 18 * &enum iwl_mac_conf_subcmd_ids 19 * @PHY_OPS_GROUP: PHY operations group, uses command IDs from 20 * &enum iwl_phy_ops_subcmd_ids 21 * @DATA_PATH_GROUP: data path group, uses command IDs from 22 * &enum iwl_data_path_subcmd_ids 23 * @NAN_GROUP: NAN group, uses command IDs from &enum iwl_nan_subcmd_ids 24 * @LOCATION_GROUP: location group, uses command IDs from 25 * &enum iwl_location_subcmd_ids 26 * @PROT_OFFLOAD_GROUP: protocol offload group, uses command IDs from 27 * &enum iwl_prot_offload_subcmd_ids 28 * @REGULATORY_AND_NVM_GROUP: regulatory/NVM group, uses command IDs from 29 * &enum iwl_regulatory_and_nvm_subcmd_ids 30 * @DEBUG_GROUP: Debug group, uses command IDs from &enum iwl_debug_cmds 31 */ 32 enum iwl_mvm_command_groups { 33 LEGACY_GROUP = 0x0, 34 LONG_GROUP = 0x1, 35 SYSTEM_GROUP = 0x2, 36 MAC_CONF_GROUP = 0x3, 37 PHY_OPS_GROUP = 0x4, 38 DATA_PATH_GROUP = 0x5, 39 NAN_GROUP = 0x7, 40 LOCATION_GROUP = 0x8, 41 PROT_OFFLOAD_GROUP = 0xb, 42 REGULATORY_AND_NVM_GROUP = 0xc, 43 DEBUG_GROUP = 0xf, 44 }; 45 46 /** 47 * enum iwl_legacy_cmds - legacy group command IDs 48 */ 49 enum iwl_legacy_cmds { 50 /** 51 * @UCODE_ALIVE_NTFY: 52 * Alive data from the firmware, as described in 53 * &struct iwl_alive_ntf_v3 or &struct iwl_alive_ntf_v4 or 54 * &struct iwl_alive_ntf_v5. 55 */ 56 UCODE_ALIVE_NTFY = 0x1, 57 58 /** 59 * @REPLY_ERROR: Cause an error in the firmware, for testing purposes. 60 */ 61 REPLY_ERROR = 0x2, 62 63 /** 64 * @ECHO_CMD: Send data to the device to have it returned immediately. 65 */ 66 ECHO_CMD = 0x3, 67 68 /** 69 * @INIT_COMPLETE_NOTIF: Notification that initialization is complete. 70 */ 71 INIT_COMPLETE_NOTIF = 0x4, 72 73 /** 74 * @PHY_CONTEXT_CMD: 75 * Add/modify/remove a PHY context, using &struct iwl_phy_context_cmd. 76 */ 77 PHY_CONTEXT_CMD = 0x8, 78 79 /** 80 * @DBG_CFG: Debug configuration command. 81 */ 82 DBG_CFG = 0x9, 83 84 /** 85 * @SCAN_ITERATION_COMPLETE_UMAC: 86 * Firmware indicates a scan iteration completed, using 87 * &struct iwl_umac_scan_iter_complete_notif. 88 */ 89 SCAN_ITERATION_COMPLETE_UMAC = 0xb5, 90 91 /** 92 * @SCAN_CFG_CMD: 93 * uses &struct iwl_scan_config_v1 or &struct iwl_scan_config 94 */ 95 SCAN_CFG_CMD = 0xc, 96 97 /** 98 * @SCAN_REQ_UMAC: uses &struct iwl_scan_req_umac 99 */ 100 SCAN_REQ_UMAC = 0xd, 101 102 /** 103 * @SCAN_ABORT_UMAC: uses &struct iwl_umac_scan_abort 104 */ 105 SCAN_ABORT_UMAC = 0xe, 106 107 /** 108 * @SCAN_COMPLETE_UMAC: uses &struct iwl_umac_scan_complete 109 */ 110 SCAN_COMPLETE_UMAC = 0xf, 111 112 /** 113 * @BA_WINDOW_STATUS_NOTIFICATION_ID: 114 * uses &struct iwl_ba_window_status_notif 115 */ 116 BA_WINDOW_STATUS_NOTIFICATION_ID = 0x13, 117 118 /** 119 * @ADD_STA_KEY: 120 * &struct iwl_mvm_add_sta_key_cmd_v1 or 121 * &struct iwl_mvm_add_sta_key_cmd. 122 */ 123 ADD_STA_KEY = 0x17, 124 125 /** 126 * @ADD_STA: 127 * &struct iwl_mvm_add_sta_cmd or &struct iwl_mvm_add_sta_cmd_v7. 128 */ 129 ADD_STA = 0x18, 130 131 /** 132 * @REMOVE_STA: &struct iwl_mvm_rm_sta_cmd 133 */ 134 REMOVE_STA = 0x19, 135 136 /** 137 * @FW_GET_ITEM_CMD: uses &struct iwl_fw_get_item_cmd 138 */ 139 FW_GET_ITEM_CMD = 0x1a, 140 141 /** 142 * @TX_CMD: uses &struct iwl_tx_cmd or &struct iwl_tx_cmd_gen2 or 143 * &struct iwl_tx_cmd_gen3, 144 * response in &struct iwl_mvm_tx_resp or 145 * &struct iwl_mvm_tx_resp_v3 146 */ 147 TX_CMD = 0x1c, 148 149 /** 150 * @TXPATH_FLUSH: &struct iwl_tx_path_flush_cmd 151 */ 152 TXPATH_FLUSH = 0x1e, 153 154 /** 155 * @MGMT_MCAST_KEY: 156 * &struct iwl_mvm_mgmt_mcast_key_cmd or 157 * &struct iwl_mvm_mgmt_mcast_key_cmd_v1 158 */ 159 MGMT_MCAST_KEY = 0x1f, 160 161 /* scheduler config */ 162 /** 163 * @SCD_QUEUE_CFG: &struct iwl_scd_txq_cfg_cmd for older hardware, 164 * &struct iwl_tx_queue_cfg_cmd with &struct iwl_tx_queue_cfg_rsp 165 * for newer (22000) hardware. 166 */ 167 SCD_QUEUE_CFG = 0x1d, 168 169 /** 170 * @WEP_KEY: uses &struct iwl_mvm_wep_key_cmd 171 */ 172 WEP_KEY = 0x20, 173 174 /** 175 * @SHARED_MEM_CFG: 176 * retrieve shared memory configuration - response in 177 * &struct iwl_shared_mem_cfg 178 */ 179 SHARED_MEM_CFG = 0x25, 180 181 /** 182 * @TDLS_CHANNEL_SWITCH_CMD: uses &struct iwl_tdls_channel_switch_cmd 183 */ 184 TDLS_CHANNEL_SWITCH_CMD = 0x27, 185 186 /** 187 * @TDLS_CHANNEL_SWITCH_NOTIFICATION: 188 * uses &struct iwl_tdls_channel_switch_notif 189 */ 190 TDLS_CHANNEL_SWITCH_NOTIFICATION = 0xaa, 191 192 /** 193 * @TDLS_CONFIG_CMD: 194 * &struct iwl_tdls_config_cmd, response in &struct iwl_tdls_config_res 195 */ 196 TDLS_CONFIG_CMD = 0xa7, 197 198 /** 199 * @MAC_CONTEXT_CMD: &struct iwl_mac_ctx_cmd 200 */ 201 MAC_CONTEXT_CMD = 0x28, 202 203 /** 204 * @TIME_EVENT_CMD: 205 * &struct iwl_time_event_cmd, response in &struct iwl_time_event_resp 206 */ 207 TIME_EVENT_CMD = 0x29, /* both CMD and response */ 208 209 /** 210 * @TIME_EVENT_NOTIFICATION: &struct iwl_time_event_notif 211 */ 212 TIME_EVENT_NOTIFICATION = 0x2a, 213 214 /** 215 * @BINDING_CONTEXT_CMD: 216 * &struct iwl_binding_cmd or &struct iwl_binding_cmd_v1 217 */ 218 BINDING_CONTEXT_CMD = 0x2b, 219 220 /** 221 * @TIME_QUOTA_CMD: &struct iwl_time_quota_cmd 222 */ 223 TIME_QUOTA_CMD = 0x2c, 224 225 /** 226 * @NON_QOS_TX_COUNTER_CMD: 227 * command is &struct iwl_nonqos_seq_query_cmd 228 */ 229 NON_QOS_TX_COUNTER_CMD = 0x2d, 230 231 /** 232 * @LEDS_CMD: command is &struct iwl_led_cmd 233 */ 234 LEDS_CMD = 0x48, 235 236 /** 237 * @LQ_CMD: using &struct iwl_lq_cmd 238 */ 239 LQ_CMD = 0x4e, 240 241 /** 242 * @FW_PAGING_BLOCK_CMD: 243 * &struct iwl_fw_paging_cmd 244 */ 245 FW_PAGING_BLOCK_CMD = 0x4f, 246 247 /** 248 * @SCAN_OFFLOAD_REQUEST_CMD: uses &struct iwl_scan_req_lmac 249 */ 250 SCAN_OFFLOAD_REQUEST_CMD = 0x51, 251 252 /** 253 * @SCAN_OFFLOAD_ABORT_CMD: abort the scan - no further contents 254 */ 255 SCAN_OFFLOAD_ABORT_CMD = 0x52, 256 257 /** 258 * @HOT_SPOT_CMD: uses &struct iwl_hs20_roc_req 259 */ 260 HOT_SPOT_CMD = 0x53, 261 262 /** 263 * @SCAN_OFFLOAD_COMPLETE: 264 * notification, &struct iwl_periodic_scan_complete 265 */ 266 SCAN_OFFLOAD_COMPLETE = 0x6D, 267 268 /** 269 * @SCAN_OFFLOAD_UPDATE_PROFILES_CMD: 270 * update scan offload (scheduled scan) profiles/blocklist/etc. 271 */ 272 SCAN_OFFLOAD_UPDATE_PROFILES_CMD = 0x6E, 273 274 /** 275 * @MATCH_FOUND_NOTIFICATION: scan match found 276 */ 277 MATCH_FOUND_NOTIFICATION = 0xd9, 278 279 /** 280 * @SCAN_ITERATION_COMPLETE: 281 * uses &struct iwl_lmac_scan_complete_notif 282 */ 283 SCAN_ITERATION_COMPLETE = 0xe7, 284 285 /* Phy */ 286 /** 287 * @PHY_CONFIGURATION_CMD: &struct iwl_phy_cfg_cmd_v1 or &struct iwl_phy_cfg_cmd_v3 288 */ 289 PHY_CONFIGURATION_CMD = 0x6a, 290 291 /** 292 * @CALIB_RES_NOTIF_PHY_DB: &struct iwl_calib_res_notif_phy_db 293 */ 294 CALIB_RES_NOTIF_PHY_DB = 0x6b, 295 296 /** 297 * @PHY_DB_CMD: &struct iwl_phy_db_cmd 298 */ 299 PHY_DB_CMD = 0x6c, 300 301 /** 302 * @POWER_TABLE_CMD: &struct iwl_device_power_cmd 303 */ 304 POWER_TABLE_CMD = 0x77, 305 306 /** 307 * @PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION: 308 * &struct iwl_uapsd_misbehaving_ap_notif 309 */ 310 PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION = 0x78, 311 312 /** 313 * @LTR_CONFIG: &struct iwl_ltr_config_cmd 314 */ 315 LTR_CONFIG = 0xee, 316 317 /** 318 * @REPLY_THERMAL_MNG_BACKOFF: 319 * Thermal throttling command 320 */ 321 REPLY_THERMAL_MNG_BACKOFF = 0x7e, 322 323 /** 324 * @DC2DC_CONFIG_CMD: 325 * Set/Get DC2DC frequency tune 326 * Command is &struct iwl_dc2dc_config_cmd, 327 * response is &struct iwl_dc2dc_config_resp 328 */ 329 DC2DC_CONFIG_CMD = 0x83, 330 331 /** 332 * @NVM_ACCESS_CMD: using &struct iwl_nvm_access_cmd 333 */ 334 NVM_ACCESS_CMD = 0x88, 335 336 /** 337 * @BEACON_NOTIFICATION: &struct iwl_extended_beacon_notif 338 */ 339 BEACON_NOTIFICATION = 0x90, 340 341 /** 342 * @BEACON_TEMPLATE_CMD: 343 * Uses one of &struct iwl_mac_beacon_cmd_v6, 344 * &struct iwl_mac_beacon_cmd_v7 or &struct iwl_mac_beacon_cmd 345 * depending on the device version. 346 */ 347 BEACON_TEMPLATE_CMD = 0x91, 348 /** 349 * @TX_ANT_CONFIGURATION_CMD: &struct iwl_tx_ant_cfg_cmd 350 */ 351 TX_ANT_CONFIGURATION_CMD = 0x98, 352 353 /** 354 * @STATISTICS_CMD: 355 * one of &struct iwl_statistics_cmd, 356 * &struct iwl_notif_statistics_v11, 357 * &struct iwl_notif_statistics_v10, 358 * &struct iwl_notif_statistics, 359 * &struct iwl_statistics_operational_ntfy 360 */ 361 STATISTICS_CMD = 0x9c, 362 363 /** 364 * @STATISTICS_NOTIFICATION: 365 * one of &struct iwl_notif_statistics_v10, 366 * &struct iwl_notif_statistics_v11, 367 * &struct iwl_notif_statistic, 368 * &struct iwl_statistics_operational_ntfy 369 */ 370 STATISTICS_NOTIFICATION = 0x9d, 371 372 /** 373 * @EOSP_NOTIFICATION: 374 * Notify that a service period ended, 375 * &struct iwl_mvm_eosp_notification 376 */ 377 EOSP_NOTIFICATION = 0x9e, 378 379 /** 380 * @REDUCE_TX_POWER_CMD: 381 * &struct iwl_dev_tx_power_cmd 382 */ 383 REDUCE_TX_POWER_CMD = 0x9f, 384 385 /** 386 * @CARD_STATE_NOTIFICATION: 387 * Card state (RF/CT kill) notification, 388 * uses &struct iwl_card_state_notif 389 */ 390 CARD_STATE_NOTIFICATION = 0xa1, 391 392 /** 393 * @MISSED_BEACONS_NOTIFICATION: &struct iwl_missed_beacons_notif 394 */ 395 MISSED_BEACONS_NOTIFICATION = 0xa2, 396 397 /** 398 * @MAC_PM_POWER_TABLE: using &struct iwl_mac_power_cmd 399 */ 400 MAC_PM_POWER_TABLE = 0xa9, 401 402 /** 403 * @MFUART_LOAD_NOTIFICATION: &struct iwl_mfuart_load_notif 404 */ 405 MFUART_LOAD_NOTIFICATION = 0xb1, 406 407 /** 408 * @RSS_CONFIG_CMD: &struct iwl_rss_config_cmd 409 */ 410 RSS_CONFIG_CMD = 0xb3, 411 412 /** 413 * @REPLY_RX_PHY_CMD: &struct iwl_rx_phy_info 414 */ 415 REPLY_RX_PHY_CMD = 0xc0, 416 417 /** 418 * @REPLY_RX_MPDU_CMD: 419 * &struct iwl_rx_mpdu_res_start or &struct iwl_rx_mpdu_desc 420 */ 421 REPLY_RX_MPDU_CMD = 0xc1, 422 423 /** 424 * @BAR_FRAME_RELEASE: Frame release from BAR notification, used for 425 * multi-TID BAR (previously, the BAR frame itself was reported 426 * instead). Uses &struct iwl_bar_frame_release. 427 */ 428 BAR_FRAME_RELEASE = 0xc2, 429 430 /** 431 * @FRAME_RELEASE: 432 * Frame release (reorder helper) notification, uses 433 * &struct iwl_frame_release 434 */ 435 FRAME_RELEASE = 0xc3, 436 437 /** 438 * @BA_NOTIF: 439 * BlockAck notification, uses &struct iwl_mvm_compressed_ba_notif 440 * or &struct iwl_mvm_ba_notif depending on the HW 441 */ 442 BA_NOTIF = 0xc5, 443 444 /* Location Aware Regulatory */ 445 /** 446 * @MCC_UPDATE_CMD: using &struct iwl_mcc_update_cmd 447 */ 448 MCC_UPDATE_CMD = 0xc8, 449 450 /** 451 * @MCC_CHUB_UPDATE_CMD: using &struct iwl_mcc_chub_notif 452 */ 453 MCC_CHUB_UPDATE_CMD = 0xc9, 454 455 /** 456 * @MARKER_CMD: trace marker command, uses &struct iwl_mvm_marker 457 * with &struct iwl_mvm_marker_rsp 458 */ 459 MARKER_CMD = 0xcb, 460 461 /** 462 * @BT_PROFILE_NOTIFICATION: &struct iwl_bt_coex_profile_notif 463 */ 464 BT_PROFILE_NOTIFICATION = 0xce, 465 466 /** 467 * @BT_CONFIG: &struct iwl_bt_coex_cmd 468 */ 469 BT_CONFIG = 0x9b, 470 471 /** 472 * @BT_COEX_UPDATE_REDUCED_TXP: 473 * &struct iwl_bt_coex_reduced_txp_update_cmd 474 */ 475 BT_COEX_UPDATE_REDUCED_TXP = 0x5c, 476 477 /** 478 * @BT_COEX_CI: &struct iwl_bt_coex_ci_cmd 479 */ 480 BT_COEX_CI = 0x5d, 481 482 /** 483 * @REPLY_SF_CFG_CMD: &struct iwl_sf_cfg_cmd 484 */ 485 REPLY_SF_CFG_CMD = 0xd1, 486 /** 487 * @REPLY_BEACON_FILTERING_CMD: &struct iwl_beacon_filter_cmd 488 */ 489 REPLY_BEACON_FILTERING_CMD = 0xd2, 490 491 /** 492 * @DTS_MEASUREMENT_NOTIFICATION: 493 * &struct iwl_dts_measurement_notif_v1 or 494 * &struct iwl_dts_measurement_notif_v2 495 */ 496 DTS_MEASUREMENT_NOTIFICATION = 0xdd, 497 498 /** 499 * @LDBG_CONFIG_CMD: configure continuous trace recording 500 */ 501 LDBG_CONFIG_CMD = 0xf6, 502 503 /** 504 * @DEBUG_LOG_MSG: Debugging log data from firmware 505 */ 506 DEBUG_LOG_MSG = 0xf7, 507 508 /** 509 * @BCAST_FILTER_CMD: &struct iwl_bcast_filter_cmd 510 */ 511 BCAST_FILTER_CMD = 0xcf, 512 513 /** 514 * @MCAST_FILTER_CMD: &struct iwl_mcast_filter_cmd 515 */ 516 MCAST_FILTER_CMD = 0xd0, 517 518 /** 519 * @D3_CONFIG_CMD: &struct iwl_d3_manager_config 520 */ 521 D3_CONFIG_CMD = 0xd3, 522 523 /** 524 * @PROT_OFFLOAD_CONFIG_CMD: Depending on firmware, uses one of 525 * &struct iwl_proto_offload_cmd_v1, &struct iwl_proto_offload_cmd_v2, 526 * &struct iwl_proto_offload_cmd_v3_small, 527 * &struct iwl_proto_offload_cmd_v3_large 528 */ 529 PROT_OFFLOAD_CONFIG_CMD = 0xd4, 530 531 /** 532 * @OFFLOADS_QUERY_CMD: 533 * No data in command, response in &struct iwl_wowlan_status 534 */ 535 OFFLOADS_QUERY_CMD = 0xd5, 536 537 /** 538 * @REMOTE_WAKE_CONFIG_CMD: &struct iwl_wowlan_remote_wake_config 539 */ 540 REMOTE_WAKE_CONFIG_CMD = 0xd6, 541 542 /** 543 * @D0I3_END_CMD: End D0i3/D3 state, no command data 544 */ 545 D0I3_END_CMD = 0xed, 546 547 /** 548 * @WOWLAN_PATTERNS: &struct iwl_wowlan_patterns_cmd 549 */ 550 WOWLAN_PATTERNS = 0xe0, 551 552 /** 553 * @WOWLAN_CONFIGURATION: &struct iwl_wowlan_config_cmd 554 */ 555 WOWLAN_CONFIGURATION = 0xe1, 556 557 /** 558 * @WOWLAN_TSC_RSC_PARAM: &struct iwl_wowlan_rsc_tsc_params_cmd 559 */ 560 WOWLAN_TSC_RSC_PARAM = 0xe2, 561 562 /** 563 * @WOWLAN_TKIP_PARAM: &struct iwl_wowlan_tkip_params_cmd 564 */ 565 WOWLAN_TKIP_PARAM = 0xe3, 566 567 /** 568 * @WOWLAN_KEK_KCK_MATERIAL: &struct iwl_wowlan_kek_kck_material_cmd 569 */ 570 WOWLAN_KEK_KCK_MATERIAL = 0xe4, 571 572 /** 573 * @WOWLAN_GET_STATUSES: response in &struct iwl_wowlan_status 574 */ 575 WOWLAN_GET_STATUSES = 0xe5, 576 577 /** 578 * @SCAN_OFFLOAD_PROFILES_QUERY_CMD: 579 * No command data, response is &struct iwl_scan_offload_profiles_query 580 */ 581 SCAN_OFFLOAD_PROFILES_QUERY_CMD = 0x56, 582 }; 583 584 /** 585 * enum iwl_system_subcmd_ids - system group command IDs 586 */ 587 enum iwl_system_subcmd_ids { 588 /** 589 * @SHARED_MEM_CFG_CMD: 590 * response in &struct iwl_shared_mem_cfg or 591 * &struct iwl_shared_mem_cfg_v2 592 */ 593 SHARED_MEM_CFG_CMD = 0x0, 594 595 /** 596 * @SOC_CONFIGURATION_CMD: &struct iwl_soc_configuration_cmd 597 */ 598 SOC_CONFIGURATION_CMD = 0x01, 599 600 /** 601 * @INIT_EXTENDED_CFG_CMD: &struct iwl_init_extended_cfg_cmd 602 */ 603 INIT_EXTENDED_CFG_CMD = 0x03, 604 605 /** 606 * @FW_ERROR_RECOVERY_CMD: &struct iwl_fw_error_recovery_cmd 607 */ 608 FW_ERROR_RECOVERY_CMD = 0x7, 609 610 /** 611 * @RFI_CONFIG_CMD: &struct iwl_rfi_config_cmd 612 */ 613 RFI_CONFIG_CMD = 0xb, 614 615 /** 616 * @RFI_GET_FREQ_TABLE_CMD: &struct iwl_rfi_config_cmd 617 */ 618 RFI_GET_FREQ_TABLE_CMD = 0xc, 619 }; 620 621 #endif /* __iwl_fw_api_commands_h__ */ 622