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