1 /******************************************************************************
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
8 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
9 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
10 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of version 2 of the GNU General Public License as
14 * published by the Free Software Foundation.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
26 * The full GNU General Public License is included in this distribution
27 * in the file called COPYING.
29 * Contact Information:
30 * Intel Linux Wireless <linuxwifi@intel.com>
31 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
35 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
36 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
37 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
38 * All rights reserved.
40 * Redistribution and use in source and binary forms, with or without
41 * modification, are permitted provided that the following conditions
44 * * Redistributions of source code must retain the above copyright
45 * notice, this list of conditions and the following disclaimer.
46 * * Redistributions in binary form must reproduce the above copyright
47 * notice, this list of conditions and the following disclaimer in
48 * the documentation and/or other materials provided with the
50 * * Neither the name Intel Corporation nor the names of its
51 * contributors may be used to endorse or promote products derived
52 * from this software without specific prior written permission.
54 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
55 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
56 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
57 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
58 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
59 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
60 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
61 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
62 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
63 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
64 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
66 *****************************************************************************/
71 #include "fw-api-rs.h"
72 #include "fw-api-rx.h"
73 #include "fw-api-tx.h"
74 #include "fw-api-sta.h"
75 #include "fw-api-mac.h"
76 #include "fw-api-power.h"
77 #include "fw-api-d3.h"
78 #include "fw-api-coex.h"
79 #include "fw-api-scan.h"
80 #include "fw-api-stats.h"
81 #include "fw-api-tof.h"
83 /* Tx queue numbers for non-DQA mode */
85 IWL_MVM_OFFCHANNEL_QUEUE
= 8,
86 IWL_MVM_CMD_QUEUE
= 9,
92 * @IWL_MVM_DQA_CMD_QUEUE: a queue reserved for sending HCMDs to the FW
93 * @IWL_MVM_DQA_AUX_QUEUE: a queue reserved for aux frames
94 * @IWL_MVM_DQA_P2P_DEVICE_QUEUE: a queue reserved for P2P device frames
95 * @IWL_MVM_DQA_GCAST_QUEUE: a queue reserved for P2P GO/SoftAP GCAST frames
96 * @IWL_MVM_DQA_BSS_CLIENT_QUEUE: a queue reserved for BSS activity, to ensure
97 * that we are never left without the possibility to connect to an AP.
98 * @IWL_MVM_DQA_MIN_MGMT_QUEUE: first TXQ in pool for MGMT and non-QOS frames.
99 * Each MGMT queue is mapped to a single STA
100 * MGMT frames are frames that return true on ieee80211_is_mgmt()
101 * @IWL_MVM_DQA_MAX_MGMT_QUEUE: last TXQ in pool for MGMT frames
102 * @IWL_MVM_DQA_AP_PROBE_RESP_QUEUE: a queue reserved for P2P GO/SoftAP probe
104 * @IWL_MVM_DQA_MIN_DATA_QUEUE: first TXQ in pool for DATA frames.
105 * DATA frames are intended for !ieee80211_is_mgmt() frames, but if
106 * the MGMT TXQ pool is exhausted, mgmt frames can be sent on DATA queues
108 * @IWL_MVM_DQA_MAX_DATA_QUEUE: last TXQ in pool for DATA frames
110 enum iwl_mvm_dqa_txq
{
111 IWL_MVM_DQA_CMD_QUEUE
= 0,
112 IWL_MVM_DQA_AUX_QUEUE
= 1,
113 IWL_MVM_DQA_P2P_DEVICE_QUEUE
= 2,
114 IWL_MVM_DQA_GCAST_QUEUE
= 3,
115 IWL_MVM_DQA_BSS_CLIENT_QUEUE
= 4,
116 IWL_MVM_DQA_MIN_MGMT_QUEUE
= 5,
117 IWL_MVM_DQA_MAX_MGMT_QUEUE
= 8,
118 IWL_MVM_DQA_AP_PROBE_RESP_QUEUE
= 9,
119 IWL_MVM_DQA_MIN_DATA_QUEUE
= 10,
120 IWL_MVM_DQA_MAX_DATA_QUEUE
= 31,
123 enum iwl_mvm_tx_fifo
{
124 IWL_MVM_TX_FIFO_BK
= 0,
128 IWL_MVM_TX_FIFO_MCAST
= 5,
129 IWL_MVM_TX_FIFO_CMD
= 7,
134 * enum iwl_legacy_cmds - legacy group command IDs
136 enum iwl_legacy_cmds
{
139 * Alive data from the firmware, as described in
140 * &struct mvm_alive_resp_v3 or &struct mvm_alive_resp.
145 * @REPLY_ERROR: Cause an error in the firmware, for testing purposes.
150 * @ECHO_CMD: Send data to the device to have it returned immediately.
155 * @INIT_COMPLETE_NOTIF: Notification that initialization is complete.
157 INIT_COMPLETE_NOTIF
= 0x4,
161 * Add/modify/remove a PHY context, using &struct iwl_phy_context_cmd.
163 PHY_CONTEXT_CMD
= 0x8,
166 * @DBG_CFG: Debug configuration command.
171 * @ANTENNA_COUPLING_NOTIFICATION:
172 * Antenna coupling data, &struct iwl_mvm_antenna_coupling_notif
174 ANTENNA_COUPLING_NOTIFICATION
= 0xa,
177 * @SCAN_ITERATION_COMPLETE_UMAC:
178 * Firmware indicates a scan iteration completed, using
179 * &struct iwl_umac_scan_iter_complete_notif.
181 SCAN_ITERATION_COMPLETE_UMAC
= 0xb5,
185 * uses &struct iwl_scan_config_v1 or &struct iwl_scan_config
189 SCAN_ABORT_UMAC
= 0xe,
192 * @SCAN_COMPLETE_UMAC: uses &struct iwl_umac_scan_complete
194 SCAN_COMPLETE_UMAC
= 0xf,
196 BA_WINDOW_STATUS_NOTIFICATION_ID
= 0x13,
200 * &struct iwl_mvm_add_sta_key_cmd_v1 or
201 * &struct iwl_mvm_add_sta_key_cmd.
207 * &struct iwl_mvm_add_sta_cmd or &struct iwl_mvm_add_sta_cmd_v7.
211 * @REMOVE_STA: &struct iwl_mvm_rm_sta_cmd
215 /* paging get item */
216 FW_GET_ITEM_CMD
= 0x1a,
219 * @TX_CMD: uses &struct iwl_tx_cmd or &struct iwl_tx_cmd_gen2,
220 * response in &struct iwl_mvm_tx_resp or
221 * &struct iwl_mvm_tx_resp_v3
226 * @TXPATH_FLUSH: &struct iwl_tx_path_flush_cmd
232 * &struct iwl_mvm_mgmt_mcast_key_cmd or
233 * &struct iwl_mvm_mgmt_mcast_key_cmd_v1
235 MGMT_MCAST_KEY
= 0x1f,
237 /* scheduler config */
239 * @SCD_QUEUE_CFG: &struct iwl_scd_txq_cfg_cmd for older hardware,
240 * &struct iwl_tx_queue_cfg_cmd with &struct iwl_tx_queue_cfg_rsp
241 * for newer (A000) hardware.
243 SCD_QUEUE_CFG
= 0x1d,
249 SHARED_MEM_CFG
= 0x25,
252 TDLS_CHANNEL_SWITCH_CMD
= 0x27,
253 TDLS_CHANNEL_SWITCH_NOTIFICATION
= 0xaa,
254 TDLS_CONFIG_CMD
= 0xa7,
257 * @MAC_CONTEXT_CMD: &struct iwl_mac_ctx_cmd
259 MAC_CONTEXT_CMD
= 0x28,
263 * &struct iwl_time_event_cmd, response in &struct iwl_time_event_resp
265 TIME_EVENT_CMD
= 0x29, /* both CMD and response */
267 * @TIME_EVENT_NOTIFICATION: &struct iwl_time_event_notif
269 TIME_EVENT_NOTIFICATION
= 0x2a,
271 * @BINDING_CONTEXT_CMD:
272 * &struct iwl_binding_cmd or &struct iwl_binding_cmd_v1
274 BINDING_CONTEXT_CMD
= 0x2b,
276 * @TIME_QUOTA_CMD: &struct iwl_time_quota_cmd
278 TIME_QUOTA_CMD
= 0x2c,
279 NON_QOS_TX_COUNTER_CMD
= 0x2d,
282 * @LQ_CMD: using &struct iwl_lq_cmd
287 * @FW_PAGING_BLOCK_CMD:
288 * &struct iwl_fw_paging_cmd or &struct iwl_fw_paging_cmd_v1
290 FW_PAGING_BLOCK_CMD
= 0x4f,
293 SCAN_OFFLOAD_REQUEST_CMD
= 0x51,
294 SCAN_OFFLOAD_ABORT_CMD
= 0x52,
296 SCAN_OFFLOAD_COMPLETE
= 0x6D,
297 SCAN_OFFLOAD_UPDATE_PROFILES_CMD
= 0x6E,
298 SCAN_OFFLOAD_CONFIG_CMD
= 0x6f,
299 MATCH_FOUND_NOTIFICATION
= 0xd9,
300 SCAN_ITERATION_COMPLETE
= 0xe7,
304 * @PHY_CONFIGURATION_CMD: &struct iwl_phy_cfg_cmd
306 PHY_CONFIGURATION_CMD
= 0x6a,
307 CALIB_RES_NOTIF_PHY_DB
= 0x6b,
310 /* ToF - 802.11mc FTM */
312 TOF_NOTIFICATION
= 0x11,
315 * @POWER_TABLE_CMD: &struct iwl_device_power_cmd
317 POWER_TABLE_CMD
= 0x77,
318 PSM_UAPSD_AP_MISBEHAVING_NOTIFICATION
= 0x78,
321 /* Thermal Throttling*/
322 REPLY_THERMAL_MNG_BACKOFF
= 0x7e,
324 /* Set/Get DC2DC frequency tune */
325 DC2DC_CONFIG_CMD
= 0x83,
328 * @NVM_ACCESS_CMD: using &struct iwl_nvm_access_cmd
330 NVM_ACCESS_CMD
= 0x88,
332 SET_CALIB_DEFAULT_CMD
= 0x8e,
334 BEACON_NOTIFICATION
= 0x90,
336 * @BEACON_TEMPLATE_CMD:
337 * Uses one of &struct iwl_mac_beacon_cmd_v6,
338 * &struct iwl_mac_beacon_cmd_v7 or &struct iwl_mac_beacon_cmd
339 * depending on the device version.
341 BEACON_TEMPLATE_CMD
= 0x91,
343 * @TX_ANT_CONFIGURATION_CMD: &struct iwl_tx_ant_cfg_cmd
345 TX_ANT_CONFIGURATION_CMD
= 0x98,
348 * @STATISTICS_CMD: &struct iwl_statistics_cmd
350 STATISTICS_CMD
= 0x9c,
353 * @STATISTICS_NOTIFICATION:
354 * one of &struct iwl_notif_statistics_v10,
355 * &struct iwl_notif_statistics_v11,
356 * &struct iwl_notif_statistics_cdb
358 STATISTICS_NOTIFICATION
= 0x9d,
359 EOSP_NOTIFICATION
= 0x9e,
362 * @REDUCE_TX_POWER_CMD:
363 * &struct iwl_dev_tx_power_cmd_v3 or &struct iwl_dev_tx_power_cmd
365 REDUCE_TX_POWER_CMD
= 0x9f,
367 /* RF-KILL commands and notifications */
368 CARD_STATE_CMD
= 0xa0,
369 CARD_STATE_NOTIFICATION
= 0xa1,
371 MISSED_BEACONS_NOTIFICATION
= 0xa2,
374 * @MAC_PM_POWER_TABLE: using &struct iwl_mac_power_cmd
376 MAC_PM_POWER_TABLE
= 0xa9,
379 * @MFUART_LOAD_NOTIFICATION: &struct iwl_mfuart_load_notif
381 MFUART_LOAD_NOTIFICATION
= 0xb1,
384 * @RSS_CONFIG_CMD: &struct iwl_rss_config_cmd
386 RSS_CONFIG_CMD
= 0xb3,
389 * @REPLY_RX_PHY_CMD: &struct iwl_rx_phy_info
391 REPLY_RX_PHY_CMD
= 0xc0,
394 * @REPLY_RX_MPDU_CMD:
395 * &struct iwl_rx_mpdu_res_start or &struct iwl_rx_mpdu_desc
397 REPLY_RX_MPDU_CMD
= 0xc1,
398 FRAME_RELEASE
= 0xc3,
401 /* Location Aware Regulatory */
403 * @MCC_UPDATE_CMD: using &struct iwl_mcc_update_cmd
405 MCC_UPDATE_CMD
= 0xc8,
408 * @MCC_CHUB_UPDATE_CMD: using &struct iwl_mcc_chub_notif
410 MCC_CHUB_UPDATE_CMD
= 0xc9,
415 BT_COEX_PRIO_TABLE
= 0xcc,
416 BT_COEX_PROT_ENV
= 0xcd,
418 * @BT_PROFILE_NOTIFICATION: &struct iwl_bt_coex_profile_notif
420 BT_PROFILE_NOTIFICATION
= 0xce,
422 * @BT_CONFIG: &struct iwl_bt_coex_cmd
425 BT_COEX_UPDATE_SW_BOOST
= 0x5a,
426 BT_COEX_UPDATE_CORUN_LUT
= 0x5b,
427 BT_COEX_UPDATE_REDUCED_TXP
= 0x5c,
429 * @BT_COEX_CI: &struct iwl_bt_coex_ci_cmd
434 * @REPLY_SF_CFG_CMD: &struct iwl_sf_cfg_cmd
436 REPLY_SF_CFG_CMD
= 0xd1,
438 * @REPLY_BEACON_FILTERING_CMD: &struct iwl_beacon_filter_cmd
440 REPLY_BEACON_FILTERING_CMD
= 0xd2,
442 /* DTS measurements */
443 CMD_DTS_MEASUREMENT_TRIGGER
= 0xdc,
444 DTS_MEASUREMENT_NOTIFICATION
= 0xdd,
446 REPLY_DEBUG_CMD
= 0xf0,
447 LDBG_CONFIG_CMD
= 0xf6,
448 DEBUG_LOG_MSG
= 0xf7,
450 BCAST_FILTER_CMD
= 0xcf,
451 MCAST_FILTER_CMD
= 0xd0,
454 * @D3_CONFIG_CMD: &struct iwl_d3_manager_config
456 D3_CONFIG_CMD
= 0xd3,
457 PROT_OFFLOAD_CONFIG_CMD
= 0xd4,
458 OFFLOADS_QUERY_CMD
= 0xd5,
459 REMOTE_WAKE_CONFIG_CMD
= 0xd6,
463 * @WOWLAN_PATTERNS: &struct iwl_wowlan_patterns_cmd
465 WOWLAN_PATTERNS
= 0xe0,
468 * @WOWLAN_CONFIGURATION: &struct iwl_wowlan_config_cmd
470 WOWLAN_CONFIGURATION
= 0xe1,
472 * @WOWLAN_TSC_RSC_PARAM: &struct iwl_wowlan_rsc_tsc_params_cmd
474 WOWLAN_TSC_RSC_PARAM
= 0xe2,
476 * @WOWLAN_TKIP_PARAM: &struct iwl_wowlan_tkip_params_cmd
478 WOWLAN_TKIP_PARAM
= 0xe3,
480 * @WOWLAN_KEK_KCK_MATERIAL: &struct iwl_wowlan_kek_kck_material_cmd
482 WOWLAN_KEK_KCK_MATERIAL
= 0xe4,
484 * @WOWLAN_GET_STATUSES: response in &struct iwl_wowlan_status
486 WOWLAN_GET_STATUSES
= 0xe5,
487 WOWLAN_TX_POWER_PER_DB
= 0xe6,
489 /* and for NetDetect */
490 SCAN_OFFLOAD_PROFILES_QUERY_CMD
= 0x56,
491 SCAN_OFFLOAD_HOTSPOTS_CONFIG_CMD
= 0x58,
492 SCAN_OFFLOAD_HOTSPOTS_QUERY_CMD
= 0x59,
495 /* Please keep this enum *SORTED* by hex value.
496 * Needed for binary search, otherwise a warning will be triggered.
498 enum iwl_mac_conf_subcmd_ids
{
499 LINK_QUALITY_MEASUREMENT_CMD
= 0x1,
500 LINK_QUALITY_MEASUREMENT_COMPLETE_NOTIF
= 0xFE,
501 CHANNEL_SWITCH_NOA_NOTIF
= 0xFF,
505 * enum iwl_phy_ops_subcmd_ids - PHY group commands
507 enum iwl_phy_ops_subcmd_ids
{
508 CMD_DTS_MEASUREMENT_TRIGGER_WIDE
= 0x0,
509 CTDP_CONFIG_CMD
= 0x03,
512 * @TEMP_REPORTING_THRESHOLDS_CMD: &struct temp_report_ths_cmd
514 TEMP_REPORTING_THRESHOLDS_CMD
= 0x04,
515 GEO_TX_POWER_LIMIT
= 0x05,
516 CT_KILL_NOTIFICATION
= 0xFE,
517 DTS_MEASUREMENT_NOTIF_WIDE
= 0xFF,
521 * enum iwl_system_subcmd_ids - system group command IDs
523 enum iwl_system_subcmd_ids
{
525 * @SHARED_MEM_CFG_CMD:
526 * response in &struct iwl_shared_mem_cfg or
527 * &struct iwl_shared_mem_cfg_v1
529 SHARED_MEM_CFG_CMD
= 0x0,
530 INIT_EXTENDED_CFG_CMD
= 0x03,
534 * enum iwl_data_path_subcmd_ids - data path group commands
536 enum iwl_data_path_subcmd_ids
{
538 * @DQA_ENABLE_CMD: &struct iwl_dqa_enable_cmd
540 DQA_ENABLE_CMD
= 0x0,
541 UPDATE_MU_GROUPS_CMD
= 0x1,
542 TRIGGER_RX_QUEUES_NOTIF_CMD
= 0x2,
544 MU_GROUP_MGMT_NOTIF
= 0xFE,
545 RX_QUEUES_NOTIFICATION
= 0xFF,
548 enum iwl_prot_offload_subcmd_ids
{
549 STORED_BEACON_NTF
= 0xFF,
552 enum iwl_regulatory_and_nvm_subcmd_ids
{
553 NVM_ACCESS_COMPLETE
= 0x0,
557 enum iwl_debug_cmds
{
560 MFU_ASSERT_DUMP_NTF
= 0xFE,
564 * enum iwl_mvm_command_groups - command groups for the firmware
565 * @LEGACY_GROUP: legacy group, uses command IDs from &enum iwl_legacy_cmds
566 * @LONG_GROUP: legacy group with long header, also uses command IDs
567 * from &enum iwl_legacy_cmds
568 * @SYSTEM_GROUP: system group, uses command IDs from
569 * &enum iwl_system_subcmd_ids
570 * @MAC_CONF_GROUP: MAC configuration group, uses command IDs from
571 * &enum iwl_mac_conf_subcmd_ids
572 * @PHY_OPS_GROUP: PHY operations group, uses command IDs from
573 * &enum iwl_phy_ops_subcmd_ids
574 * @DATA_PATH_GROUP: data path group, uses command IDs from
575 * &enum iwl_data_path_subcmd_ids
576 * @NAN_GROUP: NAN group, uses command IDs from &enum iwl_nan_subcmd_ids
577 * @TOF_GROUP: TOF group, uses command IDs from &enum iwl_tof_subcmd_ids
578 * @PROT_OFFLOAD_GROUP: protocol offload group, uses command IDs from
579 * &enum iwl_prot_offload_subcmd_ids
580 * @REGULATORY_AND_NVM_GROUP: regulatory/NVM group, uses command IDs from
581 * &enum iwl_regulatory_and_nvm_subcmd_ids
582 * @DEBUG_GROUP: Debug group, uses command IDs from &enum iwl_debug_cmds
584 enum iwl_mvm_command_groups
{
588 MAC_CONF_GROUP
= 0x3,
590 DATA_PATH_GROUP
= 0x5,
591 PROT_OFFLOAD_GROUP
= 0xb,
592 REGULATORY_AND_NVM_GROUP
= 0xc,
597 * struct iwl_cmd_response - generic response struct for most commands
598 * @status: status of the command asked, changes for each one
600 struct iwl_cmd_response
{
605 * struct iwl_dqa_enable_cmd
606 * @cmd_queue: the TXQ number of the command queue
608 struct iwl_dqa_enable_cmd
{
610 } __packed
; /* DQA_CONTROL_CMD_API_S_VER_1 */
613 * struct iwl_tx_ant_cfg_cmd
614 * @valid: valid antenna configuration
616 struct iwl_tx_ant_cfg_cmd
{
621 * struct iwl_calib_ctrl - Calibration control struct.
622 * Sent as part of the phy configuration command.
623 * @flow_trigger: bitmap for which calibrations to perform according to
624 * flow triggers, using &enum iwl_calib_cfg
625 * @event_trigger: bitmap for which calibrations to perform according to
626 * event triggers, using &enum iwl_calib_cfg
628 struct iwl_calib_ctrl
{
630 __le32 event_trigger
;
633 /* This enum defines the bitmap of various calibrations to enable in both
634 * init ucode and runtime ucode through CALIBRATION_CFG_CMD.
637 IWL_CALIB_CFG_XTAL_IDX
= BIT(0),
638 IWL_CALIB_CFG_TEMPERATURE_IDX
= BIT(1),
639 IWL_CALIB_CFG_VOLTAGE_READ_IDX
= BIT(2),
640 IWL_CALIB_CFG_PAPD_IDX
= BIT(3),
641 IWL_CALIB_CFG_TX_PWR_IDX
= BIT(4),
642 IWL_CALIB_CFG_DC_IDX
= BIT(5),
643 IWL_CALIB_CFG_BB_FILTER_IDX
= BIT(6),
644 IWL_CALIB_CFG_LO_LEAKAGE_IDX
= BIT(7),
645 IWL_CALIB_CFG_TX_IQ_IDX
= BIT(8),
646 IWL_CALIB_CFG_TX_IQ_SKEW_IDX
= BIT(9),
647 IWL_CALIB_CFG_RX_IQ_IDX
= BIT(10),
648 IWL_CALIB_CFG_RX_IQ_SKEW_IDX
= BIT(11),
649 IWL_CALIB_CFG_SENSITIVITY_IDX
= BIT(12),
650 IWL_CALIB_CFG_CHAIN_NOISE_IDX
= BIT(13),
651 IWL_CALIB_CFG_DISCONNECTED_ANT_IDX
= BIT(14),
652 IWL_CALIB_CFG_ANT_COUPLING_IDX
= BIT(15),
653 IWL_CALIB_CFG_DAC_IDX
= BIT(16),
654 IWL_CALIB_CFG_ABS_IDX
= BIT(17),
655 IWL_CALIB_CFG_AGC_IDX
= BIT(18),
659 * struct iwl_phy_cfg_cmd - Phy configuration command
660 * @phy_cfg: PHY configuration value, uses &enum iwl_fw_phy_cfg
661 * @calib_control: calibration control data
663 struct iwl_phy_cfg_cmd
{
665 struct iwl_calib_ctrl calib_control
;
668 #define PHY_CFG_RADIO_TYPE (BIT(0) | BIT(1))
669 #define PHY_CFG_RADIO_STEP (BIT(2) | BIT(3))
670 #define PHY_CFG_RADIO_DASH (BIT(4) | BIT(5))
671 #define PHY_CFG_PRODUCT_NUMBER (BIT(6) | BIT(7))
672 #define PHY_CFG_TX_CHAIN_A BIT(8)
673 #define PHY_CFG_TX_CHAIN_B BIT(9)
674 #define PHY_CFG_TX_CHAIN_C BIT(10)
675 #define PHY_CFG_RX_CHAIN_A BIT(12)
676 #define PHY_CFG_RX_CHAIN_B BIT(13)
677 #define PHY_CFG_RX_CHAIN_C BIT(14)
681 * enum iwl_nvm_access_op - NVM access opcode
682 * @IWL_NVM_READ: read NVM
683 * @IWL_NVM_WRITE: write NVM
685 enum iwl_nvm_access_op
{
691 * enum iwl_nvm_access_target - target of the NVM_ACCESS_CMD
692 * @NVM_ACCESS_TARGET_CACHE: access the cache
693 * @NVM_ACCESS_TARGET_OTP: access the OTP
694 * @NVM_ACCESS_TARGET_EEPROM: access the EEPROM
696 enum iwl_nvm_access_target
{
697 NVM_ACCESS_TARGET_CACHE
= 0,
698 NVM_ACCESS_TARGET_OTP
= 1,
699 NVM_ACCESS_TARGET_EEPROM
= 2,
703 * enum iwl_nvm_section_type - section types for NVM_ACCESS_CMD
704 * @NVM_SECTION_TYPE_SW: software section
705 * @NVM_SECTION_TYPE_REGULATORY: regulatory section
706 * @NVM_SECTION_TYPE_CALIBRATION: calibration section
707 * @NVM_SECTION_TYPE_PRODUCTION: production section
708 * @NVM_SECTION_TYPE_MAC_OVERRIDE: MAC override section
709 * @NVM_SECTION_TYPE_PHY_SKU: PHY SKU section
710 * @NVM_MAX_NUM_SECTIONS: number of sections
712 enum iwl_nvm_section_type
{
713 NVM_SECTION_TYPE_SW
= 1,
714 NVM_SECTION_TYPE_REGULATORY
= 3,
715 NVM_SECTION_TYPE_CALIBRATION
= 4,
716 NVM_SECTION_TYPE_PRODUCTION
= 5,
717 NVM_SECTION_TYPE_MAC_OVERRIDE
= 11,
718 NVM_SECTION_TYPE_PHY_SKU
= 12,
719 NVM_MAX_NUM_SECTIONS
= 13,
723 * struct iwl_nvm_access_cmd - Request the device to send an NVM section
724 * @op_code: &enum iwl_nvm_access_op
725 * @target: &enum iwl_nvm_access_target
726 * @type: &enum iwl_nvm_section_type
727 * @offset: offset in bytes into the section
728 * @length: in bytes, to read/write
729 * @data: if write operation, the data to write. On read its empty
731 struct iwl_nvm_access_cmd
{
738 } __packed
; /* NVM_ACCESS_CMD_API_S_VER_2 */
740 #define NUM_OF_FW_PAGING_BLOCKS 33 /* 32 for data and 1 block for CSS */
743 * struct iwl_fw_paging_cmd_v1 - paging layout
745 * (FW_PAGING_BLOCK_CMD = 0x4f)
747 * Send to FW the paging layout in the driver.
749 * @flags: various flags for the command
750 * @block_size: the block size in powers of 2
751 * @block_num: number of blocks specified in the command.
752 * @device_phy_addr: virtual addresses from device side
754 struct iwl_fw_paging_cmd_v1
{
758 __le32 device_phy_addr
[NUM_OF_FW_PAGING_BLOCKS
];
759 } __packed
; /* FW_PAGING_BLOCK_CMD_API_S_VER_1 */
762 * struct iwl_fw_paging_cmd - paging layout
764 * (FW_PAGING_BLOCK_CMD = 0x4f)
766 * Send to FW the paging layout in the driver.
768 * @flags: various flags for the command
769 * @block_size: the block size in powers of 2
770 * @block_num: number of blocks specified in the command.
771 * @device_phy_addr: virtual addresses from device side
773 struct iwl_fw_paging_cmd
{
777 __le64 device_phy_addr
[NUM_OF_FW_PAGING_BLOCKS
];
778 } __packed
; /* FW_PAGING_BLOCK_CMD_API_S_VER_2 */
783 * @IWL_FW_ITEM_ID_PAGING: Address of the pages that the FW will upload
786 enum iwl_fw_item_id
{
787 IWL_FW_ITEM_ID_PAGING
= 3,
791 * struct iwl_fw_get_item_cmd - get an item from the fw
793 struct iwl_fw_get_item_cmd
{
795 } __packed
; /* FW_GET_ITEM_CMD_API_S_VER_1 */
797 #define CONT_REC_COMMAND_SIZE 80
798 #define ENABLE_CONT_RECORDING 0x15
799 #define DISABLE_CONT_RECORDING 0x16
802 * struct iwl_continuous_record_mode - recording mode
804 struct iwl_continuous_record_mode
{
805 __le16 enable_recording
;
809 * struct iwl_continuous_record_cmd - enable/disable continuous recording
811 struct iwl_continuous_record_cmd
{
812 struct iwl_continuous_record_mode record_mode
;
813 u8 pad
[CONT_REC_COMMAND_SIZE
-
814 sizeof(struct iwl_continuous_record_mode
)];
817 struct iwl_fw_get_item_resp
{
819 __le32 item_byte_cnt
;
821 } __packed
; /* FW_GET_ITEM_RSP_S_VER_1 */
824 * struct iwl_nvm_access_resp_ver2 - response to NVM_ACCESS_CMD
825 * @offset: offset in bytes into the section
826 * @length: in bytes, either how much was written or read
827 * @type: NVM_SECTION_TYPE_*
828 * @status: 0 for success, fail otherwise
829 * @data: if read operation, the data returned. Empty on write.
831 struct iwl_nvm_access_resp
{
837 } __packed
; /* NVM_ACCESS_CMD_RESP_API_S_VER_2 */
841 /* alive response is_valid values */
842 #define ALIVE_RESP_UCODE_OK BIT(0)
843 #define ALIVE_RESP_RFKILL BIT(1)
845 /* alive response ver_type values */
855 /* alive response ver_subtype values */
857 FW_SUBTYPE_FULL_FEATURE
= 0,
858 FW_SUBTYPE_BOOTSRAP
= 1, /* Not valid */
859 FW_SUBTYPE_REDUCED
= 2,
860 FW_SUBTYPE_ALIVE_ONLY
= 3,
861 FW_SUBTYPE_WOWLAN
= 4,
862 FW_SUBTYPE_AP_SUBTYPE
= 5,
863 FW_SUBTYPE_WIPAN
= 6,
864 FW_SUBTYPE_INITIALIZE
= 9
867 #define IWL_ALIVE_STATUS_ERR 0xDEAD
868 #define IWL_ALIVE_STATUS_OK 0xCAFE
870 #define IWL_ALIVE_FLG_RFKILL BIT(0)
872 struct iwl_lmac_alive
{
880 __le32 error_event_table_ptr
; /* SRAM address for error log */
881 __le32 log_event_table_ptr
; /* SRAM address for LMAC event log */
882 __le32 cpu_register_ptr
;
883 __le32 dbgm_config_ptr
;
884 __le32 alive_counter_ptr
;
885 __le32 scd_base_ptr
; /* SRAM address for SCD */
886 __le32 st_fwrd_addr
; /* pointer to Store and forward */
888 } __packed
; /* UCODE_ALIVE_NTFY_API_S_VER_3 */
890 struct iwl_umac_alive
{
891 __le32 umac_minor
; /* UMAC version: minor */
892 __le32 umac_major
; /* UMAC version: major */
893 __le32 error_info_addr
; /* SRAM address for UMAC error log */
894 __le32 dbg_print_buff_addr
;
895 } __packed
; /* UMAC_ALIVE_DATA_API_S_VER_2 */
897 struct mvm_alive_resp_v3
{
900 struct iwl_lmac_alive lmac_data
;
901 struct iwl_umac_alive umac_data
;
902 } __packed
; /* ALIVE_RES_API_S_VER_3 */
904 struct mvm_alive_resp
{
907 struct iwl_lmac_alive lmac_data
[2];
908 struct iwl_umac_alive umac_data
;
909 } __packed
; /* ALIVE_RES_API_S_VER_4 */
911 /* Error response/notification */
913 FW_ERR_UNKNOWN_CMD
= 0x0,
914 FW_ERR_INVALID_CMD_PARAM
= 0x1,
915 FW_ERR_SERVICE
= 0x2,
916 FW_ERR_ARC_MEMORY
= 0x3,
917 FW_ERR_ARC_CODE
= 0x4,
918 FW_ERR_WATCH_DOG
= 0x5,
919 FW_ERR_WEP_GRP_KEY_INDX
= 0x10,
920 FW_ERR_WEP_KEY_SIZE
= 0x11,
921 FW_ERR_OBSOLETE_FUNC
= 0x12,
922 FW_ERR_UNEXPECTED
= 0xFE,
927 * struct iwl_error_resp - FW error indication
928 * ( REPLY_ERROR = 0x2 )
929 * @error_type: one of FW_ERR_*
930 * @cmd_id: the command ID for which the error occured
931 * @bad_cmd_seq_num: sequence number of the erroneous command
932 * @error_service: which service created the error, applicable only if
933 * error_type = 2, otherwise 0
934 * @timestamp: TSF in usecs.
936 struct iwl_error_resp
{
940 __le16 bad_cmd_seq_num
;
941 __le32 error_service
;
946 /* Common PHY, MAC and Bindings definitions */
947 #define MAX_MACS_IN_BINDING (3)
948 #define MAX_BINDINGS (4)
951 * enum iwl_mvm_id_and_color - ID and color fields in context dword
952 * @FW_CTXT_ID_POS: position of the ID
953 * @FW_CTXT_ID_MSK: mask of the ID
954 * @FW_CTXT_COLOR_POS: position of the color
955 * @FW_CTXT_COLOR_MSK: mask of the color
956 * @FW_CTXT_INVALID: value used to indicate unused/invalid
958 enum iwl_mvm_id_and_color
{
960 FW_CTXT_ID_MSK
= 0xff << FW_CTXT_ID_POS
,
961 FW_CTXT_COLOR_POS
= 8,
962 FW_CTXT_COLOR_MSK
= 0xff << FW_CTXT_COLOR_POS
,
963 FW_CTXT_INVALID
= 0xffffffff,
966 #define FW_CMD_ID_AND_COLOR(_id, _color) ((_id << FW_CTXT_ID_POS) |\
967 (_color << FW_CTXT_COLOR_POS))
969 /* Possible actions on PHYs, MACs and Bindings */
970 enum iwl_phy_ctxt_action
{
971 FW_CTXT_ACTION_STUB
= 0,
973 FW_CTXT_ACTION_MODIFY
,
974 FW_CTXT_ACTION_REMOVE
,
976 }; /* COMMON_CONTEXT_ACTION_API_E_VER_1 */
980 /* Time Event types, according to MAC type */
981 enum iwl_time_event_type
{
982 /* BSS Station Events */
983 TE_BSS_STA_AGGRESSIVE_ASSOC
,
985 TE_BSS_EAP_DHCP_PROT
,
988 /* P2P Device Events */
989 TE_P2P_DEVICE_DISCOVERABLE
,
990 TE_P2P_DEVICE_LISTEN
,
991 TE_P2P_DEVICE_ACTION_SCAN
,
992 TE_P2P_DEVICE_FULL_SCAN
,
994 /* P2P Client Events */
995 TE_P2P_CLIENT_AGGRESSIVE_ASSOC
,
997 TE_P2P_CLIENT_QUIET_PERIOD
,
1000 TE_P2P_GO_ASSOC_PROT
,
1001 TE_P2P_GO_REPETITIVET_NOA
,
1002 TE_P2P_GO_CT_WINDOW
,
1004 /* WiDi Sync Events */
1007 /* Channel Switch NoA */
1008 TE_CHANNEL_SWITCH_PERIOD
,
1011 }; /* MAC_EVENT_TYPE_API_E_VER_1 */
1015 /* Time event - defines for command API v1 */
1018 * @TE_V1_FRAG_NONE: fragmentation of the time event is NOT allowed.
1019 * @TE_V1_FRAG_SINGLE: fragmentation of the time event is allowed, but only
1020 * the first fragment is scheduled.
1021 * @TE_V1_FRAG_DUAL: fragmentation of the time event is allowed, but only
1022 * the first 2 fragments are scheduled.
1023 * @TE_V1_FRAG_ENDLESS: fragmentation of the time event is allowed, and any
1024 * number of fragments are valid.
1026 * Other than the constant defined above, specifying a fragmentation value 'x'
1027 * means that the event can be fragmented but only the first 'x' will be
1031 TE_V1_FRAG_NONE
= 0,
1032 TE_V1_FRAG_SINGLE
= 1,
1033 TE_V1_FRAG_DUAL
= 2,
1034 TE_V1_FRAG_ENDLESS
= 0xffffffff
1037 /* If a Time Event can be fragmented, this is the max number of fragments */
1038 #define TE_V1_FRAG_MAX_MSK 0x0fffffff
1039 /* Repeat the time event endlessly (until removed) */
1040 #define TE_V1_REPEAT_ENDLESS 0xffffffff
1041 /* If a Time Event has bounded repetitions, this is the maximal value */
1042 #define TE_V1_REPEAT_MAX_MSK_V1 0x0fffffff
1044 /* Time Event dependencies: none, on another TE, or in a specific time */
1046 TE_V1_INDEPENDENT
= 0,
1047 TE_V1_DEP_OTHER
= BIT(0),
1048 TE_V1_DEP_TSF
= BIT(1),
1049 TE_V1_EVENT_SOCIOPATHIC
= BIT(2),
1050 }; /* MAC_EVENT_DEPENDENCY_POLICY_API_E_VER_2 */
1053 * @TE_V1_NOTIF_NONE: no notifications
1054 * @TE_V1_NOTIF_HOST_EVENT_START: request/receive notification on event start
1055 * @TE_V1_NOTIF_HOST_EVENT_END:request/receive notification on event end
1056 * @TE_V1_NOTIF_INTERNAL_EVENT_START: internal FW use
1057 * @TE_V1_NOTIF_INTERNAL_EVENT_END: internal FW use.
1058 * @TE_V1_NOTIF_HOST_FRAG_START: request/receive notification on frag start
1059 * @TE_V1_NOTIF_HOST_FRAG_END:request/receive notification on frag end
1060 * @TE_V1_NOTIF_INTERNAL_FRAG_START: internal FW use.
1061 * @TE_V1_NOTIF_INTERNAL_FRAG_END: internal FW use.
1063 * Supported Time event notifications configuration.
1064 * A notification (both event and fragment) includes a status indicating weather
1065 * the FW was able to schedule the event or not. For fragment start/end
1066 * notification the status is always success. There is no start/end fragment
1067 * notification for monolithic events.
1070 TE_V1_NOTIF_NONE
= 0,
1071 TE_V1_NOTIF_HOST_EVENT_START
= BIT(0),
1072 TE_V1_NOTIF_HOST_EVENT_END
= BIT(1),
1073 TE_V1_NOTIF_INTERNAL_EVENT_START
= BIT(2),
1074 TE_V1_NOTIF_INTERNAL_EVENT_END
= BIT(3),
1075 TE_V1_NOTIF_HOST_FRAG_START
= BIT(4),
1076 TE_V1_NOTIF_HOST_FRAG_END
= BIT(5),
1077 TE_V1_NOTIF_INTERNAL_FRAG_START
= BIT(6),
1078 TE_V1_NOTIF_INTERNAL_FRAG_END
= BIT(7),
1079 }; /* MAC_EVENT_ACTION_API_E_VER_2 */
1081 /* Time event - defines for command API */
1084 * @TE_V2_FRAG_NONE: fragmentation of the time event is NOT allowed.
1085 * @TE_V2_FRAG_SINGLE: fragmentation of the time event is allowed, but only
1086 * the first fragment is scheduled.
1087 * @TE_V2_FRAG_DUAL: fragmentation of the time event is allowed, but only
1088 * the first 2 fragments are scheduled.
1089 * @TE_V2_FRAG_ENDLESS: fragmentation of the time event is allowed, and any
1090 * number of fragments are valid.
1092 * Other than the constant defined above, specifying a fragmentation value 'x'
1093 * means that the event can be fragmented but only the first 'x' will be
1097 TE_V2_FRAG_NONE
= 0,
1098 TE_V2_FRAG_SINGLE
= 1,
1099 TE_V2_FRAG_DUAL
= 2,
1100 TE_V2_FRAG_MAX
= 0xfe,
1101 TE_V2_FRAG_ENDLESS
= 0xff
1104 /* Repeat the time event endlessly (until removed) */
1105 #define TE_V2_REPEAT_ENDLESS 0xff
1106 /* If a Time Event has bounded repetitions, this is the maximal value */
1107 #define TE_V2_REPEAT_MAX 0xfe
1109 #define TE_V2_PLACEMENT_POS 12
1110 #define TE_V2_ABSENCE_POS 15
1113 * enum iwl_time_event_policy - Time event policy values
1114 * A notification (both event and fragment) includes a status indicating weather
1115 * the FW was able to schedule the event or not. For fragment start/end
1116 * notification the status is always success. There is no start/end fragment
1117 * notification for monolithic events.
1119 * @TE_V2_DEFAULT_POLICY: independent, social, present, unoticable
1120 * @TE_V2_NOTIF_HOST_EVENT_START: request/receive notification on event start
1121 * @TE_V2_NOTIF_HOST_EVENT_END:request/receive notification on event end
1122 * @TE_V2_NOTIF_INTERNAL_EVENT_START: internal FW use
1123 * @TE_V2_NOTIF_INTERNAL_EVENT_END: internal FW use.
1124 * @TE_V2_NOTIF_HOST_FRAG_START: request/receive notification on frag start
1125 * @TE_V2_NOTIF_HOST_FRAG_END:request/receive notification on frag end
1126 * @TE_V2_NOTIF_INTERNAL_FRAG_START: internal FW use.
1127 * @TE_V2_NOTIF_INTERNAL_FRAG_END: internal FW use.
1128 * @T2_V2_START_IMMEDIATELY: start time event immediately
1129 * @TE_V2_DEP_OTHER: depends on another time event
1130 * @TE_V2_DEP_TSF: depends on a specific time
1131 * @TE_V2_EVENT_SOCIOPATHIC: can't co-exist with other events of tha same MAC
1132 * @TE_V2_ABSENCE: are we present or absent during the Time Event.
1134 enum iwl_time_event_policy
{
1135 TE_V2_DEFAULT_POLICY
= 0x0,
1137 /* notifications (event start/stop, fragment start/stop) */
1138 TE_V2_NOTIF_HOST_EVENT_START
= BIT(0),
1139 TE_V2_NOTIF_HOST_EVENT_END
= BIT(1),
1140 TE_V2_NOTIF_INTERNAL_EVENT_START
= BIT(2),
1141 TE_V2_NOTIF_INTERNAL_EVENT_END
= BIT(3),
1143 TE_V2_NOTIF_HOST_FRAG_START
= BIT(4),
1144 TE_V2_NOTIF_HOST_FRAG_END
= BIT(5),
1145 TE_V2_NOTIF_INTERNAL_FRAG_START
= BIT(6),
1146 TE_V2_NOTIF_INTERNAL_FRAG_END
= BIT(7),
1147 T2_V2_START_IMMEDIATELY
= BIT(11),
1149 /* placement characteristics */
1150 TE_V2_DEP_OTHER
= BIT(TE_V2_PLACEMENT_POS
),
1151 TE_V2_DEP_TSF
= BIT(TE_V2_PLACEMENT_POS
+ 1),
1152 TE_V2_EVENT_SOCIOPATHIC
= BIT(TE_V2_PLACEMENT_POS
+ 2),
1154 /* are we present or absent during the Time Event. */
1155 TE_V2_ABSENCE
= BIT(TE_V2_ABSENCE_POS
),
1159 * struct iwl_time_event_cmd - configuring Time Events
1160 * with struct MAC_TIME_EVENT_DATA_API_S_VER_2 (see also
1161 * with version 1. determined by IWL_UCODE_TLV_FLAGS)
1162 * ( TIME_EVENT_CMD = 0x29 )
1163 * @id_and_color: ID and color of the relevant MAC,
1164 * &enum iwl_mvm_id_and_color
1165 * @action: action to perform, one of &enum iwl_phy_ctxt_action
1166 * @id: this field has two meanings, depending on the action:
1167 * If the action is ADD, then it means the type of event to add.
1168 * For all other actions it is the unique event ID assigned when the
1169 * event was added by the FW.
1170 * @apply_time: When to start the Time Event (in GP2)
1171 * @max_delay: maximum delay to event's start (apply time), in TU
1172 * @depends_on: the unique ID of the event we depend on (if any)
1173 * @interval: interval between repetitions, in TU
1174 * @duration: duration of event in TU
1175 * @repeat: how many repetitions to do, can be TE_REPEAT_ENDLESS
1176 * @max_frags: maximal number of fragments the Time Event can be divided to
1177 * @policy: defines whether uCode shall notify the host or other uCode modules
1178 * on event and/or fragment start and/or end
1179 * using one of TE_INDEPENDENT, TE_DEP_OTHER, TE_DEP_TSF
1180 * TE_EVENT_SOCIOPATHIC
1181 * using TE_ABSENCE and using TE_NOTIF_*,
1182 * &enum iwl_time_event_policy
1184 struct iwl_time_event_cmd
{
1185 /* COMMON_INDEX_HDR_API_S_VER_1 */
1186 __le32 id_and_color
;
1189 /* MAC_TIME_EVENT_DATA_API_S_VER_2 */
1198 } __packed
; /* MAC_TIME_EVENT_CMD_API_S_VER_2 */
1201 * struct iwl_time_event_resp - response structure to iwl_time_event_cmd
1202 * @status: bit 0 indicates success, all others specify errors
1203 * @id: the Time Event type
1204 * @unique_id: the unique ID assigned (in ADD) or given (others) to the TE
1205 * @id_and_color: ID and color of the relevant MAC,
1206 * &enum iwl_mvm_id_and_color
1208 struct iwl_time_event_resp
{
1212 __le32 id_and_color
;
1213 } __packed
; /* MAC_TIME_EVENT_RSP_API_S_VER_1 */
1216 * struct iwl_time_event_notif - notifications of time event start/stop
1217 * ( TIME_EVENT_NOTIFICATION = 0x2a )
1218 * @timestamp: action timestamp in GP2
1219 * @session_id: session's unique id
1220 * @unique_id: unique id of the Time Event itself
1221 * @id_and_color: ID and color of the relevant MAC
1222 * @action: &enum iwl_time_event_policy
1223 * @status: true if scheduled, false otherwise (not executed)
1225 struct iwl_time_event_notif
{
1229 __le32 id_and_color
;
1232 } __packed
; /* MAC_TIME_EVENT_NTFY_API_S_VER_1 */
1235 /* Bindings and Time Quota */
1238 * struct iwl_binding_cmd_v1 - configuring bindings
1239 * ( BINDING_CONTEXT_CMD = 0x2b )
1240 * @id_and_color: ID and color of the relevant Binding,
1241 * &enum iwl_mvm_id_and_color
1242 * @action: action to perform, one of FW_CTXT_ACTION_*
1243 * @macs: array of MAC id and colors which belong to the binding,
1244 * &enum iwl_mvm_id_and_color
1245 * @phy: PHY id and color which belongs to the binding,
1246 * &enum iwl_mvm_id_and_color
1248 struct iwl_binding_cmd_v1
{
1249 /* COMMON_INDEX_HDR_API_S_VER_1 */
1250 __le32 id_and_color
;
1252 /* BINDING_DATA_API_S_VER_1 */
1253 __le32 macs
[MAX_MACS_IN_BINDING
];
1255 } __packed
; /* BINDING_CMD_API_S_VER_1 */
1258 * struct iwl_binding_cmd - configuring bindings
1259 * ( BINDING_CONTEXT_CMD = 0x2b )
1260 * @id_and_color: ID and color of the relevant Binding,
1261 * &enum iwl_mvm_id_and_color
1262 * @action: action to perform, one of FW_CTXT_ACTION_*
1263 * @macs: array of MAC id and colors which belong to the binding
1264 * &enum iwl_mvm_id_and_color
1265 * @phy: PHY id and color which belongs to the binding
1266 * &enum iwl_mvm_id_and_color
1267 * @lmac_id: the lmac id the binding belongs to
1269 struct iwl_binding_cmd
{
1270 /* COMMON_INDEX_HDR_API_S_VER_1 */
1271 __le32 id_and_color
;
1273 /* BINDING_DATA_API_S_VER_1 */
1274 __le32 macs
[MAX_MACS_IN_BINDING
];
1277 } __packed
; /* BINDING_CMD_API_S_VER_2 */
1279 #define IWL_BINDING_CMD_SIZE_V1 sizeof(struct iwl_binding_cmd_v1)
1280 #define IWL_LMAC_24G_INDEX 0
1281 #define IWL_LMAC_5G_INDEX 1
1283 /* The maximal number of fragments in the FW's schedule session */
1284 #define IWL_MVM_MAX_QUOTA 128
1287 * struct iwl_time_quota_data - configuration of time quota per binding
1288 * @id_and_color: ID and color of the relevant Binding,
1289 * &enum iwl_mvm_id_and_color
1290 * @quota: absolute time quota in TU. The scheduler will try to divide the
1291 * remainig quota (after Time Events) according to this quota.
1292 * @max_duration: max uninterrupted context duration in TU
1294 struct iwl_time_quota_data
{
1295 __le32 id_and_color
;
1297 __le32 max_duration
;
1298 } __packed
; /* TIME_QUOTA_DATA_API_S_VER_1 */
1301 * struct iwl_time_quota_cmd - configuration of time quota between bindings
1302 * ( TIME_QUOTA_CMD = 0x2c )
1303 * @quotas: allocations per binding
1304 * Note: on non-CDB the fourth one is the auxilary mac and is
1306 * On CDB the fourth one is a regular binding.
1308 struct iwl_time_quota_cmd
{
1309 struct iwl_time_quota_data quotas
[MAX_BINDINGS
];
1310 } __packed
; /* TIME_QUOTA_ALLOCATION_CMD_API_S_VER_1 */
1315 /* Supported bands */
1316 #define PHY_BAND_5 (0)
1317 #define PHY_BAND_24 (1)
1319 /* Supported channel width, vary if there is VHT support */
1320 #define PHY_VHT_CHANNEL_MODE20 (0x0)
1321 #define PHY_VHT_CHANNEL_MODE40 (0x1)
1322 #define PHY_VHT_CHANNEL_MODE80 (0x2)
1323 #define PHY_VHT_CHANNEL_MODE160 (0x3)
1326 * Control channel position:
1327 * For legacy set bit means upper channel, otherwise lower.
1328 * For VHT - bit-2 marks if the control is lower/upper relative to center-freq
1329 * bits-1:0 mark the distance from the center freq. for 20Mhz, offset is 0.
1332 * 40Mhz |_______|_______|
1333 * 80Mhz |_______|_______|_______|_______|
1334 * 160Mhz |_______|_______|_______|_______|_______|_______|_______|_______|
1335 * code 011 010 001 000 | 100 101 110 111
1337 #define PHY_VHT_CTRL_POS_1_BELOW (0x0)
1338 #define PHY_VHT_CTRL_POS_2_BELOW (0x1)
1339 #define PHY_VHT_CTRL_POS_3_BELOW (0x2)
1340 #define PHY_VHT_CTRL_POS_4_BELOW (0x3)
1341 #define PHY_VHT_CTRL_POS_1_ABOVE (0x4)
1342 #define PHY_VHT_CTRL_POS_2_ABOVE (0x5)
1343 #define PHY_VHT_CTRL_POS_3_ABOVE (0x6)
1344 #define PHY_VHT_CTRL_POS_4_ABOVE (0x7)
1348 * @channel: channel number
1349 * @width: PHY_[VHT|LEGACY]_CHANNEL_*
1350 * @ctrl channel: PHY_[VHT|LEGACY]_CTRL_*
1352 struct iwl_fw_channel_info
{
1359 #define PHY_RX_CHAIN_DRIVER_FORCE_POS (0)
1360 #define PHY_RX_CHAIN_DRIVER_FORCE_MSK \
1361 (0x1 << PHY_RX_CHAIN_DRIVER_FORCE_POS)
1362 #define PHY_RX_CHAIN_VALID_POS (1)
1363 #define PHY_RX_CHAIN_VALID_MSK \
1364 (0x7 << PHY_RX_CHAIN_VALID_POS)
1365 #define PHY_RX_CHAIN_FORCE_SEL_POS (4)
1366 #define PHY_RX_CHAIN_FORCE_SEL_MSK \
1367 (0x7 << PHY_RX_CHAIN_FORCE_SEL_POS)
1368 #define PHY_RX_CHAIN_FORCE_MIMO_SEL_POS (7)
1369 #define PHY_RX_CHAIN_FORCE_MIMO_SEL_MSK \
1370 (0x7 << PHY_RX_CHAIN_FORCE_MIMO_SEL_POS)
1371 #define PHY_RX_CHAIN_CNT_POS (10)
1372 #define PHY_RX_CHAIN_CNT_MSK \
1373 (0x3 << PHY_RX_CHAIN_CNT_POS)
1374 #define PHY_RX_CHAIN_MIMO_CNT_POS (12)
1375 #define PHY_RX_CHAIN_MIMO_CNT_MSK \
1376 (0x3 << PHY_RX_CHAIN_MIMO_CNT_POS)
1377 #define PHY_RX_CHAIN_MIMO_FORCE_POS (14)
1378 #define PHY_RX_CHAIN_MIMO_FORCE_MSK \
1379 (0x1 << PHY_RX_CHAIN_MIMO_FORCE_POS)
1381 /* TODO: fix the value, make it depend on firmware at runtime? */
1382 #define NUM_PHY_CTX 3
1384 /* TODO: complete missing documentation */
1386 * struct iwl_phy_context_cmd - config of the PHY context
1387 * ( PHY_CONTEXT_CMD = 0x8 )
1388 * @id_and_color: ID and color of the relevant Binding
1389 * @action: action to perform, one of FW_CTXT_ACTION_*
1390 * @apply_time: 0 means immediate apply and context switch.
1391 * other value means apply new params after X usecs
1392 * @tx_param_color: ???
1394 * @txchain_info: ???
1395 * @rxchain_info: ???
1396 * @acquisition_data: ???
1397 * @dsp_cfg_flags: set to 0
1399 struct iwl_phy_context_cmd
{
1400 /* COMMON_INDEX_HDR_API_S_VER_1 */
1401 __le32 id_and_color
;
1403 /* PHY_CONTEXT_DATA_API_S_VER_1 */
1405 __le32 tx_param_color
;
1406 struct iwl_fw_channel_info ci
;
1407 __le32 txchain_info
;
1408 __le32 rxchain_info
;
1409 __le32 acquisition_data
;
1410 __le32 dsp_cfg_flags
;
1411 } __packed
; /* PHY_CONTEXT_CMD_API_VER_1 */
1416 * Command requests the firmware to create a time event for a certain duration
1417 * and remain on the given channel. This is done by using the Aux framework in
1419 * The command was first used for Hot Spot issues - but can be used regardless
1422 * ( HOT_SPOT_CMD 0x53 )
1424 * @id_and_color: ID and color of the MAC
1425 * @action: action to perform, one of FW_CTXT_ACTION_*
1426 * @event_unique_id: If the action FW_CTXT_ACTION_REMOVE then the
1427 * event_unique_id should be the id of the time event assigned by ucode.
1428 * Otherwise ignore the event_unique_id.
1429 * @sta_id_and_color: station id and color, resumed during "Remain On Channel"
1431 * @channel_info: channel info
1432 * @node_addr: Our MAC Address
1433 * @reserved: reserved for alignment
1434 * @apply_time: GP2 value to start (should always be the current GP2 value)
1435 * @apply_time_max_delay: Maximum apply time delay value in TU. Defines max
1436 * time by which start of the event is allowed to be postponed.
1437 * @duration: event duration in TU To calculate event duration:
1438 * timeEventDuration = min(duration, remainingQuota)
1440 struct iwl_hs20_roc_req
{
1441 /* COMMON_INDEX_HDR_API_S_VER_1 hdr */
1442 __le32 id_and_color
;
1444 __le32 event_unique_id
;
1445 __le32 sta_id_and_color
;
1446 struct iwl_fw_channel_info channel_info
;
1447 u8 node_addr
[ETH_ALEN
];
1450 __le32 apply_time_max_delay
;
1452 } __packed
; /* HOT_SPOT_CMD_API_S_VER_1 */
1455 * values for AUX ROC result values
1457 enum iwl_mvm_hot_spot
{
1458 HOT_SPOT_RSP_STATUS_OK
,
1459 HOT_SPOT_RSP_STATUS_TOO_MANY_EVENTS
,
1460 HOT_SPOT_MAX_NUM_OF_SESSIONS
,
1464 * Aux ROC command response
1466 * In response to iwl_hs20_roc_req the FW sends this command to notify the
1467 * driver the uid of the timevent.
1469 * ( HOT_SPOT_CMD 0x53 )
1471 * @event_unique_id: Unique ID of time event assigned by ucode
1472 * @status: Return status 0 is success, all the rest used for specific errors
1474 struct iwl_hs20_roc_res
{
1475 __le32 event_unique_id
;
1477 } __packed
; /* HOT_SPOT_RSP_API_S_VER_1 */
1480 * struct iwl_radio_version_notif - information on the radio version
1481 * ( RADIO_VERSION_NOTIFICATION = 0x68 )
1486 struct iwl_radio_version_notif
{
1487 __le32 radio_flavor
;
1490 } __packed
; /* RADIO_VERSION_NOTOFICATION_S_VER_1 */
1492 enum iwl_card_state_flags
{
1493 CARD_ENABLED
= 0x00,
1494 HW_CARD_DISABLED
= 0x01,
1495 SW_CARD_DISABLED
= 0x02,
1496 CT_KILL_CARD_DISABLED
= 0x04,
1497 HALT_CARD_DISABLED
= 0x08,
1498 CARD_DISABLED_MSK
= 0x0f,
1499 CARD_IS_RX_ON
= 0x10,
1503 * struct iwl_radio_version_notif - information on the radio version
1504 * ( CARD_STATE_NOTIFICATION = 0xa1 )
1505 * @flags: %iwl_card_state_flags
1507 struct iwl_card_state_notif
{
1509 } __packed
; /* CARD_STATE_NTFY_API_S_VER_1 */
1512 * struct iwl_missed_beacons_notif - information on missed beacons
1513 * ( MISSED_BEACONS_NOTIFICATION = 0xa2 )
1514 * @mac_id: interface ID
1515 * @consec_missed_beacons_since_last_rx: number of consecutive missed
1516 * beacons since last RX.
1517 * @consec_missed_beacons: number of consecutive missed beacons
1518 * @num_expected_beacons:
1519 * @num_recvd_beacons:
1521 struct iwl_missed_beacons_notif
{
1523 __le32 consec_missed_beacons_since_last_rx
;
1524 __le32 consec_missed_beacons
;
1525 __le32 num_expected_beacons
;
1526 __le32 num_recvd_beacons
;
1527 } __packed
; /* MISSED_BEACON_NTFY_API_S_VER_3 */
1530 * struct iwl_mfuart_load_notif - mfuart image version & status
1531 * ( MFUART_LOAD_NOTIFICATION = 0xb1 )
1532 * @installed_ver: installed image version
1533 * @external_ver: external image version
1534 * @status: MFUART loading status
1535 * @duration: MFUART loading time
1536 * @image_size: MFUART image size in bytes
1538 struct iwl_mfuart_load_notif
{
1539 __le32 installed_ver
;
1540 __le32 external_ver
;
1543 /* image size valid only in v2 of the command */
1545 } __packed
; /*MFU_LOADER_NTFY_API_S_VER_2*/
1548 * struct iwl_mfu_assert_dump_notif - mfuart dump logs
1549 * ( MFU_ASSERT_DUMP_NTF = 0xfe )
1550 * @assert_id: mfuart assert id that cause the notif
1551 * @curr_reset_num: number of asserts since uptime
1552 * @index_num: current chunk id
1553 * @parts_num: total number of chunks
1554 * @data_size: number of data bytes sent
1555 * @data: data buffer
1557 struct iwl_mfu_assert_dump_notif
{
1559 __le32 curr_reset_num
;
1564 } __packed
; /*MFU_DUMP_ASSERT_API_S_VER_1*/
1567 * struct iwl_set_calib_default_cmd - set default value for calibration.
1568 * ( SET_CALIB_DEFAULT_CMD = 0x8e )
1569 * @calib_index: the calibration to set value for
1571 * @data: the value to set for the calibration result
1573 struct iwl_set_calib_default_cmd
{
1577 } __packed
; /* PHY_CALIB_OVERRIDE_VALUES_S */
1579 #define MAX_PORT_ID_NUM 2
1580 #define MAX_MCAST_FILTERING_ADDRESSES 256
1583 * struct iwl_mcast_filter_cmd - configure multicast filter.
1584 * @filter_own: Set 1 to filter out multicast packets sent by station itself
1585 * @port_id: Multicast MAC addresses array specifier. This is a strange way
1586 * to identify network interface adopted in host-device IF.
1587 * It is used by FW as index in array of addresses. This array has
1588 * MAX_PORT_ID_NUM members.
1589 * @count: Number of MAC addresses in the array
1590 * @pass_all: Set 1 to pass all multicast packets.
1591 * @bssid: current association BSSID.
1592 * @addr_list: Place holder for array of MAC addresses.
1593 * IMPORTANT: add padding if necessary to ensure DWORD alignment.
1595 struct iwl_mcast_filter_cmd
{
1603 } __packed
; /* MCAST_FILTERING_CMD_API_S_VER_1 */
1605 #define MAX_BCAST_FILTERS 8
1606 #define MAX_BCAST_FILTER_ATTRS 2
1609 * enum iwl_mvm_bcast_filter_attr_offset - written by fw for each Rx packet
1610 * @BCAST_FILTER_OFFSET_PAYLOAD_START: offset is from payload start.
1611 * @BCAST_FILTER_OFFSET_IP_END: offset is from ip header end (i.e.
1612 * start of ip payload).
1614 enum iwl_mvm_bcast_filter_attr_offset
{
1615 BCAST_FILTER_OFFSET_PAYLOAD_START
= 0,
1616 BCAST_FILTER_OFFSET_IP_END
= 1,
1620 * struct iwl_fw_bcast_filter_attr - broadcast filter attribute
1621 * @offset_type: &enum iwl_mvm_bcast_filter_attr_offset.
1622 * @offset: starting offset of this pattern.
1623 * @val: value to match - big endian (MSB is the first
1624 * byte to match from offset pos).
1625 * @mask: mask to match (big endian).
1627 struct iwl_fw_bcast_filter_attr
{
1633 } __packed
; /* BCAST_FILTER_ATT_S_VER_1 */
1636 * enum iwl_mvm_bcast_filter_frame_type - filter frame type
1637 * @BCAST_FILTER_FRAME_TYPE_ALL: consider all frames.
1638 * @BCAST_FILTER_FRAME_TYPE_IPV4: consider only ipv4 frames
1640 enum iwl_mvm_bcast_filter_frame_type
{
1641 BCAST_FILTER_FRAME_TYPE_ALL
= 0,
1642 BCAST_FILTER_FRAME_TYPE_IPV4
= 1,
1646 * struct iwl_fw_bcast_filter - broadcast filter
1647 * @discard: discard frame (1) or let it pass (0).
1648 * @frame_type: &enum iwl_mvm_bcast_filter_frame_type.
1649 * @num_attrs: number of valid attributes in this filter.
1650 * @attrs: attributes of this filter. a filter is considered matched
1651 * only when all its attributes are matched (i.e. AND relationship)
1653 struct iwl_fw_bcast_filter
{
1658 struct iwl_fw_bcast_filter_attr attrs
[MAX_BCAST_FILTER_ATTRS
];
1659 } __packed
; /* BCAST_FILTER_S_VER_1 */
1661 #define BA_WINDOW_STREAMS_MAX 16
1662 #define BA_WINDOW_STATUS_TID_MSK 0x000F
1663 #define BA_WINDOW_STATUS_STA_ID_POS 4
1664 #define BA_WINDOW_STATUS_STA_ID_MSK 0x01F0
1665 #define BA_WINDOW_STATUS_VALID_MSK BIT(9)
1668 * struct iwl_ba_window_status_notif - reordering window's status notification
1669 * @bitmap: bitmap of received frames [start_seq_num + 0]..[start_seq_num + 63]
1670 * @ra_tid: bit 3:0 - TID, bit 8:4 - STA_ID, bit 9 - valid
1671 * @start_seq_num: the start sequence number of the bitmap
1672 * @mpdu_rx_count: the number of received MPDUs since entering D0i3
1674 struct iwl_ba_window_status_notif
{
1675 __le64 bitmap
[BA_WINDOW_STREAMS_MAX
];
1676 __le16 ra_tid
[BA_WINDOW_STREAMS_MAX
];
1677 __le32 start_seq_num
[BA_WINDOW_STREAMS_MAX
];
1678 __le16 mpdu_rx_count
[BA_WINDOW_STREAMS_MAX
];
1679 } __packed
; /* BA_WINDOW_STATUS_NTFY_API_S_VER_1 */
1682 * struct iwl_fw_bcast_mac - per-mac broadcast filtering configuration.
1683 * @default_discard: default action for this mac (discard (1) / pass (0)).
1684 * @attached_filters: bitmap of relevant filters for this mac.
1686 struct iwl_fw_bcast_mac
{
1689 __le16 attached_filters
;
1690 } __packed
; /* BCAST_MAC_CONTEXT_S_VER_1 */
1693 * struct iwl_bcast_filter_cmd - broadcast filtering configuration
1694 * @disable: enable (0) / disable (1)
1695 * @max_bcast_filters: max number of filters (MAX_BCAST_FILTERS)
1696 * @max_macs: max number of macs (NUM_MAC_INDEX_DRIVER)
1697 * @filters: broadcast filters
1698 * @macs: broadcast filtering configuration per-mac
1700 struct iwl_bcast_filter_cmd
{
1702 u8 max_bcast_filters
;
1705 struct iwl_fw_bcast_filter filters
[MAX_BCAST_FILTERS
];
1706 struct iwl_fw_bcast_mac macs
[NUM_MAC_INDEX_DRIVER
];
1707 } __packed
; /* BCAST_FILTERING_HCMD_API_S_VER_1 */
1710 * enum iwl_mvm_marker_id - maker ids
1712 * The ids for different type of markers to insert into the usniffer logs
1714 enum iwl_mvm_marker_id
{
1715 MARKER_ID_TX_FRAME_LATENCY
= 1,
1716 }; /* MARKER_ID_API_E_VER_1 */
1719 * struct iwl_mvm_marker - mark info into the usniffer logs
1721 * (MARKER_CMD = 0xcb)
1723 * Mark the UTC time stamp into the usniffer logs together with additional
1724 * metadata, so the usniffer output can be parsed.
1725 * In the command response the ucode will return the GP2 time.
1727 * @dw_len: The amount of dwords following this byte including this byte.
1728 * @marker_id: A unique marker id (iwl_mvm_marker_id).
1729 * @reserved: reserved.
1730 * @timestamp: in milliseconds since 1970-01-01 00:00:00 UTC
1731 * @metadata: additional meta data that will be written to the unsiffer log
1733 struct iwl_mvm_marker
{
1739 } __packed
; /* MARKER_API_S_VER_1 */
1742 * enum iwl_dc2dc_config_id - flag ids
1744 * Ids of dc2dc configuration flags
1746 enum iwl_dc2dc_config_id
{
1747 DCDC_LOW_POWER_MODE_MSK_SET
= 0x1, /* not used */
1748 DCDC_FREQ_TUNE_SET
= 0x2,
1749 }; /* MARKER_ID_API_E_VER_1 */
1752 * struct iwl_dc2dc_config_cmd - configure dc2dc values
1754 * (DC2DC_CONFIG_CMD = 0x83)
1756 * Set/Get & configure dc2dc values.
1757 * The command always returns the current dc2dc values.
1759 * @flags: set/get dc2dc
1760 * @enable_low_power_mode: not used.
1761 * @dc2dc_freq_tune0: frequency divider - digital domain
1762 * @dc2dc_freq_tune1: frequency divider - analog domain
1764 struct iwl_dc2dc_config_cmd
{
1766 __le32 enable_low_power_mode
; /* not used */
1767 __le32 dc2dc_freq_tune0
;
1768 __le32 dc2dc_freq_tune1
;
1769 } __packed
; /* DC2DC_CONFIG_CMD_API_S_VER_1 */
1772 * struct iwl_dc2dc_config_resp - response for iwl_dc2dc_config_cmd
1774 * Current dc2dc values returned by the FW.
1776 * @dc2dc_freq_tune0: frequency divider - digital domain
1777 * @dc2dc_freq_tune1: frequency divider - analog domain
1779 struct iwl_dc2dc_config_resp
{
1780 __le32 dc2dc_freq_tune0
;
1781 __le32 dc2dc_freq_tune1
;
1782 } __packed
; /* DC2DC_CONFIG_RESP_API_S_VER_1 */
1784 /***********************************
1786 ***********************************/
1787 /* Smart Fifo state */
1789 SF_LONG_DELAY_ON
= 0, /* should never be called by driver */
1796 /* Smart Fifo possible scenario */
1797 enum iwl_sf_scenario
{
1798 SF_SCENARIO_SINGLE_UNICAST
,
1799 SF_SCENARIO_AGG_UNICAST
,
1800 SF_SCENARIO_MULTICAST
,
1801 SF_SCENARIO_BA_RESP
,
1802 SF_SCENARIO_TX_RESP
,
1806 #define SF_TRANSIENT_STATES_NUMBER 2 /* SF_LONG_DELAY_ON and SF_FULL_ON */
1807 #define SF_NUM_TIMEOUT_TYPES 2 /* Aging timer and Idle timer */
1809 /* smart FIFO default values */
1810 #define SF_W_MARK_SISO 6144
1811 #define SF_W_MARK_MIMO2 8192
1812 #define SF_W_MARK_MIMO3 6144
1813 #define SF_W_MARK_LEGACY 4096
1814 #define SF_W_MARK_SCAN 4096
1816 /* SF Scenarios timers for default configuration (aligned to 32 uSec) */
1817 #define SF_SINGLE_UNICAST_IDLE_TIMER_DEF 160 /* 150 uSec */
1818 #define SF_SINGLE_UNICAST_AGING_TIMER_DEF 400 /* 0.4 mSec */
1819 #define SF_AGG_UNICAST_IDLE_TIMER_DEF 160 /* 150 uSec */
1820 #define SF_AGG_UNICAST_AGING_TIMER_DEF 400 /* 0.4 mSec */
1821 #define SF_MCAST_IDLE_TIMER_DEF 160 /* 150 mSec */
1822 #define SF_MCAST_AGING_TIMER_DEF 400 /* 0.4 mSec */
1823 #define SF_BA_IDLE_TIMER_DEF 160 /* 150 uSec */
1824 #define SF_BA_AGING_TIMER_DEF 400 /* 0.4 mSec */
1825 #define SF_TX_RE_IDLE_TIMER_DEF 160 /* 150 uSec */
1826 #define SF_TX_RE_AGING_TIMER_DEF 400 /* 0.4 mSec */
1828 /* SF Scenarios timers for BSS MAC configuration (aligned to 32 uSec) */
1829 #define SF_SINGLE_UNICAST_IDLE_TIMER 320 /* 300 uSec */
1830 #define SF_SINGLE_UNICAST_AGING_TIMER 2016 /* 2 mSec */
1831 #define SF_AGG_UNICAST_IDLE_TIMER 320 /* 300 uSec */
1832 #define SF_AGG_UNICAST_AGING_TIMER 2016 /* 2 mSec */
1833 #define SF_MCAST_IDLE_TIMER 2016 /* 2 mSec */
1834 #define SF_MCAST_AGING_TIMER 10016 /* 10 mSec */
1835 #define SF_BA_IDLE_TIMER 320 /* 300 uSec */
1836 #define SF_BA_AGING_TIMER 2016 /* 2 mSec */
1837 #define SF_TX_RE_IDLE_TIMER 320 /* 300 uSec */
1838 #define SF_TX_RE_AGING_TIMER 2016 /* 2 mSec */
1840 #define SF_LONG_DELAY_AGING_TIMER 1000000 /* 1 Sec */
1842 #define SF_CFG_DUMMY_NOTIF_OFF BIT(16)
1845 * struct iwl_sf_cfg_cmd - Smart Fifo configuration command.
1846 * @state: smart fifo state, types listed in &enum iwl_sf_state.
1847 * @watermark: Minimum allowed availabe free space in RXF for transient state.
1848 * @long_delay_timeouts: aging and idle timer values for each scenario
1849 * in long delay state.
1850 * @full_on_timeouts: timer values for each scenario in full on state.
1852 struct iwl_sf_cfg_cmd
{
1854 __le32 watermark
[SF_TRANSIENT_STATES_NUMBER
];
1855 __le32 long_delay_timeouts
[SF_NUM_SCENARIO
][SF_NUM_TIMEOUT_TYPES
];
1856 __le32 full_on_timeouts
[SF_NUM_SCENARIO
][SF_NUM_TIMEOUT_TYPES
];
1857 } __packed
; /* SF_CFG_API_S_VER_2 */
1859 /***********************************
1860 * Location Aware Regulatory (LAR) API - MCC updates
1861 ***********************************/
1864 * struct iwl_mcc_update_cmd_v1 - Request the device to update geographic
1865 * regulatory profile according to the given MCC (Mobile Country Code).
1866 * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.
1867 * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the
1868 * MCC in the cmd response will be the relevant MCC in the NVM.
1869 * @mcc: given mobile country code
1870 * @source_id: the source from where we got the MCC, see iwl_mcc_source
1871 * @reserved: reserved for alignment
1873 struct iwl_mcc_update_cmd_v1
{
1877 } __packed
; /* LAR_UPDATE_MCC_CMD_API_S_VER_1 */
1880 * struct iwl_mcc_update_cmd - Request the device to update geographic
1881 * regulatory profile according to the given MCC (Mobile Country Code).
1882 * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.
1883 * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the
1884 * MCC in the cmd response will be the relevant MCC in the NVM.
1885 * @mcc: given mobile country code
1886 * @source_id: the source from where we got the MCC, see iwl_mcc_source
1887 * @reserved: reserved for alignment
1888 * @key: integrity key for MCC API OEM testing
1889 * @reserved2: reserved
1891 struct iwl_mcc_update_cmd
{
1897 } __packed
; /* LAR_UPDATE_MCC_CMD_API_S_VER_2 */
1900 * struct iwl_mcc_update_resp_v1 - response to MCC_UPDATE_CMD.
1901 * Contains the new channel control profile map, if changed, and the new MCC
1902 * (mobile country code).
1903 * The new MCC may be different than what was requested in MCC_UPDATE_CMD.
1904 * @status: see &enum iwl_mcc_update_status
1905 * @mcc: the new applied MCC
1906 * @cap: capabilities for all channels which matches the MCC
1907 * @source_id: the MCC source, see iwl_mcc_source
1908 * @n_channels: number of channels in @channels_data (may be 14, 39, 50 or 51
1909 * channels, depending on platform)
1910 * @channels: channel control data map, DWORD for each channel. Only the first
1913 struct iwl_mcc_update_resp_v1
{
1920 } __packed
; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_1 */
1923 * struct iwl_mcc_update_resp - response to MCC_UPDATE_CMD.
1924 * Contains the new channel control profile map, if changed, and the new MCC
1925 * (mobile country code).
1926 * The new MCC may be different than what was requested in MCC_UPDATE_CMD.
1927 * @status: see &enum iwl_mcc_update_status
1928 * @mcc: the new applied MCC
1929 * @cap: capabilities for all channels which matches the MCC
1930 * @source_id: the MCC source, see iwl_mcc_source
1931 * @time: time elapsed from the MCC test start (in 30 seconds TU)
1932 * @reserved: reserved.
1933 * @n_channels: number of channels in @channels_data (may be 14, 39, 50 or 51
1934 * channels, depending on platform)
1935 * @channels: channel control data map, DWORD for each channel. Only the first
1938 struct iwl_mcc_update_resp
{
1947 } __packed
; /* LAR_UPDATE_MCC_CMD_RESP_S_VER_2 */
1950 * struct iwl_mcc_chub_notif - chub notifies of mcc change
1951 * (MCC_CHUB_UPDATE_CMD = 0xc9)
1952 * The Chub (Communication Hub, CommsHUB) is a HW component that connects to
1953 * the cellular and connectivity cores that gets updates of the mcc, and
1954 * notifies the ucode directly of any mcc change.
1955 * The ucode requests the driver to request the device to update geographic
1956 * regulatory profile according to the given MCC (Mobile Country Code).
1957 * The MCC is two letter-code, ascii upper case[A-Z] or '00' for world domain.
1958 * 'ZZ' MCC will be used to switch to NVM default profile; in this case, the
1959 * MCC in the cmd response will be the relevant MCC in the NVM.
1960 * @mcc: given mobile country code
1961 * @source_id: identity of the change originator, see iwl_mcc_source
1962 * @reserved1: reserved for alignment
1964 struct iwl_mcc_chub_notif
{
1968 } __packed
; /* LAR_MCC_NOTIFY_S */
1970 enum iwl_mcc_update_status
{
1971 MCC_RESP_NEW_CHAN_PROFILE
,
1972 MCC_RESP_SAME_CHAN_PROFILE
,
1974 MCC_RESP_NVM_DISABLED
,
1976 MCC_RESP_LOW_PRIORITY
,
1977 MCC_RESP_TEST_MODE_ACTIVE
,
1978 MCC_RESP_TEST_MODE_NOT_ACTIVE
,
1979 MCC_RESP_TEST_MODE_DENIAL_OF_SERVICE
,
1982 enum iwl_mcc_source
{
1983 MCC_SOURCE_OLD_FW
= 0,
1985 MCC_SOURCE_BIOS
= 2,
1986 MCC_SOURCE_3G_LTE_HOST
= 3,
1987 MCC_SOURCE_3G_LTE_DEVICE
= 4,
1988 MCC_SOURCE_WIFI
= 5,
1989 MCC_SOURCE_RESERVED
= 6,
1990 MCC_SOURCE_DEFAULT
= 7,
1991 MCC_SOURCE_UNINITIALIZED
= 8,
1992 MCC_SOURCE_MCC_API
= 9,
1993 MCC_SOURCE_GET_CURRENT
= 0x10,
1994 MCC_SOURCE_GETTING_MCC_TEST_MODE
= 0x11,
1997 /* DTS measurements */
1999 enum iwl_dts_measurement_flags
{
2000 DTS_TRIGGER_CMD_FLAGS_TEMP
= BIT(0),
2001 DTS_TRIGGER_CMD_FLAGS_VOLT
= BIT(1),
2005 * struct iwl_dts_measurement_cmd - request DTS temp and/or voltage measurements
2007 * @flags: indicates which measurements we want as specified in
2008 * &enum iwl_dts_measurement_flags
2010 struct iwl_dts_measurement_cmd
{
2012 } __packed
; /* TEMPERATURE_MEASUREMENT_TRIGGER_CMD_S */
2015 * enum iwl_dts_control_measurement_mode - DTS measurement type
2016 * @DTS_AUTOMATIC: Automatic mode (full SW control). Provide temperature read
2017 * back (latest value. Not waiting for new value). Use automatic
2018 * SW DTS configuration.
2019 * @DTS_REQUEST_READ: Request DTS read. Configure DTS with manual settings,
2020 * trigger DTS reading and provide read back temperature read
2022 * @DTS_OVER_WRITE: over-write the DTS temperatures in the SW until next read
2023 * @DTS_DIRECT_WITHOUT_MEASURE: DTS returns its latest temperature result,
2024 * without measurement trigger.
2026 enum iwl_dts_control_measurement_mode
{
2028 DTS_REQUEST_READ
= 1,
2030 DTS_DIRECT_WITHOUT_MEASURE
= 3,
2034 * enum iwl_dts_used - DTS to use or used for measurement in the DTS request
2036 * @DTS_USE_CHAIN_A: chain A
2037 * @DTS_USE_CHAIN_B: chain B
2038 * @DTS_USE_CHAIN_C: chain C
2039 * @XTAL_TEMPERATURE - read temperature from xtal
2043 DTS_USE_CHAIN_A
= 1,
2044 DTS_USE_CHAIN_B
= 2,
2045 DTS_USE_CHAIN_C
= 3,
2046 XTAL_TEMPERATURE
= 4,
2050 * enum iwl_dts_bit_mode - bit-mode to use in DTS request read mode
2051 * @DTS_BIT6_MODE: bit 6 mode
2052 * @DTS_BIT8_MODE: bit 8 mode
2054 enum iwl_dts_bit_mode
{
2060 * struct iwl_ext_dts_measurement_cmd - request extended DTS temp measurements
2061 * @control_mode: see &enum iwl_dts_control_measurement_mode
2062 * @temperature: used when over write DTS mode is selected
2063 * @sensor: set temperature sensor to use. See &enum iwl_dts_used
2064 * @avg_factor: average factor to DTS in request DTS read mode
2065 * @bit_mode: value defines the DTS bit mode to use. See &enum iwl_dts_bit_mode
2066 * @step_duration: step duration for the DTS
2068 struct iwl_ext_dts_measurement_cmd
{
2069 __le32 control_mode
;
2074 __le32 step_duration
;
2075 } __packed
; /* XVT_FW_DTS_CONTROL_MEASUREMENT_REQUEST_API_S */
2078 * struct iwl_dts_measurement_notif_v1 - measurements notification
2080 * @temp: the measured temperature
2081 * @voltage: the measured voltage
2083 struct iwl_dts_measurement_notif_v1
{
2086 } __packed
; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S_VER_1*/
2089 * struct iwl_dts_measurement_notif_v2 - measurements notification
2091 * @temp: the measured temperature
2092 * @voltage: the measured voltage
2093 * @threshold_idx: the trip index that was crossed
2095 struct iwl_dts_measurement_notif_v2
{
2098 __le32 threshold_idx
;
2099 } __packed
; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S_VER_2 */
2102 * struct ct_kill_notif - CT-kill entry notification
2104 * @temperature: the current temperature in celsius
2105 * @reserved: reserved
2107 struct ct_kill_notif
{
2110 } __packed
; /* GRP_PHY_CT_KILL_NTF */
2113 * enum ctdp_cmd_operation - CTDP command operations
2114 * @CTDP_CMD_OPERATION_START: update the current budget
2115 * @CTDP_CMD_OPERATION_STOP: stop ctdp
2116 * @CTDP_CMD_OPERATION_REPORT: get the avgerage budget
2118 enum iwl_mvm_ctdp_cmd_operation
{
2119 CTDP_CMD_OPERATION_START
= 0x1,
2120 CTDP_CMD_OPERATION_STOP
= 0x2,
2121 CTDP_CMD_OPERATION_REPORT
= 0x4,
2122 };/* CTDP_CMD_OPERATION_TYPE_E */
2125 * struct iwl_mvm_ctdp_cmd - track and manage the FW power consumption budget
2127 * @operation: see &enum iwl_mvm_ctdp_cmd_operation
2128 * @budget: the budget in milliwatt
2129 * @window_size: defined in API but not used
2131 struct iwl_mvm_ctdp_cmd
{
2137 #define IWL_MAX_DTS_TRIPS 8
2140 * struct temp_report_ths_cmd - set temperature thresholds
2142 * @num_temps: number of temperature thresholds passed
2143 * @thresholds: array with the thresholds to be configured
2145 struct temp_report_ths_cmd
{
2147 __le16 thresholds
[IWL_MAX_DTS_TRIPS
];
2148 } __packed
; /* GRP_PHY_TEMP_REPORTING_THRESHOLDS_CMD */
2150 /***********************************
2152 ***********************************/
2154 /* Type of TDLS request */
2155 enum iwl_tdls_channel_switch_type
{
2156 TDLS_SEND_CHAN_SW_REQ
= 0,
2157 TDLS_SEND_CHAN_SW_RESP_AND_MOVE_CH
,
2159 }; /* TDLS_STA_CHANNEL_SWITCH_CMD_TYPE_API_E_VER_1 */
2162 * struct iwl_tdls_channel_switch_timing - Switch timing in TDLS channel-switch
2163 * @frame_timestamp: GP2 timestamp of channel-switch request/response packet
2164 * received from peer
2165 * @max_offchan_duration: What amount of microseconds out of a DTIM is given
2166 * to the TDLS off-channel communication. For instance if the DTIM is
2167 * 200TU and the TDLS peer is to be given 25% of the time, the value
2168 * given will be 50TU, or 50 * 1024 if translated into microseconds.
2169 * @switch_time: switch time the peer sent in its channel switch timing IE
2170 * @switch_timout: switch timeout the peer sent in its channel switch timing IE
2172 struct iwl_tdls_channel_switch_timing
{
2173 __le32 frame_timestamp
; /* GP2 time of peer packet Rx */
2174 __le32 max_offchan_duration
; /* given in micro-seconds */
2175 __le32 switch_time
; /* given in micro-seconds */
2176 __le32 switch_timeout
; /* given in micro-seconds */
2177 } __packed
; /* TDLS_STA_CHANNEL_SWITCH_TIMING_DATA_API_S_VER_1 */
2179 #define IWL_TDLS_CH_SW_FRAME_MAX_SIZE 200
2182 * struct iwl_tdls_channel_switch_frame - TDLS channel switch frame template
2184 * A template representing a TDLS channel-switch request or response frame
2186 * @switch_time_offset: offset to the channel switch timing IE in the template
2187 * @tx_cmd: Tx parameters for the frame
2190 struct iwl_tdls_channel_switch_frame
{
2191 __le32 switch_time_offset
;
2192 struct iwl_tx_cmd tx_cmd
;
2193 u8 data
[IWL_TDLS_CH_SW_FRAME_MAX_SIZE
];
2194 } __packed
; /* TDLS_STA_CHANNEL_SWITCH_FRAME_API_S_VER_1 */
2197 * struct iwl_tdls_channel_switch_cmd - TDLS channel switch command
2199 * The command is sent to initiate a channel switch and also in response to
2200 * incoming TDLS channel-switch request/response packets from remote peers.
2202 * @switch_type: see &enum iwl_tdls_channel_switch_type
2203 * @peer_sta_id: station id of TDLS peer
2204 * @ci: channel we switch to
2205 * @timing: timing related data for command
2206 * @frame: channel-switch request/response template, depending to switch_type
2208 struct iwl_tdls_channel_switch_cmd
{
2211 struct iwl_fw_channel_info ci
;
2212 struct iwl_tdls_channel_switch_timing timing
;
2213 struct iwl_tdls_channel_switch_frame frame
;
2214 } __packed
; /* TDLS_STA_CHANNEL_SWITCH_CMD_API_S_VER_1 */
2217 * struct iwl_tdls_channel_switch_notif - TDLS channel switch start notification
2219 * @status: non-zero on success
2220 * @offchannel_duration: duration given in microseconds
2221 * @sta_id: peer currently performing the channel-switch with
2223 struct iwl_tdls_channel_switch_notif
{
2225 __le32 offchannel_duration
;
2227 } __packed
; /* TDLS_STA_CHANNEL_SWITCH_NTFY_API_S_VER_1 */
2230 * struct iwl_tdls_sta_info - TDLS station info
2232 * @sta_id: station id of the TDLS peer
2233 * @tx_to_peer_tid: TID reserved vs. the peer for FW based Tx
2234 * @tx_to_peer_ssn: initial SSN the FW should use for Tx on its TID vs the peer
2235 * @is_initiator: 1 if the peer is the TDLS link initiator, 0 otherwise
2237 struct iwl_tdls_sta_info
{
2240 __le16 tx_to_peer_ssn
;
2241 __le32 is_initiator
;
2242 } __packed
; /* TDLS_STA_INFO_VER_1 */
2245 * struct iwl_tdls_config_cmd - TDLS basic config command
2247 * @id_and_color: MAC id and color being configured
2248 * @tdls_peer_count: amount of currently connected TDLS peers
2249 * @tx_to_ap_tid: TID reverved vs. the AP for FW based Tx
2250 * @tx_to_ap_ssn: initial SSN the FW should use for Tx on its TID vs. the AP
2251 * @sta_info: per-station info. Only the first tdls_peer_count entries are set
2252 * @pti_req_data_offset: offset of network-level data for the PTI template
2253 * @pti_req_tx_cmd: Tx parameters for PTI request template
2254 * @pti_req_template: PTI request template data
2256 struct iwl_tdls_config_cmd
{
2257 __le32 id_and_color
; /* mac id and color */
2260 __le16 tx_to_ap_ssn
;
2261 struct iwl_tdls_sta_info sta_info
[IWL_MVM_TDLS_STA_COUNT
];
2263 __le32 pti_req_data_offset
;
2264 struct iwl_tx_cmd pti_req_tx_cmd
;
2265 u8 pti_req_template
[0];
2266 } __packed
; /* TDLS_CONFIG_CMD_API_S_VER_1 */
2269 * struct iwl_tdls_config_sta_info_res - TDLS per-station config information
2271 * @sta_id: station id of the TDLS peer
2272 * @tx_to_peer_last_seq: last sequence number used by FW during FW-based Tx to
2275 struct iwl_tdls_config_sta_info_res
{
2277 __le16 tx_to_peer_last_seq
;
2278 } __packed
; /* TDLS_STA_INFO_RSP_VER_1 */
2281 * struct iwl_tdls_config_res - TDLS config information from FW
2283 * @tx_to_ap_last_seq: last sequence number used by FW during FW-based Tx to AP
2284 * @sta_info: per-station TDLS config information
2286 struct iwl_tdls_config_res
{
2287 __le32 tx_to_ap_last_seq
;
2288 struct iwl_tdls_config_sta_info_res sta_info
[IWL_MVM_TDLS_STA_COUNT
];
2289 } __packed
; /* TDLS_CONFIG_RSP_API_S_VER_1 */
2291 #define TX_FIFO_MAX_NUM_9000 8
2292 #define TX_FIFO_MAX_NUM 15
2293 #define RX_FIFO_MAX_NUM 2
2294 #define TX_FIFO_INTERNAL_MAX_NUM 6
2297 * struct iwl_shared_mem_cfg_v1 - Shared memory configuration information
2299 * @shared_mem_addr: shared memory addr (pre 8000 HW set to 0x0 as MARBH is not
2301 * @shared_mem_size: shared memory size
2302 * @sample_buff_addr: internal sample (mon/adc) buff addr (pre 8000 HW set to
2303 * 0x0 as accessible only via DBGM RDAT)
2304 * @sample_buff_size: internal sample buff size
2305 * @txfifo_addr: start addr of TXF0 (excluding the context table 0.5KB), (pre
2306 * 8000 HW set to 0x0 as not accessible)
2307 * @txfifo_size: size of TXF0 ... TXF7
2308 * @rxfifo_size: RXF1, RXF2 sizes. If there is no RXF2, it'll have a value of 0
2309 * @page_buff_addr: used by UMAC and performance debug (page miss analysis),
2310 * when paging is not supported this should be 0
2311 * @page_buff_size: size of %page_buff_addr
2312 * @rxfifo_addr: Start address of rxFifo
2313 * @internal_txfifo_addr: start address of internalFifo
2314 * @internal_txfifo_size: internal fifos' size
2316 * NOTE: on firmware that don't have IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG
2317 * set, the last 3 members don't exist.
2319 struct iwl_shared_mem_cfg_v1
{
2320 __le32 shared_mem_addr
;
2321 __le32 shared_mem_size
;
2322 __le32 sample_buff_addr
;
2323 __le32 sample_buff_size
;
2325 __le32 txfifo_size
[TX_FIFO_MAX_NUM_9000
];
2326 __le32 rxfifo_size
[RX_FIFO_MAX_NUM
];
2327 __le32 page_buff_addr
;
2328 __le32 page_buff_size
;
2330 __le32 internal_txfifo_addr
;
2331 __le32 internal_txfifo_size
[TX_FIFO_INTERNAL_MAX_NUM
];
2332 } __packed
; /* SHARED_MEM_ALLOC_API_S_VER_2 */
2335 * struct iwl_shared_mem_lmac_cfg - LMAC shared memory configuration
2337 * @txfifo_addr: start addr of TXF0 (excluding the context table 0.5KB)
2338 * @txfifo_size: size of TX FIFOs
2339 * @rxfifo1_addr: RXF1 addr
2340 * @rxfifo1_size: RXF1 size
2342 struct iwl_shared_mem_lmac_cfg
{
2344 __le32 txfifo_size
[TX_FIFO_MAX_NUM
];
2345 __le32 rxfifo1_addr
;
2346 __le32 rxfifo1_size
;
2348 } __packed
; /* SHARED_MEM_ALLOC_LMAC_API_S_VER_1 */
2351 * struct iwl_shared_mem_cfg - Shared memory configuration information
2353 * @shared_mem_addr: shared memory address
2354 * @shared_mem_size: shared memory size
2355 * @sample_buff_addr: internal sample (mon/adc) buff addr
2356 * @sample_buff_size: internal sample buff size
2357 * @rxfifo2_addr: start addr of RXF2
2358 * @rxfifo2_size: size of RXF2
2359 * @page_buff_addr: used by UMAC and performance debug (page miss analysis),
2360 * when paging is not supported this should be 0
2361 * @page_buff_size: size of %page_buff_addr
2362 * @lmac_num: number of LMACs (1 or 2)
2363 * @lmac_smem: per - LMAC smem data
2365 struct iwl_shared_mem_cfg
{
2366 __le32 shared_mem_addr
;
2367 __le32 shared_mem_size
;
2368 __le32 sample_buff_addr
;
2369 __le32 sample_buff_size
;
2370 __le32 rxfifo2_addr
;
2371 __le32 rxfifo2_size
;
2372 __le32 page_buff_addr
;
2373 __le32 page_buff_size
;
2375 struct iwl_shared_mem_lmac_cfg lmac_smem
[2];
2376 } __packed
; /* SHARED_MEM_ALLOC_API_S_VER_3 */
2379 * struct iwl_mu_group_mgmt_cmd - VHT MU-MIMO group configuration
2381 * @membership_status: a bitmap of MU groups
2382 * @user_position:the position of station in a group. If the station is in the
2383 * group then bits (group * 2) is the position -1
2385 struct iwl_mu_group_mgmt_cmd
{
2387 __le32 membership_status
[2];
2388 __le32 user_position
[4];
2389 } __packed
; /* MU_GROUP_ID_MNG_TABLE_API_S_VER_1 */
2392 * struct iwl_mu_group_mgmt_notif - VHT MU-MIMO group id notification
2394 * @membership_status: a bitmap of MU groups
2395 * @user_position: the position of station in a group. If the station is in the
2396 * group then bits (group * 2) is the position -1
2398 struct iwl_mu_group_mgmt_notif
{
2399 __le32 membership_status
[2];
2400 __le32 user_position
[4];
2401 } __packed
; /* MU_GROUP_MNG_NTFY_API_S_VER_1 */
2403 #define MAX_STORED_BEACON_SIZE 600
2406 * struct iwl_stored_beacon_notif - Stored beacon notification
2408 * @system_time: system time on air rise
2409 * @tsf: TSF on air rise
2410 * @beacon_timestamp: beacon on air rise
2411 * @band: band, matches &RX_RES_PHY_FLAGS_BAND_24 definition
2412 * @channel: channel this beacon was received on
2413 * @rates: rate in ucode internal format
2414 * @byte_count: frame's byte count
2416 struct iwl_stored_beacon_notif
{
2419 __le32 beacon_timestamp
;
2424 u8 data
[MAX_STORED_BEACON_SIZE
];
2425 } __packed
; /* WOWLAN_STROED_BEACON_INFO_S_VER_2 */
2427 #define LQM_NUMBER_OF_STATIONS_IN_REPORT 16
2429 enum iwl_lqm_cmd_operatrions
{
2430 LQM_CMD_OPERATION_START_MEASUREMENT
= 0x01,
2431 LQM_CMD_OPERATION_STOP_MEASUREMENT
= 0x02,
2434 enum iwl_lqm_status
{
2435 LQM_STATUS_SUCCESS
= 0,
2436 LQM_STATUS_TIMEOUT
= 1,
2437 LQM_STATUS_ABORT
= 2,
2441 * struct iwl_link_qual_msrmnt_cmd - Link Quality Measurement command
2442 * @cmd_operatrion: command operation to be performed (start or stop)
2444 * @mac_id: MAC ID the measurement applies to.
2445 * @measurement_time: time of the total measurement to be performed, in uSec.
2446 * @timeout: maximum time allowed until a response is sent, in uSec.
2448 struct iwl_link_qual_msrmnt_cmd
{
2449 __le32 cmd_operation
;
2451 __le32 measurement_time
;
2453 } __packed
/* LQM_CMD_API_S_VER_1 */;
2456 * struct iwl_link_qual_msrmnt_notif - Link Quality Measurement notification
2458 * @frequent_stations_air_time: an array containing the total air time
2459 * (in uSec) used by the most frequently transmitting stations.
2460 * @number_of_stations: the number of uniqe stations included in the array
2461 * (a number between 0 to 16)
2462 * @total_air_time_other_stations: the total air time (uSec) used by all the
2463 * stations which are not included in the above report.
2464 * @time_in_measurement_window: the total time in uSec in which a measurement
2466 * @tx_frame_dropped: the number of TX frames dropped due to retry limit during
2468 * @mac_id: MAC ID the measurement applies to.
2469 * @status: return status. may be one of the LQM_STATUS_* defined above.
2470 * @reserved: reserved.
2472 struct iwl_link_qual_msrmnt_notif
{
2473 __le32 frequent_stations_air_time
[LQM_NUMBER_OF_STATIONS_IN_REPORT
];
2474 __le32 number_of_stations
;
2475 __le32 total_air_time_other_stations
;
2476 __le32 time_in_measurement_window
;
2477 __le32 tx_frame_dropped
;
2481 } __packed
; /* LQM_MEASUREMENT_COMPLETE_NTF_API_S_VER1 */
2484 * struct iwl_channel_switch_noa_notif - Channel switch NOA notification
2486 * @id_and_color: ID and color of the MAC
2488 struct iwl_channel_switch_noa_notif
{
2489 __le32 id_and_color
;
2490 } __packed
; /* CHANNEL_SWITCH_START_NTFY_API_S_VER_1 */
2492 /* Operation types for the debug mem access */
2494 DEBUG_MEM_OP_READ
= 0,
2495 DEBUG_MEM_OP_WRITE
= 1,
2496 DEBUG_MEM_OP_WRITE_BYTES
= 2,
2499 #define DEBUG_MEM_MAX_SIZE_DWORDS 32
2502 * struct iwl_dbg_mem_access_cmd - Request the device to read/write memory
2503 * @op: DEBUG_MEM_OP_*
2504 * @addr: address to read/write from/to
2505 * @len: in dwords, to read/write
2506 * @data: for write opeations, contains the source buffer
2508 struct iwl_dbg_mem_access_cmd
{
2513 } __packed
; /* DEBUG_(U|L)MAC_RD_WR_CMD_API_S_VER_1 */
2515 /* Status responses for the debug mem access */
2517 DEBUG_MEM_STATUS_SUCCESS
= 0x0,
2518 DEBUG_MEM_STATUS_FAILED
= 0x1,
2519 DEBUG_MEM_STATUS_LOCKED
= 0x2,
2520 DEBUG_MEM_STATUS_HIDDEN
= 0x3,
2521 DEBUG_MEM_STATUS_LENGTH
= 0x4,
2525 * struct iwl_dbg_mem_access_rsp - Response to debug mem commands
2526 * @status: DEBUG_MEM_STATUS_*
2527 * @len: read dwords (0 for write operations)
2528 * @data: contains the read DWs
2530 struct iwl_dbg_mem_access_rsp
{
2534 } __packed
; /* DEBUG_(U|L)MAC_RD_WR_RSP_API_S_VER_1 */
2537 * struct iwl_nvm_access_complete_cmd - NVM_ACCESS commands are completed
2539 struct iwl_nvm_access_complete_cmd
{
2541 } __packed
; /* NVM_ACCESS_COMPLETE_CMD_API_S_VER_1 */
2544 * enum iwl_extended_cfg_flag - commands driver may send before
2545 * finishing init flow
2546 * @IWL_INIT_DEBUG_CFG: driver is going to send debug config command
2547 * @IWL_INIT_NVM: driver is going to send NVM_ACCESS commands
2548 * @IWL_INIT_PHY: driver is going to send PHY_DB commands
2550 enum iwl_extended_cfg_flags
{
2557 * struct iwl_extended_cfg_cmd - mark what commands ucode should wait for
2558 * before finishing init flows
2559 * @init_flags: values from iwl_extended_cfg_flags
2561 struct iwl_init_extended_cfg_cmd
{
2563 } __packed
; /* INIT_EXTENDED_CFG_CMD_API_S_VER_1 */
2566 * struct iwl_nvm_get_info - request to get NVM data
2568 struct iwl_nvm_get_info
{
2570 } __packed
; /* GRP_REGULATORY_NVM_GET_INFO_CMD_S_VER_1 */
2573 * struct iwl_nvm_get_info_general - general NVM data
2574 * @flags: 1 - empty, 0 - valid
2575 * @nvm_version: nvm version
2576 * @board_type: board type
2578 struct iwl_nvm_get_info_general
{
2583 } __packed
; /* GRP_REGULATORY_NVM_GET_INFO_GENERAL_S_VER_1 */
2586 * struct iwl_nvm_get_info_sku - mac information
2587 * @enable_24g: band 2.4G enabled
2588 * @enable_5g: band 5G enabled
2589 * @enable_11n: 11n enabled
2590 * @enable_11ac: 11ac enabled
2591 * @mimo_disable: MIMO enabled
2592 * @ext_crypto: Extended crypto enabled
2594 struct iwl_nvm_get_info_sku
{
2599 __le32 mimo_disable
;
2601 } __packed
; /* GRP_REGULATORY_NVM_GET_INFO_MAC_SKU_SECTION_S_VER_1 */
2604 * struct iwl_nvm_get_info_phy - phy information
2605 * @tx_chains: BIT 0 chain A, BIT 1 chain B
2606 * @rx_chains: BIT 0 chain A, BIT 1 chain B
2608 struct iwl_nvm_get_info_phy
{
2611 } __packed
; /* GRP_REGULATORY_NVM_GET_INFO_PHY_SKU_SECTION_S_VER_1 */
2613 #define IWL_NUM_CHANNELS (51)
2616 * struct iwl_nvm_get_info_regulatory - regulatory information
2617 * @lar_enabled: is LAR enabled
2618 * @channel_profile: regulatory data of this channel
2619 * @regulatory: regulatory data, see &enum iwl_nvm_channel_flags for data
2621 struct iwl_nvm_get_info_regulatory
{
2623 __le16 channel_profile
[IWL_NUM_CHANNELS
];
2625 } __packed
; /* GRP_REGULATORY_NVM_GET_INFO_REGULATORY_S_VER_1 */
2628 * struct iwl_nvm_get_info_rsp - response to get NVM data
2629 * @general: general NVM data
2630 * @mac_sku: data relating to MAC sku
2631 * @phy_sku: data relating to PHY sku
2632 * @regulatory: regulatory data
2634 struct iwl_nvm_get_info_rsp
{
2635 struct iwl_nvm_get_info_general general
;
2636 struct iwl_nvm_get_info_sku mac_sku
;
2637 struct iwl_nvm_get_info_phy phy_sku
;
2638 struct iwl_nvm_get_info_regulatory regulatory
;
2639 } __packed
; /* GRP_REGULATORY_NVM_GET_INFO_CMD_RSP_S_VER_1 */
2642 * struct iwl_mvm_antenna_coupling_notif - antenna coupling notification
2643 * @isolation: antenna isolation value
2645 struct iwl_mvm_antenna_coupling_notif
{
2649 #endif /* __fw_api_h__ */