xref: /freebsd/sys/contrib/dev/iwlwifi/fw/api/sta.h (revision e0c4386e7e71d93b0edc0c8fa156263fc4a8b0b6)
1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /*
3  * Copyright (C) 2012-2014, 2018-2021 Intel Corporation
4  * Copyright (C) 2013-2014 Intel Mobile Communications GmbH
5  * Copyright (C) 2016-2017 Intel Deutschland GmbH
6  */
7 #ifndef __iwl_fw_api_sta_h__
8 #define __iwl_fw_api_sta_h__
9 
10 /**
11  * enum iwl_sta_flags - flags for the ADD_STA host command
12  * @STA_FLG_REDUCED_TX_PWR_CTRL: reduced TX power (control frames)
13  * @STA_FLG_REDUCED_TX_PWR_DATA: reduced TX power (data frames)
14  * @STA_FLG_DISABLE_TX: set if TX should be disabled
15  * @STA_FLG_PS: set if STA is in Power Save
16  * @STA_FLG_DRAIN_FLOW: drain flow
17  * @STA_FLG_PAN: STA is for PAN interface
18  * @STA_FLG_CLASS_AUTH: station is authenticated
19  * @STA_FLG_CLASS_ASSOC: station is associated
20  * @STA_FLG_RTS_MIMO_PROT: station requires RTS MIMO protection (dynamic SMPS)
21  * @STA_FLG_MAX_AGG_SIZE_MSK: maximal size for A-MPDU (mask)
22  * @STA_FLG_MAX_AGG_SIZE_SHIFT: maximal size for A-MPDU (bit shift)
23  * @STA_FLG_MAX_AGG_SIZE_8K: maximal size for A-MPDU (8k supported)
24  * @STA_FLG_MAX_AGG_SIZE_16K: maximal size for A-MPDU (16k supported)
25  * @STA_FLG_MAX_AGG_SIZE_32K: maximal size for A-MPDU (32k supported)
26  * @STA_FLG_MAX_AGG_SIZE_64K: maximal size for A-MPDU (64k supported)
27  * @STA_FLG_MAX_AGG_SIZE_128K: maximal size for A-MPDU (128k supported)
28  * @STA_FLG_MAX_AGG_SIZE_256K: maximal size for A-MPDU (256k supported)
29  * @STA_FLG_MAX_AGG_SIZE_512K: maximal size for A-MPDU (512k supported)
30  * @STA_FLG_MAX_AGG_SIZE_1024K: maximal size for A-MPDU (1024k supported)
31  * @STA_FLG_MAX_AGG_SIZE_2M: maximal size for A-MPDU (2M supported)
32  * @STA_FLG_MAX_AGG_SIZE_4M: maximal size for A-MPDU (4M supported)
33  * @STA_FLG_AGG_MPDU_DENS_MSK: maximal MPDU density for Tx aggregation
34  * @STA_FLG_FAT_EN_MSK: support for channel width (for Tx). This flag is
35  *	initialised by driver and can be updated by fw upon reception of
36  *	action frames that can change the channel width. When cleared the fw
37  *	will send all the frames in 20MHz even when FAT channel is requested.
38  * @STA_FLG_FAT_EN_20MHZ: no wide channels are supported, only 20 MHz
39  * @STA_FLG_FAT_EN_40MHZ: wide channels up to 40 MHz supported
40  * @STA_FLG_FAT_EN_80MHZ: wide channels up to 80 MHz supported
41  * @STA_FLG_FAT_EN_160MHZ: wide channels up to 160 MHz supported
42  * @STA_FLG_MIMO_EN_MSK: support for MIMO. This flag is initialised by the
43  *	driver and can be updated by fw upon reception of action frames.
44  * @STA_FLG_MIMO_EN_SISO: no support for MIMO
45  * @STA_FLG_MIMO_EN_MIMO2: 2 streams supported
46  * @STA_FLG_MIMO_EN_MIMO3: 3 streams supported
47  * @STA_FLG_AGG_MPDU_DENS_MSK: A-MPDU density (mask)
48  * @STA_FLG_AGG_MPDU_DENS_SHIFT: A-MPDU density (bit shift)
49  * @STA_FLG_AGG_MPDU_DENS_2US: A-MPDU density (2 usec gap)
50  * @STA_FLG_AGG_MPDU_DENS_4US: A-MPDU density (4 usec gap)
51  * @STA_FLG_AGG_MPDU_DENS_8US: A-MPDU density (8 usec gap)
52  * @STA_FLG_AGG_MPDU_DENS_16US: A-MPDU density (16 usec gap)
53  */
54 enum iwl_sta_flags {
55 	STA_FLG_REDUCED_TX_PWR_CTRL	= BIT(3),
56 	STA_FLG_REDUCED_TX_PWR_DATA	= BIT(6),
57 
58 	STA_FLG_DISABLE_TX		= BIT(4),
59 
60 	STA_FLG_PS			= BIT(8),
61 	STA_FLG_DRAIN_FLOW		= BIT(12),
62 	STA_FLG_PAN			= BIT(13),
63 	STA_FLG_CLASS_AUTH		= BIT(14),
64 	STA_FLG_CLASS_ASSOC		= BIT(15),
65 	STA_FLG_RTS_MIMO_PROT		= BIT(17),
66 
67 	STA_FLG_MAX_AGG_SIZE_SHIFT	= 19,
68 	STA_FLG_MAX_AGG_SIZE_8K		= (0 << STA_FLG_MAX_AGG_SIZE_SHIFT),
69 	STA_FLG_MAX_AGG_SIZE_16K	= (1 << STA_FLG_MAX_AGG_SIZE_SHIFT),
70 	STA_FLG_MAX_AGG_SIZE_32K	= (2 << STA_FLG_MAX_AGG_SIZE_SHIFT),
71 	STA_FLG_MAX_AGG_SIZE_64K	= (3 << STA_FLG_MAX_AGG_SIZE_SHIFT),
72 	STA_FLG_MAX_AGG_SIZE_128K	= (4 << STA_FLG_MAX_AGG_SIZE_SHIFT),
73 	STA_FLG_MAX_AGG_SIZE_256K	= (5 << STA_FLG_MAX_AGG_SIZE_SHIFT),
74 	STA_FLG_MAX_AGG_SIZE_512K	= (6 << STA_FLG_MAX_AGG_SIZE_SHIFT),
75 	STA_FLG_MAX_AGG_SIZE_1024K	= (7 << STA_FLG_MAX_AGG_SIZE_SHIFT),
76 	STA_FLG_MAX_AGG_SIZE_2M		= (8 << STA_FLG_MAX_AGG_SIZE_SHIFT),
77 	STA_FLG_MAX_AGG_SIZE_4M		= (9 << STA_FLG_MAX_AGG_SIZE_SHIFT),
78 	STA_FLG_MAX_AGG_SIZE_MSK	= (0xf << STA_FLG_MAX_AGG_SIZE_SHIFT),
79 
80 	STA_FLG_AGG_MPDU_DENS_SHIFT	= 23,
81 	STA_FLG_AGG_MPDU_DENS_2US	= (4 << STA_FLG_AGG_MPDU_DENS_SHIFT),
82 	STA_FLG_AGG_MPDU_DENS_4US	= (5 << STA_FLG_AGG_MPDU_DENS_SHIFT),
83 	STA_FLG_AGG_MPDU_DENS_8US	= (6 << STA_FLG_AGG_MPDU_DENS_SHIFT),
84 	STA_FLG_AGG_MPDU_DENS_16US	= (7 << STA_FLG_AGG_MPDU_DENS_SHIFT),
85 	STA_FLG_AGG_MPDU_DENS_MSK	= (7 << STA_FLG_AGG_MPDU_DENS_SHIFT),
86 
87 	STA_FLG_FAT_EN_20MHZ		= (0 << 26),
88 	STA_FLG_FAT_EN_40MHZ		= (1 << 26),
89 	STA_FLG_FAT_EN_80MHZ		= (2 << 26),
90 	STA_FLG_FAT_EN_160MHZ		= (3 << 26),
91 	STA_FLG_FAT_EN_MSK		= (3 << 26),
92 
93 	STA_FLG_MIMO_EN_SISO		= (0 << 28),
94 	STA_FLG_MIMO_EN_MIMO2		= (1 << 28),
95 	STA_FLG_MIMO_EN_MIMO3		= (2 << 28),
96 	STA_FLG_MIMO_EN_MSK		= (3 << 28),
97 };
98 
99 /**
100  * enum iwl_sta_key_flag - key flags for the ADD_STA host command
101  * @STA_KEY_FLG_NO_ENC: no encryption
102  * @STA_KEY_FLG_WEP: WEP encryption algorithm
103  * @STA_KEY_FLG_CCM: CCMP encryption algorithm
104  * @STA_KEY_FLG_TKIP: TKIP encryption algorithm
105  * @STA_KEY_FLG_EXT: extended cipher algorithm (depends on the FW support)
106  * @STA_KEY_FLG_GCMP: GCMP encryption algorithm
107  * @STA_KEY_FLG_CMAC: CMAC encryption algorithm
108  * @STA_KEY_FLG_ENC_UNKNOWN: unknown encryption algorithm
109  * @STA_KEY_FLG_EN_MSK: mask for encryption algorithmi value
110  * @STA_KEY_FLG_WEP_KEY_MAP: wep is either a group key (0 - legacy WEP) or from
111  *	station info array (1 - n 1X mode)
112  * @STA_KEY_FLG_KEYID_MSK: the index of the key
113  * @STA_KEY_FLG_KEYID_POS: key index bit position
114  * @STA_KEY_NOT_VALID: key is invalid
115  * @STA_KEY_FLG_WEP_13BYTES: set for 13 bytes WEP key
116  * @STA_KEY_FLG_KEY_32BYTES: for non-wep key set for 32 bytes key
117  * @STA_KEY_MULTICAST: set for multical key
118  * @STA_KEY_MFP: key is used for Management Frame Protection
119  */
120 enum iwl_sta_key_flag {
121 	STA_KEY_FLG_NO_ENC		= (0 << 0),
122 	STA_KEY_FLG_WEP			= (1 << 0),
123 	STA_KEY_FLG_CCM			= (2 << 0),
124 	STA_KEY_FLG_TKIP		= (3 << 0),
125 	STA_KEY_FLG_EXT			= (4 << 0),
126 	STA_KEY_FLG_GCMP		= (5 << 0),
127 	STA_KEY_FLG_CMAC		= (6 << 0),
128 	STA_KEY_FLG_ENC_UNKNOWN		= (7 << 0),
129 	STA_KEY_FLG_EN_MSK		= (7 << 0),
130 
131 	STA_KEY_FLG_WEP_KEY_MAP		= BIT(3),
132 	STA_KEY_FLG_KEYID_POS		 = 8,
133 	STA_KEY_FLG_KEYID_MSK		= (3 << STA_KEY_FLG_KEYID_POS),
134 	STA_KEY_NOT_VALID		= BIT(11),
135 	STA_KEY_FLG_WEP_13BYTES		= BIT(12),
136 	STA_KEY_FLG_KEY_32BYTES		= BIT(12),
137 	STA_KEY_MULTICAST		= BIT(14),
138 	STA_KEY_MFP			= BIT(15),
139 };
140 
141 /**
142  * enum iwl_sta_modify_flag - indicate to the fw what flag are being changed
143  * @STA_MODIFY_QUEUE_REMOVAL: this command removes a queue
144  * @STA_MODIFY_TID_DISABLE_TX: this command modifies %tid_disable_tx
145  * @STA_MODIFY_UAPSD_ACS: this command modifies %uapsd_acs
146  * @STA_MODIFY_ADD_BA_TID: this command modifies %add_immediate_ba_tid
147  * @STA_MODIFY_REMOVE_BA_TID: this command modifies %remove_immediate_ba_tid
148  * @STA_MODIFY_SLEEPING_STA_TX_COUNT: this command modifies %sleep_tx_count
149  * @STA_MODIFY_PROT_TH: modify RTS threshold
150  * @STA_MODIFY_QUEUES: modify the queues used by this station
151  */
152 enum iwl_sta_modify_flag {
153 	STA_MODIFY_QUEUE_REMOVAL		= BIT(0),
154 	STA_MODIFY_TID_DISABLE_TX		= BIT(1),
155 	STA_MODIFY_UAPSD_ACS			= BIT(2),
156 	STA_MODIFY_ADD_BA_TID			= BIT(3),
157 	STA_MODIFY_REMOVE_BA_TID		= BIT(4),
158 	STA_MODIFY_SLEEPING_STA_TX_COUNT	= BIT(5),
159 	STA_MODIFY_PROT_TH			= BIT(6),
160 	STA_MODIFY_QUEUES			= BIT(7),
161 };
162 
163 /**
164  * enum iwl_sta_mode - station command mode
165  * @STA_MODE_ADD: add new station
166  * @STA_MODE_MODIFY: modify the station
167  */
168 enum iwl_sta_mode {
169 	STA_MODE_ADD	= 0,
170 	STA_MODE_MODIFY	= 1,
171 };
172 
173 /**
174  * enum iwl_sta_sleep_flag - type of sleep of the station
175  * @STA_SLEEP_STATE_AWAKE: station is awake
176  * @STA_SLEEP_STATE_PS_POLL: station is PS-polling
177  * @STA_SLEEP_STATE_UAPSD: station uses U-APSD
178  * @STA_SLEEP_STATE_MOREDATA: set more-data bit on
179  *	(last) released frame
180  */
181 enum iwl_sta_sleep_flag {
182 	STA_SLEEP_STATE_AWAKE		= 0,
183 	STA_SLEEP_STATE_PS_POLL		= BIT(0),
184 	STA_SLEEP_STATE_UAPSD		= BIT(1),
185 	STA_SLEEP_STATE_MOREDATA	= BIT(2),
186 };
187 
188 #define STA_KEY_MAX_NUM (16)
189 #define STA_KEY_IDX_INVALID (0xff)
190 #define STA_KEY_MAX_DATA_KEY_NUM (4)
191 #define IWL_MAX_GLOBAL_KEYS (4)
192 #define STA_KEY_LEN_WEP40 (5)
193 #define STA_KEY_LEN_WEP104 (13)
194 
195 #define IWL_ADD_STA_STATUS_MASK		0xFF
196 #define IWL_ADD_STA_BAID_VALID_MASK	0x8000
197 #define IWL_ADD_STA_BAID_MASK		0x7F00
198 #define IWL_ADD_STA_BAID_SHIFT		8
199 
200 /**
201  * struct iwl_mvm_add_sta_cmd_v7 - Add/modify a station in the fw's sta table.
202  * ( REPLY_ADD_STA = 0x18 )
203  * @add_modify: see &enum iwl_sta_mode
204  * @awake_acs: ACs to transmit data on while station is sleeping (for U-APSD)
205  * @tid_disable_tx: is tid BIT(tid) enabled for Tx. Clear BIT(x) to enable
206  *	AMPDU for tid x. Set %STA_MODIFY_TID_DISABLE_TX to change this field.
207  * @mac_id_n_color: the Mac context this station belongs to,
208  *	see &enum iwl_ctxt_id_and_color
209  * @addr: station's MAC address
210  * @reserved2: reserved
211  * @sta_id: index of station in uCode's station table
212  * @modify_mask: from &enum iwl_sta_modify_flag, selects what to change
213  * @reserved3: reserved
214  * @station_flags: look at &enum iwl_sta_flags
215  * @station_flags_msk: what of %station_flags have changed,
216  *	also &enum iwl_sta_flags
217  * @add_immediate_ba_tid: tid for which to add block-ack support (Rx)
218  *	Set %STA_MODIFY_ADD_BA_TID to use this field, and also set
219  *	add_immediate_ba_ssn.
220  * @remove_immediate_ba_tid: tid for which to remove block-ack support (Rx)
221  *	Set %STA_MODIFY_REMOVE_BA_TID to use this field
222  * @add_immediate_ba_ssn: ssn for the Rx block-ack session. Used together with
223  *	add_immediate_ba_tid.
224  * @sleep_tx_count: number of packets to transmit to station even though it is
225  *	asleep. Used to synchronise PS-poll and u-APSD responses while ucode
226  *	keeps track of STA sleep state.
227  * @sleep_state_flags: Look at &enum iwl_sta_sleep_flag.
228  * @assoc_id: assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP
229  *	mac-addr.
230  * @beamform_flags: beam forming controls
231  * @tfd_queue_msk: tfd queues used by this station
232  *
233  * The device contains an internal table of per-station information, with info
234  * on security keys, aggregation parameters, and Tx rates for initial Tx
235  * attempt and any retries (set by REPLY_TX_LINK_QUALITY_CMD).
236  *
237  * ADD_STA sets up the table entry for one station, either creating a new
238  * entry, or modifying a pre-existing one.
239  */
240 struct iwl_mvm_add_sta_cmd_v7 {
241 	u8 add_modify;
242 	u8 awake_acs;
243 	__le16 tid_disable_tx;
244 	__le32 mac_id_n_color;
245 	u8 addr[ETH_ALEN];	/* _STA_ID_MODIFY_INFO_API_S_VER_1 */
246 	__le16 reserved2;
247 	u8 sta_id;
248 	u8 modify_mask;
249 	__le16 reserved3;
250 	__le32 station_flags;
251 	__le32 station_flags_msk;
252 	u8 add_immediate_ba_tid;
253 	u8 remove_immediate_ba_tid;
254 	__le16 add_immediate_ba_ssn;
255 	__le16 sleep_tx_count;
256 	__le16 sleep_state_flags;
257 	__le16 assoc_id;
258 	__le16 beamform_flags;
259 	__le32 tfd_queue_msk;
260 } __packed; /* ADD_STA_CMD_API_S_VER_7 */
261 
262 /**
263  * enum iwl_sta_type - FW station types
264  * ( REPLY_ADD_STA = 0x18 )
265  * @IWL_STA_LINK: Link station - normal RX and TX traffic.
266  * @IWL_STA_GENERAL_PURPOSE: General purpose. In AP mode used for beacons
267  *	and probe responses.
268  * @IWL_STA_MULTICAST: multicast traffic,
269  * @IWL_STA_TDLS_LINK: TDLS link station
270  * @IWL_STA_AUX_ACTIVITY: auxilary station (scan, ROC and so on).
271  */
272 enum iwl_sta_type {
273 	IWL_STA_LINK,
274 	IWL_STA_GENERAL_PURPOSE,
275 	IWL_STA_MULTICAST,
276 	IWL_STA_TDLS_LINK,
277 	IWL_STA_AUX_ACTIVITY,
278 };
279 
280 /**
281  * struct iwl_mvm_add_sta_cmd - Add/modify a station in the fw's sta table.
282  * ( REPLY_ADD_STA = 0x18 )
283  * @add_modify: see &enum iwl_sta_mode
284  * @awake_acs: ACs to transmit data on while station is sleeping (for U-APSD)
285  * @tid_disable_tx: is tid BIT(tid) enabled for Tx. Clear BIT(x) to enable
286  *	AMPDU for tid x. Set %STA_MODIFY_TID_DISABLE_TX to change this field.
287  * @mac_id_n_color: the Mac context this station belongs to,
288  *	see &enum iwl_ctxt_id_and_color
289  * @addr: station's MAC address
290  * @reserved2: reserved
291  * @sta_id: index of station in uCode's station table
292  * @modify_mask: from &enum iwl_sta_modify_flag, selects what to change
293  * @reserved3: reserved
294  * @station_flags: look at &enum iwl_sta_flags
295  * @station_flags_msk: what of %station_flags have changed,
296  *	also &enum iwl_sta_flags
297  * @add_immediate_ba_tid: tid for which to add block-ack support (Rx)
298  *	Set %STA_MODIFY_ADD_BA_TID to use this field, and also set
299  *	add_immediate_ba_ssn.
300  * @remove_immediate_ba_tid: tid for which to remove block-ack support (Rx)
301  *	Set %STA_MODIFY_REMOVE_BA_TID to use this field
302  * @add_immediate_ba_ssn: ssn for the Rx block-ack session. Used together with
303  *	add_immediate_ba_tid.
304  * @sleep_tx_count: number of packets to transmit to station even though it is
305  *	asleep. Used to synchronise PS-poll and u-APSD responses while ucode
306  *	keeps track of STA sleep state.
307  * @station_type: type of this station. See &enum iwl_sta_type.
308  * @sleep_state_flags: Look at &enum iwl_sta_sleep_flag.
309  * @assoc_id: assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP
310  *	mac-addr.
311  * @beamform_flags: beam forming controls
312  * @tfd_queue_msk: tfd queues used by this station.
313  *	Obselete for new TX API (9 and above).
314  * @rx_ba_window: aggregation window size
315  * @sp_length: the size of the SP in actual number of frames
316  * @uapsd_acs:  4 LS bits are trigger enabled ACs, 4 MS bits are the deliver
317  *	enabled ACs.
318  *
319  * The device contains an internal table of per-station information, with info
320  * on security keys, aggregation parameters, and Tx rates for initial Tx
321  * attempt and any retries (set by REPLY_TX_LINK_QUALITY_CMD).
322  *
323  * ADD_STA sets up the table entry for one station, either creating a new
324  * entry, or modifying a pre-existing one.
325  */
326 struct iwl_mvm_add_sta_cmd {
327 	u8 add_modify;
328 	u8 awake_acs;
329 	__le16 tid_disable_tx;
330 	__le32 mac_id_n_color;  /* can be used for lmac id when using cmd v12 */
331 	u8 addr[ETH_ALEN];	/* _STA_ID_MODIFY_INFO_API_S_VER_1 */
332 	__le16 reserved2;
333 	u8 sta_id;
334 	u8 modify_mask;
335 	__le16 reserved3;
336 	__le32 station_flags;
337 	__le32 station_flags_msk;
338 	u8 add_immediate_ba_tid;
339 	u8 remove_immediate_ba_tid;
340 	__le16 add_immediate_ba_ssn;
341 	__le16 sleep_tx_count;
342 	u8 sleep_state_flags;
343 	u8 station_type;
344 	__le16 assoc_id;
345 	__le16 beamform_flags;
346 	__le32 tfd_queue_msk;
347 	__le16 rx_ba_window;
348 	u8 sp_length;
349 	u8 uapsd_acs;
350 } __packed; /* ADD_STA_CMD_API_S_VER_10 */
351 
352 /**
353  * struct iwl_mvm_add_sta_key_common - add/modify sta key common part
354  * ( REPLY_ADD_STA_KEY = 0x17 )
355  * @sta_id: index of station in uCode's station table
356  * @key_offset: key offset in key storage
357  * @key_flags: type &enum iwl_sta_key_flag
358  * @key: key material data
359  * @rx_secur_seq_cnt: RX security sequence counter for the key
360  */
361 struct iwl_mvm_add_sta_key_common {
362 	u8 sta_id;
363 	u8 key_offset;
364 	__le16 key_flags;
365 	u8 key[32];
366 	u8 rx_secur_seq_cnt[16];
367 } __packed;
368 
369 /**
370  * struct iwl_mvm_add_sta_key_cmd_v1 - add/modify sta key
371  * @common: see &struct iwl_mvm_add_sta_key_common
372  * @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection
373  * @reserved: reserved
374  * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx
375  */
376 struct iwl_mvm_add_sta_key_cmd_v1 {
377 	struct iwl_mvm_add_sta_key_common common;
378 	u8 tkip_rx_tsc_byte2;
379 	u8 reserved;
380 	__le16 tkip_rx_ttak[5];
381 } __packed; /* ADD_MODIFY_STA_KEY_API_S_VER_1 */
382 
383 /**
384  * struct iwl_mvm_add_sta_key_cmd - add/modify sta key
385  * @common: see &struct iwl_mvm_add_sta_key_common
386  * @rx_mic_key: TKIP RX unicast or multicast key
387  * @tx_mic_key: TKIP TX key
388  * @transmit_seq_cnt: TSC, transmit packet number
389  *
390  * Note: This is used for both v2 and v3, the difference being
391  * in the way the common.rx_secur_seq_cnt is used, in v2 that's
392  * the strange hole format, in v3 it's just a u64.
393  */
394 struct iwl_mvm_add_sta_key_cmd {
395 	struct iwl_mvm_add_sta_key_common common;
396 	__le64 rx_mic_key;
397 	__le64 tx_mic_key;
398 	__le64 transmit_seq_cnt;
399 } __packed; /* ADD_MODIFY_STA_KEY_API_S_VER_2, ADD_MODIFY_STA_KEY_API_S_VER_3 */
400 
401 /**
402  * enum iwl_mvm_add_sta_rsp_status - status in the response to ADD_STA command
403  * @ADD_STA_SUCCESS: operation was executed successfully
404  * @ADD_STA_STATIONS_OVERLOAD: no room left in the fw's station table
405  * @ADD_STA_IMMEDIATE_BA_FAILURE: can't add Rx block ack session
406  * @ADD_STA_MODIFY_NON_EXISTING_STA: driver requested to modify a station that
407  *	doesn't exist.
408  */
409 enum iwl_mvm_add_sta_rsp_status {
410 	ADD_STA_SUCCESS			= 0x1,
411 	ADD_STA_STATIONS_OVERLOAD	= 0x2,
412 	ADD_STA_IMMEDIATE_BA_FAILURE	= 0x4,
413 	ADD_STA_MODIFY_NON_EXISTING_STA	= 0x8,
414 };
415 
416 /**
417  * struct iwl_mvm_rm_sta_cmd - Add / modify a station in the fw's station table
418  * ( REMOVE_STA = 0x19 )
419  * @sta_id: the station id of the station to be removed
420  * @reserved: reserved
421  */
422 struct iwl_mvm_rm_sta_cmd {
423 	u8 sta_id;
424 	u8 reserved[3];
425 } __packed; /* REMOVE_STA_CMD_API_S_VER_2 */
426 
427 /**
428  * struct iwl_mvm_mgmt_mcast_key_cmd_v1
429  * ( MGMT_MCAST_KEY = 0x1f )
430  * @ctrl_flags: &enum iwl_sta_key_flag
431  * @igtk: IGTK key material
432  * @k1: unused
433  * @k2: unused
434  * @sta_id: station ID that support IGTK
435  * @key_id: key ID
436  * @receive_seq_cnt: initial RSC/PN needed for replay check
437  */
438 struct iwl_mvm_mgmt_mcast_key_cmd_v1 {
439 	__le32 ctrl_flags;
440 	u8 igtk[16];
441 	u8 k1[16];
442 	u8 k2[16];
443 	__le32 key_id;
444 	__le32 sta_id;
445 	__le64 receive_seq_cnt;
446 } __packed; /* SEC_MGMT_MULTICAST_KEY_CMD_API_S_VER_1 */
447 
448 /**
449  * struct iwl_mvm_mgmt_mcast_key_cmd
450  * ( MGMT_MCAST_KEY = 0x1f )
451  * @ctrl_flags: &enum iwl_sta_key_flag
452  * @igtk: IGTK master key
453  * @sta_id: station ID that support IGTK
454  * @key_id: key ID
455  * @receive_seq_cnt: initial RSC/PN needed for replay check
456  */
457 struct iwl_mvm_mgmt_mcast_key_cmd {
458 	__le32 ctrl_flags;
459 	u8 igtk[32];
460 	__le32 key_id;
461 	__le32 sta_id;
462 	__le64 receive_seq_cnt;
463 } __packed; /* SEC_MGMT_MULTICAST_KEY_CMD_API_S_VER_2 */
464 
465 struct iwl_mvm_wep_key {
466 	u8 key_index;
467 	u8 key_offset;
468 	__le16 reserved1;
469 	u8 key_size;
470 	u8 reserved2[3];
471 	u8 key[16];
472 } __packed;
473 
474 struct iwl_mvm_wep_key_cmd {
475 	__le32 mac_id_n_color;
476 	u8 num_keys;
477 	u8 decryption_type;
478 	u8 flags;
479 	u8 reserved;
480 	struct iwl_mvm_wep_key wep_key[];
481 } __packed; /* SEC_CURR_WEP_KEY_CMD_API_S_VER_2 */
482 
483 /**
484  * struct iwl_mvm_eosp_notification - EOSP notification from firmware
485  * @remain_frame_count: # of frames remaining, non-zero if SP was cut
486  *	short by GO absence
487  * @sta_id: station ID
488  */
489 struct iwl_mvm_eosp_notification {
490 	__le32 remain_frame_count;
491 	__le32 sta_id;
492 } __packed; /* UAPSD_EOSP_NTFY_API_S_VER_1 */
493 
494 #endif /* __iwl_fw_api_sta_h__ */
495