1*8e99ea8dSJohannes Berg /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2*8e99ea8dSJohannes Berg /*
3*8e99ea8dSJohannes Berg  * Copyright (C) 2012-2014, 2018-2019 Intel Corporation
4*8e99ea8dSJohannes Berg  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5*8e99ea8dSJohannes Berg  * Copyright (C) 2016-2017 Intel Deutschland GmbH
6*8e99ea8dSJohannes Berg  */
7d172a5efSJohannes Berg #ifndef __iwl_fw_api_datapath_h__
8d172a5efSJohannes Berg #define __iwl_fw_api_datapath_h__
9d172a5efSJohannes Berg 
10d172a5efSJohannes Berg /**
11d172a5efSJohannes Berg  * enum iwl_data_path_subcmd_ids - data path group commands
12d172a5efSJohannes Berg  */
13d172a5efSJohannes Berg enum iwl_data_path_subcmd_ids {
14d172a5efSJohannes Berg 	/**
15d172a5efSJohannes Berg 	 * @DQA_ENABLE_CMD: &struct iwl_dqa_enable_cmd
16d172a5efSJohannes Berg 	 */
17d172a5efSJohannes Berg 	DQA_ENABLE_CMD = 0x0,
18d172a5efSJohannes Berg 
19d172a5efSJohannes Berg 	/**
20d172a5efSJohannes Berg 	 * @UPDATE_MU_GROUPS_CMD: &struct iwl_mu_group_mgmt_cmd
21d172a5efSJohannes Berg 	 */
22d172a5efSJohannes Berg 	UPDATE_MU_GROUPS_CMD = 0x1,
23d172a5efSJohannes Berg 
24d172a5efSJohannes Berg 	/**
25d172a5efSJohannes Berg 	 * @TRIGGER_RX_QUEUES_NOTIF_CMD: &struct iwl_rxq_sync_cmd
26d172a5efSJohannes Berg 	 */
27d172a5efSJohannes Berg 	TRIGGER_RX_QUEUES_NOTIF_CMD = 0x2,
28d172a5efSJohannes Berg 
29d172a5efSJohannes Berg 	/**
308a6171a7SLuca Coelho 	 * @STA_HE_CTXT_CMD: &struct iwl_he_sta_context_cmd
318a6171a7SLuca Coelho 	 */
328a6171a7SLuca Coelho 	STA_HE_CTXT_CMD = 0x7,
338a6171a7SLuca Coelho 
348a6171a7SLuca Coelho 	/**
358edbfaa1SSara Sharon 	 * @RFH_QUEUE_CONFIG_CMD: &struct iwl_rfh_queue_config
368edbfaa1SSara Sharon 	 */
378edbfaa1SSara Sharon 	RFH_QUEUE_CONFIG_CMD = 0xD,
388edbfaa1SSara Sharon 
398edbfaa1SSara Sharon 	/**
40110b32f0SGregory Greenman 	 * @TLC_MNG_CONFIG_CMD: &struct iwl_tlc_config_cmd
41110b32f0SGregory Greenman 	 */
42110b32f0SGregory Greenman 	TLC_MNG_CONFIG_CMD = 0xF,
43110b32f0SGregory Greenman 
44110b32f0SGregory Greenman 	/**
4598920961SShaul Triebitz 	 * @HE_AIR_SNIFFER_CONFIG_CMD: &struct iwl_he_monitor_cmd
4698920961SShaul Triebitz 	 */
4798920961SShaul Triebitz 	HE_AIR_SNIFFER_CONFIG_CMD = 0x13,
4898920961SShaul Triebitz 
4998920961SShaul Triebitz 	/**
505213e8a8SJohannes Berg 	 * @CHEST_COLLECTOR_FILTER_CONFIG_CMD: Configure the CSI
515213e8a8SJohannes Berg 	 *	matrix collection, uses &struct iwl_channel_estimation_cfg
525213e8a8SJohannes Berg 	 */
535213e8a8SJohannes Berg 	CHEST_COLLECTOR_FILTER_CONFIG_CMD = 0x14,
545213e8a8SJohannes Berg 
555213e8a8SJohannes Berg 	/**
56bf9dfedaSShaul Triebitz 	 * @RX_NO_DATA_NOTIF: &struct iwl_rx_no_data
57bf9dfedaSShaul Triebitz 	 */
58bf9dfedaSShaul Triebitz 	RX_NO_DATA_NOTIF = 0xF5,
59bf9dfedaSShaul Triebitz 
60bf9dfedaSShaul Triebitz 	/**
6146d372afSGregory Greenman 	 * @TLC_MNG_UPDATE_NOTIF: &struct iwl_tlc_update_notif
6246d372afSGregory Greenman 	 */
6346d372afSGregory Greenman 	TLC_MNG_UPDATE_NOTIF = 0xF7,
6446d372afSGregory Greenman 
6546d372afSGregory Greenman 	/**
66d172a5efSJohannes Berg 	 * @STA_PM_NOTIF: &struct iwl_mvm_pm_state_notification
67d172a5efSJohannes Berg 	 */
68d172a5efSJohannes Berg 	STA_PM_NOTIF = 0xFD,
69d172a5efSJohannes Berg 
70d172a5efSJohannes Berg 	/**
71d172a5efSJohannes Berg 	 * @MU_GROUP_MGMT_NOTIF: &struct iwl_mu_group_mgmt_notif
72d172a5efSJohannes Berg 	 */
73d172a5efSJohannes Berg 	MU_GROUP_MGMT_NOTIF = 0xFE,
74d172a5efSJohannes Berg 
75d172a5efSJohannes Berg 	/**
76d172a5efSJohannes Berg 	 * @RX_QUEUES_NOTIFICATION: &struct iwl_rxq_sync_notification
77d172a5efSJohannes Berg 	 */
78d172a5efSJohannes Berg 	RX_QUEUES_NOTIFICATION = 0xFF,
79d172a5efSJohannes Berg };
80d172a5efSJohannes Berg 
81d172a5efSJohannes Berg /**
82d172a5efSJohannes Berg  * struct iwl_mu_group_mgmt_cmd - VHT MU-MIMO group configuration
83d172a5efSJohannes Berg  *
84d172a5efSJohannes Berg  * @reserved: reserved
85d172a5efSJohannes Berg  * @membership_status: a bitmap of MU groups
86d172a5efSJohannes Berg  * @user_position:the position of station in a group. If the station is in the
87d172a5efSJohannes Berg  *	group then bits (group * 2) is the position -1
88d172a5efSJohannes Berg  */
89d172a5efSJohannes Berg struct iwl_mu_group_mgmt_cmd {
90d172a5efSJohannes Berg 	__le32 reserved;
91d172a5efSJohannes Berg 	__le32 membership_status[2];
92d172a5efSJohannes Berg 	__le32 user_position[4];
93d172a5efSJohannes Berg } __packed; /* MU_GROUP_ID_MNG_TABLE_API_S_VER_1 */
94d172a5efSJohannes Berg 
95d172a5efSJohannes Berg /**
96d172a5efSJohannes Berg  * struct iwl_mu_group_mgmt_notif - VHT MU-MIMO group id notification
97d172a5efSJohannes Berg  *
98d172a5efSJohannes Berg  * @membership_status: a bitmap of MU groups
99d172a5efSJohannes Berg  * @user_position: the position of station in a group. If the station is in the
100d172a5efSJohannes Berg  *	group then bits (group * 2) is the position -1
101d172a5efSJohannes Berg  */
102d172a5efSJohannes Berg struct iwl_mu_group_mgmt_notif {
103d172a5efSJohannes Berg 	__le32 membership_status[2];
104d172a5efSJohannes Berg 	__le32 user_position[4];
105d172a5efSJohannes Berg } __packed; /* MU_GROUP_MNG_NTFY_API_S_VER_1 */
106d172a5efSJohannes Berg 
1075213e8a8SJohannes Berg enum iwl_channel_estimation_flags {
1085213e8a8SJohannes Berg 	IWL_CHANNEL_ESTIMATION_ENABLE	= BIT(0),
1095213e8a8SJohannes Berg 	IWL_CHANNEL_ESTIMATION_TIMER	= BIT(1),
1105213e8a8SJohannes Berg 	IWL_CHANNEL_ESTIMATION_COUNTER	= BIT(2),
1115213e8a8SJohannes Berg };
1125213e8a8SJohannes Berg 
1135213e8a8SJohannes Berg /**
1145213e8a8SJohannes Berg  * struct iwl_channel_estimation_cfg - channel estimation reporting config
1155213e8a8SJohannes Berg  */
1165213e8a8SJohannes Berg struct iwl_channel_estimation_cfg {
1175213e8a8SJohannes Berg 	/**
1185213e8a8SJohannes Berg 	 * @flags: flags, see &enum iwl_channel_estimation_flags
1195213e8a8SJohannes Berg 	 */
1205213e8a8SJohannes Berg 	__le32 flags;
1215213e8a8SJohannes Berg 	/**
1225213e8a8SJohannes Berg 	 * @timer: if enabled via flags, automatically disable after this many
1235213e8a8SJohannes Berg 	 *	microseconds
1245213e8a8SJohannes Berg 	 */
1255213e8a8SJohannes Berg 	__le32 timer;
1265213e8a8SJohannes Berg 	/**
1275213e8a8SJohannes Berg 	 * @count: if enabled via flags, automatically disable after this many
1285213e8a8SJohannes Berg 	 *	frames with channel estimation matrix were captured
1295213e8a8SJohannes Berg 	 */
1305213e8a8SJohannes Berg 	__le32 count;
1315213e8a8SJohannes Berg 	/**
1325213e8a8SJohannes Berg 	 * @rate_n_flags_mask: only try to record the channel estimation matrix
1335213e8a8SJohannes Berg 	 *	if the rate_n_flags value for the received frame (let's call
1345213e8a8SJohannes Berg 	 *	that rx_rnf) matches the mask/value given here like this:
1355213e8a8SJohannes Berg 	 *	(rx_rnf & rate_n_flags_mask) == rate_n_flags_val.
1365213e8a8SJohannes Berg 	 */
1375213e8a8SJohannes Berg 	__le32 rate_n_flags_mask;
1385213e8a8SJohannes Berg 	/**
1395213e8a8SJohannes Berg 	 * @rate_n_flags_val: see @rate_n_flags_mask
1405213e8a8SJohannes Berg 	 */
1415213e8a8SJohannes Berg 	__le32 rate_n_flags_val;
1425213e8a8SJohannes Berg 	/**
1435213e8a8SJohannes Berg 	 * @reserved: reserved (for alignment)
1445213e8a8SJohannes Berg 	 */
1455213e8a8SJohannes Berg 	__le32 reserved;
1465213e8a8SJohannes Berg 	/**
1475213e8a8SJohannes Berg 	 * @frame_types: bitmap of frame types to capture, the received frame's
1485213e8a8SJohannes Berg 	 *	subtype|type takes 6 bits in the frame and the corresponding bit
1495213e8a8SJohannes Berg 	 *	in this field must be set to 1 to capture channel estimation for
1505213e8a8SJohannes Berg 	 *	that frame type. Set to all-ones to enable capturing for all
1515213e8a8SJohannes Berg 	 *	frame types.
1525213e8a8SJohannes Berg 	 */
1535213e8a8SJohannes Berg 	__le64 frame_types;
1545213e8a8SJohannes Berg } __packed; /* CHEST_COLLECTOR_FILTER_CMD_API_S_VER_1 */
1555213e8a8SJohannes Berg 
156d172a5efSJohannes Berg #endif /* __iwl_fw_api_datapath_h__ */
157