18e99ea8dSJohannes Berg /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
28e99ea8dSJohannes Berg /*
3f7d6ef33SJohannes Berg  * Copyright (C) 2012-2014, 2018-2020 Intel Corporation
48e99ea8dSJohannes Berg  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
58e99ea8dSJohannes Berg  * Copyright (C) 2016-2017 Intel Deutschland GmbH
68e99ea8dSJohannes 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 	/**
35c48e93a6SJohannes Berg 	 * @RLC_CONFIG_CMD: &struct iwl_rlc_config_cmd
36c48e93a6SJohannes Berg 	 */
37c48e93a6SJohannes Berg 	RLC_CONFIG_CMD = 0x8,
38c48e93a6SJohannes Berg 
39c48e93a6SJohannes Berg 	/**
408edbfaa1SSara Sharon 	 * @RFH_QUEUE_CONFIG_CMD: &struct iwl_rfh_queue_config
418edbfaa1SSara Sharon 	 */
428edbfaa1SSara Sharon 	RFH_QUEUE_CONFIG_CMD = 0xD,
438edbfaa1SSara Sharon 
448edbfaa1SSara Sharon 	/**
45e4b89fceSAbhishek Naik 	 * @TLC_MNG_CONFIG_CMD: &struct iwl_tlc_config_cmd_v4
46110b32f0SGregory Greenman 	 */
47110b32f0SGregory Greenman 	TLC_MNG_CONFIG_CMD = 0xF,
48110b32f0SGregory Greenman 
49110b32f0SGregory Greenman 	/**
5098920961SShaul Triebitz 	 * @HE_AIR_SNIFFER_CONFIG_CMD: &struct iwl_he_monitor_cmd
5198920961SShaul Triebitz 	 */
5298920961SShaul Triebitz 	HE_AIR_SNIFFER_CONFIG_CMD = 0x13,
5398920961SShaul Triebitz 
5498920961SShaul Triebitz 	/**
555213e8a8SJohannes Berg 	 * @CHEST_COLLECTOR_FILTER_CONFIG_CMD: Configure the CSI
565213e8a8SJohannes Berg 	 *	matrix collection, uses &struct iwl_channel_estimation_cfg
575213e8a8SJohannes Berg 	 */
585213e8a8SJohannes Berg 	CHEST_COLLECTOR_FILTER_CONFIG_CMD = 0x14,
595213e8a8SJohannes Berg 
605213e8a8SJohannes Berg 	/**
6197f70c56SJohannes Berg 	 * @RX_BAID_ALLOCATION_CONFIG_CMD: Allocate/deallocate a BAID for an RX
6297f70c56SJohannes Berg 	 *	blockack session, uses &struct iwl_rx_baid_cfg_cmd for the
6397f70c56SJohannes Berg 	 *	command, and &struct iwl_rx_baid_cfg_resp as a response.
6497f70c56SJohannes Berg 	 */
6597f70c56SJohannes Berg 	RX_BAID_ALLOCATION_CONFIG_CMD = 0x16,
6697f70c56SJohannes Berg 
6797f70c56SJohannes Berg 	/**
68227f2597SJohannes Berg 	 * @SCD_QUEUE_CONFIG_CMD: new scheduler queue allocation/config/removal
69227f2597SJohannes Berg 	 *	command, uses &struct iwl_scd_queue_cfg_cmd and the response
70227f2597SJohannes Berg 	 *	is (same as before) &struct iwl_tx_queue_cfg_rsp.
71227f2597SJohannes Berg 	 */
72227f2597SJohannes Berg 	SCD_QUEUE_CONFIG_CMD = 0x17,
73227f2597SJohannes Berg 
74227f2597SJohannes Berg 	/**
75f7d6ef33SJohannes Berg 	 * @MONITOR_NOTIF: Datapath monitoring notification, using
76f7d6ef33SJohannes Berg 	 *	&struct iwl_datapath_monitor_notif
77f7d6ef33SJohannes Berg 	 */
78f7d6ef33SJohannes Berg 	MONITOR_NOTIF = 0xF4,
79f7d6ef33SJohannes Berg 
80f7d6ef33SJohannes Berg 	/**
81bf9dfedaSShaul Triebitz 	 * @RX_NO_DATA_NOTIF: &struct iwl_rx_no_data
82bf9dfedaSShaul Triebitz 	 */
83bf9dfedaSShaul Triebitz 	RX_NO_DATA_NOTIF = 0xF5,
84bf9dfedaSShaul Triebitz 
85bf9dfedaSShaul Triebitz 	/**
862a7ce54cSJohannes Berg 	 * @THERMAL_DUAL_CHAIN_DISABLE_REQ: firmware request for SMPS mode,
872a7ce54cSJohannes Berg 	 *	&struct iwl_thermal_dual_chain_request
882a7ce54cSJohannes Berg 	 */
892a7ce54cSJohannes Berg 	THERMAL_DUAL_CHAIN_REQUEST = 0xF6,
902a7ce54cSJohannes Berg 
912a7ce54cSJohannes Berg 	/**
9246d372afSGregory Greenman 	 * @TLC_MNG_UPDATE_NOTIF: &struct iwl_tlc_update_notif
9346d372afSGregory Greenman 	 */
9446d372afSGregory Greenman 	TLC_MNG_UPDATE_NOTIF = 0xF7,
9546d372afSGregory Greenman 
9646d372afSGregory Greenman 	/**
97d172a5efSJohannes Berg 	 * @STA_PM_NOTIF: &struct iwl_mvm_pm_state_notification
98d172a5efSJohannes Berg 	 */
99d172a5efSJohannes Berg 	STA_PM_NOTIF = 0xFD,
100d172a5efSJohannes Berg 
101d172a5efSJohannes Berg 	/**
102d172a5efSJohannes Berg 	 * @MU_GROUP_MGMT_NOTIF: &struct iwl_mu_group_mgmt_notif
103d172a5efSJohannes Berg 	 */
104d172a5efSJohannes Berg 	MU_GROUP_MGMT_NOTIF = 0xFE,
105d172a5efSJohannes Berg 
106d172a5efSJohannes Berg 	/**
107d172a5efSJohannes Berg 	 * @RX_QUEUES_NOTIFICATION: &struct iwl_rxq_sync_notification
108d172a5efSJohannes Berg 	 */
109d172a5efSJohannes Berg 	RX_QUEUES_NOTIFICATION = 0xFF,
110d172a5efSJohannes Berg };
111d172a5efSJohannes Berg 
112d172a5efSJohannes Berg /**
113d172a5efSJohannes Berg  * struct iwl_mu_group_mgmt_cmd - VHT MU-MIMO group configuration
114d172a5efSJohannes Berg  *
115d172a5efSJohannes Berg  * @reserved: reserved
116d172a5efSJohannes Berg  * @membership_status: a bitmap of MU groups
117d172a5efSJohannes Berg  * @user_position:the position of station in a group. If the station is in the
118d172a5efSJohannes Berg  *	group then bits (group * 2) is the position -1
119d172a5efSJohannes Berg  */
120d172a5efSJohannes Berg struct iwl_mu_group_mgmt_cmd {
121d172a5efSJohannes Berg 	__le32 reserved;
122d172a5efSJohannes Berg 	__le32 membership_status[2];
123d172a5efSJohannes Berg 	__le32 user_position[4];
124d172a5efSJohannes Berg } __packed; /* MU_GROUP_ID_MNG_TABLE_API_S_VER_1 */
125d172a5efSJohannes Berg 
126d172a5efSJohannes Berg /**
127d172a5efSJohannes Berg  * struct iwl_mu_group_mgmt_notif - VHT MU-MIMO group id notification
128d172a5efSJohannes Berg  *
129d172a5efSJohannes Berg  * @membership_status: a bitmap of MU groups
130d172a5efSJohannes Berg  * @user_position: the position of station in a group. If the station is in the
131d172a5efSJohannes Berg  *	group then bits (group * 2) is the position -1
132d172a5efSJohannes Berg  */
133d172a5efSJohannes Berg struct iwl_mu_group_mgmt_notif {
134d172a5efSJohannes Berg 	__le32 membership_status[2];
135d172a5efSJohannes Berg 	__le32 user_position[4];
136d172a5efSJohannes Berg } __packed; /* MU_GROUP_MNG_NTFY_API_S_VER_1 */
137d172a5efSJohannes Berg 
1385213e8a8SJohannes Berg enum iwl_channel_estimation_flags {
1395213e8a8SJohannes Berg 	IWL_CHANNEL_ESTIMATION_ENABLE	= BIT(0),
1405213e8a8SJohannes Berg 	IWL_CHANNEL_ESTIMATION_TIMER	= BIT(1),
1415213e8a8SJohannes Berg 	IWL_CHANNEL_ESTIMATION_COUNTER	= BIT(2),
1425213e8a8SJohannes Berg };
1435213e8a8SJohannes Berg 
1445213e8a8SJohannes Berg /**
1455213e8a8SJohannes Berg  * struct iwl_channel_estimation_cfg - channel estimation reporting config
1465213e8a8SJohannes Berg  */
1475213e8a8SJohannes Berg struct iwl_channel_estimation_cfg {
1485213e8a8SJohannes Berg 	/**
1495213e8a8SJohannes Berg 	 * @flags: flags, see &enum iwl_channel_estimation_flags
1505213e8a8SJohannes Berg 	 */
1515213e8a8SJohannes Berg 	__le32 flags;
1525213e8a8SJohannes Berg 	/**
1535213e8a8SJohannes Berg 	 * @timer: if enabled via flags, automatically disable after this many
1545213e8a8SJohannes Berg 	 *	microseconds
1555213e8a8SJohannes Berg 	 */
1565213e8a8SJohannes Berg 	__le32 timer;
1575213e8a8SJohannes Berg 	/**
1585213e8a8SJohannes Berg 	 * @count: if enabled via flags, automatically disable after this many
1595213e8a8SJohannes Berg 	 *	frames with channel estimation matrix were captured
1605213e8a8SJohannes Berg 	 */
1615213e8a8SJohannes Berg 	__le32 count;
1625213e8a8SJohannes Berg 	/**
1635213e8a8SJohannes Berg 	 * @rate_n_flags_mask: only try to record the channel estimation matrix
1645213e8a8SJohannes Berg 	 *	if the rate_n_flags value for the received frame (let's call
1655213e8a8SJohannes Berg 	 *	that rx_rnf) matches the mask/value given here like this:
1665213e8a8SJohannes Berg 	 *	(rx_rnf & rate_n_flags_mask) == rate_n_flags_val.
1675213e8a8SJohannes Berg 	 */
1685213e8a8SJohannes Berg 	__le32 rate_n_flags_mask;
1695213e8a8SJohannes Berg 	/**
1705213e8a8SJohannes Berg 	 * @rate_n_flags_val: see @rate_n_flags_mask
1715213e8a8SJohannes Berg 	 */
1725213e8a8SJohannes Berg 	__le32 rate_n_flags_val;
1735213e8a8SJohannes Berg 	/**
1745213e8a8SJohannes Berg 	 * @reserved: reserved (for alignment)
1755213e8a8SJohannes Berg 	 */
1765213e8a8SJohannes Berg 	__le32 reserved;
1775213e8a8SJohannes Berg 	/**
1785213e8a8SJohannes Berg 	 * @frame_types: bitmap of frame types to capture, the received frame's
1795213e8a8SJohannes Berg 	 *	subtype|type takes 6 bits in the frame and the corresponding bit
1805213e8a8SJohannes Berg 	 *	in this field must be set to 1 to capture channel estimation for
1815213e8a8SJohannes Berg 	 *	that frame type. Set to all-ones to enable capturing for all
1825213e8a8SJohannes Berg 	 *	frame types.
1835213e8a8SJohannes Berg 	 */
1845213e8a8SJohannes Berg 	__le64 frame_types;
1855213e8a8SJohannes Berg } __packed; /* CHEST_COLLECTOR_FILTER_CMD_API_S_VER_1 */
1865213e8a8SJohannes Berg 
187f7d6ef33SJohannes Berg enum iwl_datapath_monitor_notif_type {
188f7d6ef33SJohannes Berg 	IWL_DP_MON_NOTIF_TYPE_EXT_CCA,
189f7d6ef33SJohannes Berg };
190f7d6ef33SJohannes Berg 
191f7d6ef33SJohannes Berg struct iwl_datapath_monitor_notif {
192f7d6ef33SJohannes Berg 	__le32 type;
193f7d6ef33SJohannes Berg 	u8 mac_id;
194f7d6ef33SJohannes Berg 	u8 reserved[3];
195f7d6ef33SJohannes Berg } __packed; /* MONITOR_NTF_API_S_VER_1 */
196f7d6ef33SJohannes Berg 
1972a7ce54cSJohannes Berg /**
1982a7ce54cSJohannes Berg  * enum iwl_thermal_dual_chain_req_events - firmware SMPS request event
1992a7ce54cSJohannes Berg  * @THERMAL_DUAL_CHAIN_REQ_ENABLE: (re-)enable dual-chain operation
2002a7ce54cSJohannes Berg  *	(subject to other constraints)
2012a7ce54cSJohannes Berg  * @THERMAL_DUAL_CHAIN_REQ_DISABLE: disable dual-chain operation
2022a7ce54cSJohannes Berg  *	(static SMPS)
2032a7ce54cSJohannes Berg  */
2042a7ce54cSJohannes Berg enum iwl_thermal_dual_chain_req_events {
2052a7ce54cSJohannes Berg 	THERMAL_DUAL_CHAIN_REQ_ENABLE,
2062a7ce54cSJohannes Berg 	THERMAL_DUAL_CHAIN_REQ_DISABLE,
2072a7ce54cSJohannes Berg }; /* THERMAL_DUAL_CHAIN_DISABLE_STATE_API_E_VER_1 */
2082a7ce54cSJohannes Berg 
2092a7ce54cSJohannes Berg /**
2102a7ce54cSJohannes Berg  * struct iwl_thermal_dual_chain_request - SMPS request
2112a7ce54cSJohannes Berg  * @event: the type of request, see &enum iwl_thermal_dual_chain_req_events
2122a7ce54cSJohannes Berg  */
2132a7ce54cSJohannes Berg struct iwl_thermal_dual_chain_request {
2142a7ce54cSJohannes Berg 	__le32 event;
2152a7ce54cSJohannes Berg } __packed; /* THERMAL_DUAL_CHAIN_DISABLE_REQ_NTFY_API_S_VER_1 */
2162a7ce54cSJohannes Berg 
217c48e93a6SJohannes Berg enum iwl_rlc_chain_info {
218c48e93a6SJohannes Berg 	IWL_RLC_CHAIN_INFO_DRIVER_FORCE		= BIT(0),
219c48e93a6SJohannes Berg 	IWL_RLC_CHAIN_INFO_VALID		= 0x000e,
220c48e93a6SJohannes Berg 	IWL_RLC_CHAIN_INFO_FORCE		= 0x0070,
221c48e93a6SJohannes Berg 	IWL_RLC_CHAIN_INFO_FORCE_MIMO		= 0x0380,
222c48e93a6SJohannes Berg 	IWL_RLC_CHAIN_INFO_COUNT		= 0x0c00,
223c48e93a6SJohannes Berg 	IWL_RLC_CHAIN_INFO_MIMO_COUNT		= 0x3000,
224c48e93a6SJohannes Berg };
225c48e93a6SJohannes Berg 
226c48e93a6SJohannes Berg /**
227c48e93a6SJohannes Berg  * struct iwl_rlc_properties - RLC properties
228c48e93a6SJohannes Berg  * @rx_chain_info: RX chain info, &enum iwl_rlc_chain_info
229c48e93a6SJohannes Berg  * @reserved: reserved
230c48e93a6SJohannes Berg  */
231c48e93a6SJohannes Berg struct iwl_rlc_properties {
232c48e93a6SJohannes Berg 	__le32 rx_chain_info;
233c48e93a6SJohannes Berg 	__le32 reserved;
234c48e93a6SJohannes Berg } __packed; /* RLC_PROPERTIES_S_VER_1 */
235c48e93a6SJohannes Berg 
236c48e93a6SJohannes Berg enum iwl_sad_mode {
237c48e93a6SJohannes Berg 	IWL_SAD_MODE_ENABLED		= BIT(0),
238c48e93a6SJohannes Berg 	IWL_SAD_MODE_DEFAULT_ANT_MSK	= 0x6,
239c48e93a6SJohannes Berg 	IWL_SAD_MODE_DEFAULT_ANT_FW	= 0x0,
240c48e93a6SJohannes Berg 	IWL_SAD_MODE_DEFAULT_ANT_A	= 0x2,
241c48e93a6SJohannes Berg 	IWL_SAD_MODE_DEFAULT_ANT_B	= 0x4,
242c48e93a6SJohannes Berg };
243c48e93a6SJohannes Berg 
244c48e93a6SJohannes Berg /**
245c48e93a6SJohannes Berg  * struct iwl_sad_properties - SAD properties
246c48e93a6SJohannes Berg  * @chain_a_sad_mode: chain A SAD mode, &enum iwl_sad_mode
247c48e93a6SJohannes Berg  * @chain_b_sad_mode: chain B SAD mode, &enum iwl_sad_mode
248c48e93a6SJohannes Berg  * @mac_id: MAC index
249c48e93a6SJohannes Berg  * @reserved: reserved
250c48e93a6SJohannes Berg  */
251c48e93a6SJohannes Berg struct iwl_sad_properties {
252c48e93a6SJohannes Berg 	__le32 chain_a_sad_mode;
253c48e93a6SJohannes Berg 	__le32 chain_b_sad_mode;
254c48e93a6SJohannes Berg 	__le32 mac_id;
255c48e93a6SJohannes Berg 	__le32 reserved;
256c48e93a6SJohannes Berg } __packed;
257c48e93a6SJohannes Berg 
258c48e93a6SJohannes Berg /**
259c48e93a6SJohannes Berg  * struct iwl_rlc_config_cmd - RLC configuration
260c48e93a6SJohannes Berg  * @phy_id: PHY index
261c48e93a6SJohannes Berg  * @rlc: RLC properties, &struct iwl_rlc_properties
262c48e93a6SJohannes Berg  * @sad: SAD (single antenna diversity) options, &struct iwl_sad_properties
263c48e93a6SJohannes Berg  * @flags: flags, &enum iwl_rlc_flags
264c48e93a6SJohannes Berg  * @reserved: reserved
265c48e93a6SJohannes Berg  */
266c48e93a6SJohannes Berg struct iwl_rlc_config_cmd {
267c48e93a6SJohannes Berg 	__le32 phy_id;
268c48e93a6SJohannes Berg 	struct iwl_rlc_properties rlc;
269c48e93a6SJohannes Berg 	struct iwl_sad_properties sad;
270c48e93a6SJohannes Berg 	u8 flags;
271c48e93a6SJohannes Berg 	u8 reserved[3];
272c48e93a6SJohannes Berg } __packed; /* RLC_CONFIG_CMD_API_S_VER_2 */
273c48e93a6SJohannes Berg 
274ded5ded3SEmmanuel Grumbach #define IWL_MAX_BAID_OLD	16 /* MAX_IMMEDIATE_BA_API_D_VER_2 */
275ded5ded3SEmmanuel Grumbach #define IWL_MAX_BAID		32 /* MAX_IMMEDIATE_BA_API_D_VER_3 */
276ded5ded3SEmmanuel Grumbach 
27797f70c56SJohannes Berg /**
27897f70c56SJohannes Berg  * enum iwl_rx_baid_action - BAID allocation/config action
27997f70c56SJohannes Berg  * @IWL_RX_BAID_ACTION_ADD: add a new BAID session
28097f70c56SJohannes Berg  * @IWL_RX_BAID_ACTION_MODIFY: modify the BAID session
28197f70c56SJohannes Berg  * @IWL_RX_BAID_ACTION_REMOVE: remove the BAID session
28297f70c56SJohannes Berg  */
28397f70c56SJohannes Berg enum iwl_rx_baid_action {
28497f70c56SJohannes Berg 	IWL_RX_BAID_ACTION_ADD,
28597f70c56SJohannes Berg 	IWL_RX_BAID_ACTION_MODIFY,
28697f70c56SJohannes Berg 	IWL_RX_BAID_ACTION_REMOVE,
28797f70c56SJohannes Berg }; /*  RX_BAID_ALLOCATION_ACTION_E_VER_1 */
28897f70c56SJohannes Berg 
28997f70c56SJohannes Berg /**
29097f70c56SJohannes Berg  * struct iwl_rx_baid_cfg_cmd_alloc - BAID allocation data
29197f70c56SJohannes Berg  * @sta_id_mask: station ID mask
29297f70c56SJohannes Berg  * @tid: the TID for this session
29397f70c56SJohannes Berg  * @reserved: reserved
29497f70c56SJohannes Berg  * @ssn: the starting sequence number
29597f70c56SJohannes Berg  * @win_size: RX BA session window size
29697f70c56SJohannes Berg  */
29797f70c56SJohannes Berg struct iwl_rx_baid_cfg_cmd_alloc {
29897f70c56SJohannes Berg 	__le32 sta_id_mask;
29997f70c56SJohannes Berg 	u8 tid;
30097f70c56SJohannes Berg 	u8 reserved[3];
30197f70c56SJohannes Berg 	__le16 ssn;
30297f70c56SJohannes Berg 	__le16 win_size;
30397f70c56SJohannes Berg } __packed; /* RX_BAID_ALLOCATION_ADD_CMD_API_S_VER_1 */
30497f70c56SJohannes Berg 
30597f70c56SJohannes Berg /**
30697f70c56SJohannes Berg  * struct iwl_rx_baid_cfg_cmd_modify - BAID modification data
307*26de4c8bSJohannes Berg  * @old_sta_id_mask: old station ID mask
308*26de4c8bSJohannes Berg  * @new_sta_id_mask: new station ID mask
309*26de4c8bSJohannes Berg  * @tid: TID of the BAID
31097f70c56SJohannes Berg  */
31197f70c56SJohannes Berg struct iwl_rx_baid_cfg_cmd_modify {
312*26de4c8bSJohannes Berg 	__le32 old_sta_id_mask;
313*26de4c8bSJohannes Berg 	__le32 new_sta_id_mask;
314*26de4c8bSJohannes Berg 	__le32 tid;
315*26de4c8bSJohannes Berg } __packed; /* RX_BAID_ALLOCATION_MODIFY_CMD_API_S_VER_2 */
316*26de4c8bSJohannes Berg 
317*26de4c8bSJohannes Berg /**
318*26de4c8bSJohannes Berg  * struct iwl_rx_baid_cfg_cmd_remove_v1 - BAID removal data
319*26de4c8bSJohannes Berg  * @baid: the BAID to remove
320*26de4c8bSJohannes Berg  */
321*26de4c8bSJohannes Berg struct iwl_rx_baid_cfg_cmd_remove_v1 {
32297f70c56SJohannes Berg 	__le32 baid;
323*26de4c8bSJohannes Berg } __packed; /* RX_BAID_ALLOCATION_REMOVE_CMD_API_S_VER_1 */
32497f70c56SJohannes Berg 
32597f70c56SJohannes Berg /**
32697f70c56SJohannes Berg  * struct iwl_rx_baid_cfg_cmd_remove - BAID removal data
327*26de4c8bSJohannes Berg  * @sta_id_mask: the station mask of the BAID to remove
328*26de4c8bSJohannes Berg  * @tid: the TID of the BAID to remove
32997f70c56SJohannes Berg  */
33097f70c56SJohannes Berg struct iwl_rx_baid_cfg_cmd_remove {
331*26de4c8bSJohannes Berg 	__le32 sta_id_mask;
332*26de4c8bSJohannes Berg 	__le32 tid;
333*26de4c8bSJohannes Berg } __packed; /* RX_BAID_ALLOCATION_REMOVE_CMD_API_S_VER_2 */
33497f70c56SJohannes Berg 
33597f70c56SJohannes Berg /**
33697f70c56SJohannes Berg  * struct iwl_rx_baid_cfg_cmd - BAID allocation/config command
33797f70c56SJohannes Berg  * @action: the action, from &enum iwl_rx_baid_action
33897f70c56SJohannes Berg  */
33997f70c56SJohannes Berg struct iwl_rx_baid_cfg_cmd {
34097f70c56SJohannes Berg 	__le32 action;
34197f70c56SJohannes Berg 	union {
34297f70c56SJohannes Berg 		struct iwl_rx_baid_cfg_cmd_alloc alloc;
34397f70c56SJohannes Berg 		struct iwl_rx_baid_cfg_cmd_modify modify;
344*26de4c8bSJohannes Berg 		struct iwl_rx_baid_cfg_cmd_remove_v1 remove_v1;
34597f70c56SJohannes Berg 		struct iwl_rx_baid_cfg_cmd_remove remove;
346*26de4c8bSJohannes Berg 	}; /* RX_BAID_ALLOCATION_OPERATION_API_U_VER_2 */
347*26de4c8bSJohannes Berg } __packed; /* RX_BAID_ALLOCATION_CONFIG_CMD_API_S_VER_2 */
34897f70c56SJohannes Berg 
34997f70c56SJohannes Berg /**
35097f70c56SJohannes Berg  * struct iwl_rx_baid_cfg_resp - BAID allocation response
35197f70c56SJohannes Berg  * @baid: the allocated BAID
35297f70c56SJohannes Berg  */
35397f70c56SJohannes Berg struct iwl_rx_baid_cfg_resp {
35497f70c56SJohannes Berg 	__le32 baid;
35597f70c56SJohannes Berg }; /* RX_BAID_ALLOCATION_RESPONSE_API_S_VER_1 */
35697f70c56SJohannes Berg 
357227f2597SJohannes Berg /**
358227f2597SJohannes Berg  * enum iwl_scd_queue_cfg_operation - scheduler queue operation
359227f2597SJohannes Berg  * @IWL_SCD_QUEUE_ADD: allocate a new queue
360227f2597SJohannes Berg  * @IWL_SCD_QUEUE_REMOVE: remove a queue
361227f2597SJohannes Berg  * @IWL_SCD_QUEUE_MODIFY: modify a queue
362227f2597SJohannes Berg  */
363227f2597SJohannes Berg enum iwl_scd_queue_cfg_operation {
364227f2597SJohannes Berg 	IWL_SCD_QUEUE_ADD = 0,
365227f2597SJohannes Berg 	IWL_SCD_QUEUE_REMOVE = 1,
366227f2597SJohannes Berg 	IWL_SCD_QUEUE_MODIFY = 2,
367227f2597SJohannes Berg };
368227f2597SJohannes Berg 
369227f2597SJohannes Berg /**
370227f2597SJohannes Berg  * struct iwl_scd_queue_cfg_cmd - scheduler queue allocation command
371227f2597SJohannes Berg  * @operation: the operation, see &enum iwl_scd_queue_cfg_operation
372227f2597SJohannes Berg  * @u.add.sta_mask: station mask
373227f2597SJohannes Berg  * @u.add.tid: TID
374227f2597SJohannes Berg  * @u.add.reserved: reserved
375227f2597SJohannes Berg  * @u.add.flags: flags from &enum iwl_tx_queue_cfg_actions, except
376227f2597SJohannes Berg  *	%TX_QUEUE_CFG_ENABLE_QUEUE is not valid
377227f2597SJohannes Berg  * @u.add.cb_size: size code
378227f2597SJohannes Berg  * @u.add.bc_dram_addr: byte-count table IOVA
379227f2597SJohannes Berg  * @u.add.tfdq_dram_addr: TFD queue IOVA
380227f2597SJohannes Berg  * @u.remove.queue: queue ID for removal
381227f2597SJohannes Berg  * @u.modify.sta_mask: new station mask for modify
382227f2597SJohannes Berg  * @u.modify.queue: queue ID to modify
383227f2597SJohannes Berg  */
384227f2597SJohannes Berg struct iwl_scd_queue_cfg_cmd {
385227f2597SJohannes Berg 	__le32 operation;
386227f2597SJohannes Berg 	union {
387227f2597SJohannes Berg 		struct {
388227f2597SJohannes Berg 			__le32 sta_mask;
389227f2597SJohannes Berg 			u8 tid;
390227f2597SJohannes Berg 			u8 reserved[3];
391227f2597SJohannes Berg 			__le32 flags;
392227f2597SJohannes Berg 			__le32 cb_size;
393227f2597SJohannes Berg 			__le64 bc_dram_addr;
394227f2597SJohannes Berg 			__le64 tfdq_dram_addr;
395227f2597SJohannes Berg 		} __packed add; /* TX_QUEUE_CFG_CMD_ADD_API_S_VER_1 */
396227f2597SJohannes Berg 		struct {
397227f2597SJohannes Berg 			__le32 queue;
398227f2597SJohannes Berg 		} __packed remove; /* TX_QUEUE_CFG_CMD_REMOVE_API_S_VER_1 */
399227f2597SJohannes Berg 		struct {
400227f2597SJohannes Berg 			__le32 sta_mask;
401227f2597SJohannes Berg 			__le32 queue;
402227f2597SJohannes Berg 		} __packed modify; /* TX_QUEUE_CFG_CMD_MODIFY_API_S_VER_1 */
403227f2597SJohannes Berg 	} __packed u; /* TX_QUEUE_CFG_CMD_OPERATION_API_U_VER_1 */
404227f2597SJohannes Berg } __packed; /* TX_QUEUE_CFG_CMD_API_S_VER_3 */
405227f2597SJohannes Berg 
406d172a5efSJohannes Berg #endif /* __iwl_fw_api_datapath_h__ */
407