brintos

brintos / linux-shallow public Read only

0
0
Text · 20.2 KiB · 2ab38ea Raw
692 lines · c
1/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */2/*3 * Copyright (C) 2024 Intel Corporation4 * Copyright (C) 2012-2014, 2018-2022 Intel Corporation5 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH6 * Copyright (C) 2016-2017 Intel Deutschland GmbH7 */8#ifndef __iwl_fw_api_datapath_h__9#define __iwl_fw_api_datapath_h__10 11/**12 * enum iwl_data_path_subcmd_ids - data path group commands13 */14enum iwl_data_path_subcmd_ids {15	/**16	 * @DQA_ENABLE_CMD: &struct iwl_dqa_enable_cmd17	 */18	DQA_ENABLE_CMD = 0x0,19 20	/**21	 * @UPDATE_MU_GROUPS_CMD: &struct iwl_mu_group_mgmt_cmd22	 */23	UPDATE_MU_GROUPS_CMD = 0x1,24 25	/**26	 * @TRIGGER_RX_QUEUES_NOTIF_CMD: &struct iwl_rxq_sync_cmd27	 */28	TRIGGER_RX_QUEUES_NOTIF_CMD = 0x2,29 30	/**31	 * @WNM_PLATFORM_PTM_REQUEST_CMD: &struct iwl_time_sync_cfg_cmd32	 */33	WNM_PLATFORM_PTM_REQUEST_CMD = 0x3,34 35	/**36	 * @WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD:37	 *	&struct iwl_time_sync_cfg_cmd38	 */39	WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD = 0x4,40 41	/**42	 * @STA_HE_CTXT_CMD: &struct iwl_he_sta_context_cmd_v1,43	 *	&struct iwl_he_sta_context_cmd_v2 or44	 *	&struct iwl_he_sta_context_cmd_v345	 */46	STA_HE_CTXT_CMD = 0x7,47 48	/**49	 * @RLC_CONFIG_CMD: &struct iwl_rlc_config_cmd50	 */51	RLC_CONFIG_CMD = 0x8,52 53	/**54	 * @RFH_QUEUE_CONFIG_CMD: &struct iwl_rfh_queue_config55	 */56	RFH_QUEUE_CONFIG_CMD = 0xD,57 58	/**59	 * @TLC_MNG_CONFIG_CMD: &struct iwl_tlc_config_cmd_v460	 */61	TLC_MNG_CONFIG_CMD = 0xF,62 63	/**64	 * @HE_AIR_SNIFFER_CONFIG_CMD: &struct iwl_he_monitor_cmd65	 */66	HE_AIR_SNIFFER_CONFIG_CMD = 0x13,67 68	/**69	 * @CHEST_COLLECTOR_FILTER_CONFIG_CMD: Configure the CSI70	 *	matrix collection, uses &struct iwl_channel_estimation_cfg71	 */72	CHEST_COLLECTOR_FILTER_CONFIG_CMD = 0x14,73 74	/**75	 * @RX_BAID_ALLOCATION_CONFIG_CMD: Allocate/deallocate a BAID for an RX76	 *	blockack session, uses &struct iwl_rx_baid_cfg_cmd for the77	 *	command, and &struct iwl_rx_baid_cfg_resp as a response.78	 */79	RX_BAID_ALLOCATION_CONFIG_CMD = 0x16,80 81	/**82	 * @SCD_QUEUE_CONFIG_CMD: new scheduler queue allocation/config/removal83	 *	command, uses &struct iwl_scd_queue_cfg_cmd and the response84	 *	is (same as before) &struct iwl_tx_queue_cfg_rsp.85	 */86	SCD_QUEUE_CONFIG_CMD = 0x17,87 88	/**89	 * @SEC_KEY_CMD: security key command, uses &struct iwl_sec_key_cmd90	 */91	SEC_KEY_CMD = 0x18,92 93	/**94	 * @ESR_MODE_NOTIF: notification to recommend/force a wanted esr mode,95	 *	uses &struct iwl_mvm_esr_mode_notif96	 */97	ESR_MODE_NOTIF = 0xF3,98 99	/**100	 * @MONITOR_NOTIF: Datapath monitoring notification, using101	 *	&struct iwl_datapath_monitor_notif102	 */103	MONITOR_NOTIF = 0xF4,104 105	/**106	 * @RX_NO_DATA_NOTIF: &struct iwl_rx_no_data or &struct iwl_rx_no_data_ver_3107	 */108	RX_NO_DATA_NOTIF = 0xF5,109 110	/**111	 * @THERMAL_DUAL_CHAIN_REQUEST: firmware request for SMPS mode,112	 *	&struct iwl_thermal_dual_chain_request113	 */114	THERMAL_DUAL_CHAIN_REQUEST = 0xF6,115 116	/**117	 * @TLC_MNG_UPDATE_NOTIF: &struct iwl_tlc_update_notif118	 */119	TLC_MNG_UPDATE_NOTIF = 0xF7,120 121	/**122	 * @STA_PM_NOTIF: &struct iwl_mvm_pm_state_notification123	 */124	STA_PM_NOTIF = 0xFD,125 126	/**127	 * @MU_GROUP_MGMT_NOTIF: &struct iwl_mu_group_mgmt_notif128	 */129	MU_GROUP_MGMT_NOTIF = 0xFE,130 131	/**132	 * @RX_QUEUES_NOTIFICATION: &struct iwl_rxq_sync_notification133	 */134	RX_QUEUES_NOTIFICATION = 0xFF,135};136 137/**138 * struct iwl_mu_group_mgmt_cmd - VHT MU-MIMO group configuration139 *140 * @reserved: reserved141 * @membership_status: a bitmap of MU groups142 * @user_position:the position of station in a group. If the station is in the143 *	group then bits (group * 2) is the position -1144 */145struct iwl_mu_group_mgmt_cmd {146	__le32 reserved;147	__le32 membership_status[2];148	__le32 user_position[4];149} __packed; /* MU_GROUP_ID_MNG_TABLE_API_S_VER_1 */150 151/**152 * struct iwl_mu_group_mgmt_notif - VHT MU-MIMO group id notification153 *154 * @membership_status: a bitmap of MU groups155 * @user_position: the position of station in a group. If the station is in the156 *	group then bits (group * 2) is the position -1157 */158struct iwl_mu_group_mgmt_notif {159	__le32 membership_status[2];160	__le32 user_position[4];161} __packed; /* MU_GROUP_MNG_NTFY_API_S_VER_1 */162 163enum iwl_channel_estimation_flags {164	IWL_CHANNEL_ESTIMATION_ENABLE	= BIT(0),165	IWL_CHANNEL_ESTIMATION_TIMER	= BIT(1),166	IWL_CHANNEL_ESTIMATION_COUNTER	= BIT(2),167};168 169enum iwl_time_sync_protocol_type {170	IWL_TIME_SYNC_PROTOCOL_TM	= BIT(0),171	IWL_TIME_SYNC_PROTOCOL_FTM	= BIT(1),172}; /* WNM_TIMING_ENABLED_PROTOCOL_API_E_VER_1 */173 174/**175 * struct iwl_time_sync_cfg_cmd - TM/FTM time sync measurement configuration176 *177 * @protocols: The type of frames to raise notifications for. A bitmap178 *	of @iwl_time_sync_protocol_type179 * @peer_addr: peer address with which TM/FTM measurements are required180 * @reserved: for alignment181 */182struct iwl_time_sync_cfg_cmd {183	__le32 protocols;184	u8 peer_addr[ETH_ALEN];185	u8 reserved[2];186} __packed; /* WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD_API_S_VER_1 */187 188/**189 * enum iwl_synced_time_operation - PTM request options190 *191 * @IWL_SYNCED_TIME_OPERATION_READ_ARTB: read only the ARTB time192 * @IWL_SYNCED_TIME_OPERATION_READ_GP2: read only the GP2 time193 * @IWL_SYNCED_TIME_OPERATION_READ_BOTH: latch the ARTB and GP2 clocks and194 *	provide timestamps from both clocks for the same time point195 */196enum iwl_synced_time_operation {197	IWL_SYNCED_TIME_OPERATION_READ_ARTB = 1,198	IWL_SYNCED_TIME_OPERATION_READ_GP2,199	IWL_SYNCED_TIME_OPERATION_READ_BOTH,200};201 202/**203 * struct iwl_synced_time_cmd - request synced GP2/ARTB timestamps204 *205 * @operation: one of &enum iwl_synced_time_operation206 */207struct iwl_synced_time_cmd {208	__le32 operation;209} __packed; /* WNM_80211V_TIMING_CMD_API_S_VER_1 */210 211/**212 * struct iwl_synced_time_rsp - response to iwl_synced_time_cmd213 *214 * @operation: one of &enum iwl_synced_time_operation215 * @platform_timestamp_hi: high DWORD of the ARTB clock timestamp in nanoseconds216 * @platform_timestamp_lo: low DWORD of the ARTB clock timestamp in nanoseconds217 * @gp2_timestamp_hi: high DWORD of the GP2 clock timestamp in 10's of218 *	nanoseconds219 * @gp2_timestamp_lo: low DWORD of the GP2 clock timestamp in 10's of220 *	nanoseconds221 */222struct iwl_synced_time_rsp {223	__le32 operation;224	__le32 platform_timestamp_hi;225	__le32 platform_timestamp_lo;226	__le32 gp2_timestamp_hi;227	__le32 gp2_timestamp_lo;228} __packed; /* WNM_80211V_TIMING_RSP_API_S_VER_1 */229 230/* PTP_CTX_MAX_DATA_SIZE_IN_API_D_VER_1 */231#define PTP_CTX_MAX_DATA_SIZE   128232 233/**234 * struct iwl_time_msmt_ptp_ctx - Vendor specific element235 * to allow a space for flexibility for the userspace App236 *237 * @ftm: FTM specific vendor element238 * @ftm.element_id: element id of vendor specific ie239 * @ftm.length: length of vendor specific ie240 * @ftm.reserved: for alignment241 * @ftm.data: vendor specific data blob242 * @tm: TM specific vendor element243 * @tm.element_id: element id of vendor specific ie244 * @tm.length: length of vendor specific ie245 * @tm.data: vendor specific data blob246 */247struct iwl_time_msmt_ptp_ctx {248	/* Differentiate between FTM and TM specific Vendor elements */249	union {250		struct {251			u8 element_id;252			u8 length;253			__le16 reserved;254			u8 data[PTP_CTX_MAX_DATA_SIZE];255		} ftm;256		struct {257			u8 element_id;258			u8 length;259			u8 data[PTP_CTX_MAX_DATA_SIZE];260		} tm;261	};262} __packed /* PTP_CTX_VER_1 */;263 264/**265 * struct iwl_time_msmt_notify - Time Sync measurement notification266 * for TM/FTM, along with additional meta data.267 *268 * @peer_addr: peer address269 * @reserved: for alignment270 * @dialog_token: measurement flow dialog token number271 * @followup_dialog_token: Measurement flow previous dialog token number272 * @t1_hi: high dword of t1-time of the Tx'ed action frame departure on273 *	sender side in units of 10 nano seconds274 * @t1_lo: low dword of t1-time of the Tx'ed action frame departure on275 *	sender side in units of 10 nano seconds276 * @t1_max_err: maximum t1-time error in units of 10 nano seconds277 * @t4_hi: high dword of t4-time of the Rx'ed action frame's Ack arrival on278 *	sender side in units of 10 nano seconds279 * @t4_lo: low dword of t4-time of the Rx'ed action frame's Ack arrival on280 *	sender side in units of 10 nano seconds281 * @t4_max_err: maximum t4-time error in units of 10 nano seconds282 * @t2_hi: high dword of t2-time of the Rx'ed action frame arrival on283 *	receiver side in units of 10 nano seconds284 * @t2_lo: low dword of t2-time of the Rx'ed action frame arrival on285 *	receiver side in units of 10 nano seconds286 * @t2_max_err: maximum t2-time error in units of 10 nano seconds287 * @t3_hi: high dword of t3-time of the Tx'ed action frame's Ack departure on288 *	receiver side in units of 10 nano seconds289 * @t3_lo: low dword of t3-time of the Tx'ed action frame's Ack departure on290 *	receiver side in units of 10 nano seconds291 * @t3_max_err: maximum t3-time error in units of 10 nano seconds292 * @ptp: vendor specific information element293 */294struct iwl_time_msmt_notify {295	u8 peer_addr[ETH_ALEN];296	u8 reserved[2];297	__le32 dialog_token;298	__le32 followup_dialog_token;299	__le32 t1_hi;300	__le32 t1_lo;301	__le32 t1_max_err;302	__le32 t4_hi;303	__le32 t4_lo;304	__le32 t4_max_err;305	__le32 t2_hi;306	__le32 t2_lo;307	__le32 t2_max_err;308	__le32 t3_hi;309	__le32 t3_lo;310	__le32 t3_max_err;311	struct iwl_time_msmt_ptp_ctx ptp;312} __packed; /* WNM_80211V_TIMING_MEASUREMENT_NTFY_API_S_VER_1 */313 314/**315 * struct iwl_time_msmt_cfm_notify - Time Sync measurement confirmation316 * notification for TM/FTM. Sent on receipt of 802.11 Ack from peer for the317 * Tx'ed TM/FTM measurement action frame.318 *319 * @peer_addr: peer address320 * @reserved: for alignment321 * @dialog_token: measurement flow dialog token number322 * @t1_hi: high dword of t1-time of the Tx'ed action frame departure on323 *	sender side in units of 10 nano seconds324 * @t1_lo: low dword of t1-time of the Tx'ed action frame departure on325 *	sender side in units of 10 nano seconds326 * @t1_max_err: maximum t1-time error in units of 10 nano seconds327 * @t4_hi: high dword of t4-time of the Rx'ed action frame's Ack arrival on328 *	sender side in units of 10 nano seconds329 * @t4_lo: low dword of t4-time of the Rx'ed action frame's Ack arrival on330 *	sender side in units of 10 nano seconds331 * @t4_max_err: maximum t4-time error in units of 10 nano seconds332 */333struct iwl_time_msmt_cfm_notify {334	u8 peer_addr[ETH_ALEN];335	u8 reserved[2];336	__le32 dialog_token;337	__le32 t1_hi;338	__le32 t1_lo;339	__le32 t1_max_err;340	__le32 t4_hi;341	__le32 t4_lo;342	__le32 t4_max_err;343} __packed; /* WNM_80211V_TIMING_MEASUREMENT_CONFIRM_NTFY_API_S_VER_1 */344 345/**346 * struct iwl_channel_estimation_cfg - channel estimation reporting config347 */348struct iwl_channel_estimation_cfg {349	/**350	 * @flags: flags, see &enum iwl_channel_estimation_flags351	 */352	__le32 flags;353	/**354	 * @timer: if enabled via flags, automatically disable after this many355	 *	microseconds356	 */357	__le32 timer;358	/**359	 * @count: if enabled via flags, automatically disable after this many360	 *	frames with channel estimation matrix were captured361	 */362	__le32 count;363	/**364	 * @rate_n_flags_mask: only try to record the channel estimation matrix365	 *	if the rate_n_flags value for the received frame (let's call366	 *	that rx_rnf) matches the mask/value given here like this:367	 *	(rx_rnf & rate_n_flags_mask) == rate_n_flags_val.368	 */369	__le32 rate_n_flags_mask;370	/**371	 * @rate_n_flags_val: see @rate_n_flags_mask372	 */373	__le32 rate_n_flags_val;374	/**375	 * @reserved: reserved (for alignment)376	 */377	__le32 reserved;378	/**379	 * @frame_types: bitmap of frame types to capture, the received frame's380	 *	subtype|type takes 6 bits in the frame and the corresponding bit381	 *	in this field must be set to 1 to capture channel estimation for382	 *	that frame type. Set to all-ones to enable capturing for all383	 *	frame types.384	 */385	__le64 frame_types;386} __packed; /* CHEST_COLLECTOR_FILTER_CMD_API_S_VER_1 */387 388enum iwl_datapath_monitor_notif_type {389	IWL_DP_MON_NOTIF_TYPE_EXT_CCA,390};391 392struct iwl_datapath_monitor_notif {393	__le32 type;394	u8 mac_id;395	u8 reserved[3];396} __packed; /* MONITOR_NTF_API_S_VER_1 */397 398/**399 * enum iwl_thermal_dual_chain_req_events - firmware SMPS request event400 * @THERMAL_DUAL_CHAIN_REQ_ENABLE: (re-)enable dual-chain operation401 *	(subject to other constraints)402 * @THERMAL_DUAL_CHAIN_REQ_DISABLE: disable dual-chain operation403 *	(static SMPS)404 */405enum iwl_thermal_dual_chain_req_events {406	THERMAL_DUAL_CHAIN_REQ_ENABLE,407	THERMAL_DUAL_CHAIN_REQ_DISABLE,408}; /* THERMAL_DUAL_CHAIN_DISABLE_STATE_API_E_VER_1 */409 410/**411 * struct iwl_thermal_dual_chain_request - SMPS request412 * @event: the type of request, see &enum iwl_thermal_dual_chain_req_events413 */414struct iwl_thermal_dual_chain_request {415	__le32 event;416} __packed; /* THERMAL_DUAL_CHAIN_DISABLE_REQ_NTFY_API_S_VER_1 */417 418enum iwl_rlc_chain_info {419	IWL_RLC_CHAIN_INFO_DRIVER_FORCE		= BIT(0),420	IWL_RLC_CHAIN_INFO_VALID		= 0x000e,421	IWL_RLC_CHAIN_INFO_FORCE		= 0x0070,422	IWL_RLC_CHAIN_INFO_FORCE_MIMO		= 0x0380,423	IWL_RLC_CHAIN_INFO_COUNT		= 0x0c00,424	IWL_RLC_CHAIN_INFO_MIMO_COUNT		= 0x3000,425};426 427/**428 * struct iwl_rlc_properties - RLC properties429 * @rx_chain_info: RX chain info, &enum iwl_rlc_chain_info430 * @reserved: reserved431 */432struct iwl_rlc_properties {433	__le32 rx_chain_info;434	__le32 reserved;435} __packed; /* RLC_PROPERTIES_S_VER_1 */436 437enum iwl_sad_mode {438	IWL_SAD_MODE_ENABLED		= BIT(0),439	IWL_SAD_MODE_DEFAULT_ANT_MSK	= 0x6,440	IWL_SAD_MODE_DEFAULT_ANT_FW	= 0x0,441	IWL_SAD_MODE_DEFAULT_ANT_A	= 0x2,442	IWL_SAD_MODE_DEFAULT_ANT_B	= 0x4,443};444 445/**446 * struct iwl_sad_properties - SAD properties447 * @chain_a_sad_mode: chain A SAD mode, &enum iwl_sad_mode448 * @chain_b_sad_mode: chain B SAD mode, &enum iwl_sad_mode449 * @mac_id: MAC index450 * @reserved: reserved451 */452struct iwl_sad_properties {453	__le32 chain_a_sad_mode;454	__le32 chain_b_sad_mode;455	__le32 mac_id;456	__le32 reserved;457} __packed;458 459/**460 * struct iwl_rlc_config_cmd - RLC configuration461 * @phy_id: PHY index462 * @rlc: RLC properties, &struct iwl_rlc_properties463 * @sad: SAD (single antenna diversity) options, &struct iwl_sad_properties464 * @flags: flags (unused)465 * @reserved: reserved466 */467struct iwl_rlc_config_cmd {468	__le32 phy_id;469	struct iwl_rlc_properties rlc;470	struct iwl_sad_properties sad;471	u8 flags;472	u8 reserved[3];473} __packed; /* RLC_CONFIG_CMD_API_S_VER_2 */474 475#define IWL_MAX_BAID_OLD	16 /* MAX_IMMEDIATE_BA_API_D_VER_2 */476#define IWL_MAX_BAID		32 /* MAX_IMMEDIATE_BA_API_D_VER_3 */477 478/**479 * enum iwl_rx_baid_action - BAID allocation/config action480 * @IWL_RX_BAID_ACTION_ADD: add a new BAID session481 * @IWL_RX_BAID_ACTION_MODIFY: modify the BAID session482 * @IWL_RX_BAID_ACTION_REMOVE: remove the BAID session483 */484enum iwl_rx_baid_action {485	IWL_RX_BAID_ACTION_ADD,486	IWL_RX_BAID_ACTION_MODIFY,487	IWL_RX_BAID_ACTION_REMOVE,488}; /*  RX_BAID_ALLOCATION_ACTION_E_VER_1 */489 490/**491 * struct iwl_rx_baid_cfg_cmd_alloc - BAID allocation data492 * @sta_id_mask: station ID mask493 * @tid: the TID for this session494 * @reserved: reserved495 * @ssn: the starting sequence number496 * @win_size: RX BA session window size497 */498struct iwl_rx_baid_cfg_cmd_alloc {499	__le32 sta_id_mask;500	u8 tid;501	u8 reserved[3];502	__le16 ssn;503	__le16 win_size;504} __packed; /* RX_BAID_ALLOCATION_ADD_CMD_API_S_VER_1 */505 506/**507 * struct iwl_rx_baid_cfg_cmd_modify - BAID modification data508 * @old_sta_id_mask: old station ID mask509 * @new_sta_id_mask: new station ID mask510 * @tid: TID of the BAID511 */512struct iwl_rx_baid_cfg_cmd_modify {513	__le32 old_sta_id_mask;514	__le32 new_sta_id_mask;515	__le32 tid;516} __packed; /* RX_BAID_ALLOCATION_MODIFY_CMD_API_S_VER_2 */517 518/**519 * struct iwl_rx_baid_cfg_cmd_remove_v1 - BAID removal data520 * @baid: the BAID to remove521 */522struct iwl_rx_baid_cfg_cmd_remove_v1 {523	__le32 baid;524} __packed; /* RX_BAID_ALLOCATION_REMOVE_CMD_API_S_VER_1 */525 526/**527 * struct iwl_rx_baid_cfg_cmd_remove - BAID removal data528 * @sta_id_mask: the station mask of the BAID to remove529 * @tid: the TID of the BAID to remove530 */531struct iwl_rx_baid_cfg_cmd_remove {532	__le32 sta_id_mask;533	__le32 tid;534} __packed; /* RX_BAID_ALLOCATION_REMOVE_CMD_API_S_VER_2 */535 536/**537 * struct iwl_rx_baid_cfg_cmd - BAID allocation/config command538 * @action: the action, from &enum iwl_rx_baid_action539 * @alloc: allocation data540 * @modify: modify data541 * @remove_v1: remove data (version 1)542 * @remove: remove data543 */544struct iwl_rx_baid_cfg_cmd {545	__le32 action;546	union {547		struct iwl_rx_baid_cfg_cmd_alloc alloc;548		struct iwl_rx_baid_cfg_cmd_modify modify;549		struct iwl_rx_baid_cfg_cmd_remove_v1 remove_v1;550		struct iwl_rx_baid_cfg_cmd_remove remove;551	}; /* RX_BAID_ALLOCATION_OPERATION_API_U_VER_2 */552} __packed; /* RX_BAID_ALLOCATION_CONFIG_CMD_API_S_VER_2 */553 554/**555 * struct iwl_rx_baid_cfg_resp - BAID allocation response556 * @baid: the allocated BAID557 */558struct iwl_rx_baid_cfg_resp {559	__le32 baid;560}; /* RX_BAID_ALLOCATION_RESPONSE_API_S_VER_1 */561 562/**563 * enum iwl_scd_queue_cfg_operation - scheduler queue operation564 * @IWL_SCD_QUEUE_ADD: allocate a new queue565 * @IWL_SCD_QUEUE_REMOVE: remove a queue566 * @IWL_SCD_QUEUE_MODIFY: modify a queue567 */568enum iwl_scd_queue_cfg_operation {569	IWL_SCD_QUEUE_ADD = 0,570	IWL_SCD_QUEUE_REMOVE = 1,571	IWL_SCD_QUEUE_MODIFY = 2,572};573 574/**575 * struct iwl_scd_queue_cfg_cmd - scheduler queue allocation command576 * @operation: the operation, see &enum iwl_scd_queue_cfg_operation577 * @u: union depending on command usage578 * @u.add.sta_mask: station mask579 * @u.add.tid: TID580 * @u.add.reserved: reserved581 * @u.add.flags: flags from &enum iwl_tx_queue_cfg_actions, except582 *	%TX_QUEUE_CFG_ENABLE_QUEUE is not valid583 * @u.add.cb_size: size code584 * @u.add.bc_dram_addr: byte-count table IOVA585 * @u.add.tfdq_dram_addr: TFD queue IOVA586 * @u.remove.sta_mask: station mask of queue to remove587 * @u.remove.tid: TID of queue to remove588 * @u.modify.old_sta_mask: old station mask for modify589 * @u.modify.tid: TID of queue to modify590 * @u.modify.new_sta_mask: new station mask for modify591 */592struct iwl_scd_queue_cfg_cmd {593	__le32 operation;594	union {595		struct {596			__le32 sta_mask;597			u8 tid;598			u8 reserved[3];599			__le32 flags;600			__le32 cb_size;601			__le64 bc_dram_addr;602			__le64 tfdq_dram_addr;603		} __packed add; /* TX_QUEUE_CFG_CMD_ADD_API_S_VER_1 */604		struct {605			__le32 sta_mask;606			__le32 tid;607		} __packed remove; /* TX_QUEUE_CFG_CMD_REMOVE_API_S_VER_1 */608		struct {609			__le32 old_sta_mask;610			__le32 tid;611			__le32 new_sta_mask;612		} __packed modify; /* TX_QUEUE_CFG_CMD_MODIFY_API_S_VER_1 */613	} __packed u; /* TX_QUEUE_CFG_CMD_OPERATION_API_U_VER_1 */614} __packed; /* TX_QUEUE_CFG_CMD_API_S_VER_3 */615 616/**617 * enum iwl_sec_key_flags - security key command key flags618 * @IWL_SEC_KEY_FLAG_CIPHER_MASK: cipher mask619 * @IWL_SEC_KEY_FLAG_CIPHER_WEP: WEP cipher620 * @IWL_SEC_KEY_FLAG_CIPHER_CCMP: CCMP/CMAC cipher621 * @IWL_SEC_KEY_FLAG_CIPHER_TKIP: TKIP cipher622 * @IWL_SEC_KEY_FLAG_CIPHER_GCMP: GCMP/GMAC cipher623 * @IWL_SEC_KEY_FLAG_NO_TX: don't install for TX624 * @IWL_SEC_KEY_FLAG_KEY_SIZE: large key size (WEP-104, GCMP-256, GMAC-256)625 * @IWL_SEC_KEY_FLAG_MFP: MFP is in used for this key626 * @IWL_SEC_KEY_FLAG_MCAST_KEY: this is a multicast key627 * @IWL_SEC_KEY_FLAG_SPP_AMSDU: SPP A-MSDU should be used628 */629enum iwl_sec_key_flags {630	IWL_SEC_KEY_FLAG_CIPHER_MASK	= 0x07,631	IWL_SEC_KEY_FLAG_CIPHER_WEP	= 0x01,632	IWL_SEC_KEY_FLAG_CIPHER_CCMP	= 0x02,633	IWL_SEC_KEY_FLAG_CIPHER_TKIP	= 0x03,634	IWL_SEC_KEY_FLAG_CIPHER_GCMP	= 0x05,635	IWL_SEC_KEY_FLAG_NO_TX		= 0x08,636	IWL_SEC_KEY_FLAG_KEY_SIZE	= 0x10,637	IWL_SEC_KEY_FLAG_MFP		= 0x20,638	IWL_SEC_KEY_FLAG_MCAST_KEY	= 0x40,639	IWL_SEC_KEY_FLAG_SPP_AMSDU	= 0x80,640};641 642#define IWL_SEC_WEP_KEY_OFFSET	3643 644/**645 * struct iwl_sec_key_cmd - security key command646 * @action: action from &enum iwl_ctxt_action647 * @u: union depending on command type648 * @u.add.sta_mask: station mask for the new key649 * @u.add.key_id: key ID (0-7) for the new key650 * @u.add.key_flags: key flags per &enum iwl_sec_key_flags651 * @u.add.key: key material. WEP keys should start from &IWL_SEC_WEP_KEY_OFFSET.652 * @u.add.tkip_mic_rx_key: TKIP MIC RX key653 * @u.add.tkip_mic_tx_key: TKIP MIC TX key654 * @u.add.rx_seq: RX sequence counter value655 * @u.add.tx_seq: TX sequence counter value656 * @u.modify.old_sta_mask: old station mask657 * @u.modify.new_sta_mask: new station mask658 * @u.modify.key_id: key ID659 * @u.modify.key_flags: new key flags660 * @u.remove.sta_mask: station mask661 * @u.remove.key_id: key ID662 * @u.remove.key_flags: key flags663 */664struct iwl_sec_key_cmd {665	__le32 action;666	union {667		struct {668			__le32 sta_mask;669			__le32 key_id;670			__le32 key_flags;671			u8 key[32];672			u8 tkip_mic_rx_key[8];673			u8 tkip_mic_tx_key[8];674			__le64 rx_seq;675			__le64 tx_seq;676		} __packed add; /* SEC_KEY_ADD_CMD_API_S_VER_1 */677		struct {678			__le32 old_sta_mask;679			__le32 new_sta_mask;680			__le32 key_id;681			__le32 key_flags;682		} __packed modify; /* SEC_KEY_MODIFY_CMD_API_S_VER_1 */683		struct {684			__le32 sta_mask;685			__le32 key_id;686			__le32 key_flags;687		} __packed remove; /* SEC_KEY_REMOVE_CMD_API_S_VER_1 */688	} __packed u; /* SEC_KEY_OPERATION_API_U_VER_1 */689} __packed; /* SEC_KEY_CMD_API_S_VER_1 */690 691#endif /* __iwl_fw_api_datapath_h__ */692