blob: 38b1d045be8ec130680e203a01975b41f0f15dbe [file] [log] [blame]
Johannes Berg8ca151b2013-01-24 14:25:36 +01001/******************************************************************************
2 *
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
5 *
6 * GPL LICENSE SUMMARY
7 *
Emmanuel Grumbach51368bf2013-12-30 13:15:54 +02008 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
Johannes Berg8b4139d2014-07-24 14:05:26 +02009 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
Sara Sharon854c5702016-01-26 13:17:47 +020010 * Copyright(c) 2016 Intel Deutschland GmbH
Johannes Berg8ca151b2013-01-24 14:25:36 +010011 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of version 2 of the GNU General Public License as
14 * published by the Free Software Foundation.
15 *
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
24 * USA
25 *
26 * The full GNU General Public License is included in this distribution
Emmanuel Grumbach410dc5a2013-02-18 09:22:28 +020027 * in the file called COPYING.
Johannes Berg8ca151b2013-01-24 14:25:36 +010028 *
29 * Contact Information:
Emmanuel Grumbachd01c5362015-11-17 15:39:56 +020030 * Intel Linux Wireless <linuxwifi@intel.com>
Johannes Berg8ca151b2013-01-24 14:25:36 +010031 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
32 *
33 * BSD LICENSE
34 *
Emmanuel Grumbach51368bf2013-12-30 13:15:54 +020035 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
Johannes Berg8b4139d2014-07-24 14:05:26 +020036 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
Sara Sharon854c5702016-01-26 13:17:47 +020037 * Copyright(c) 2016 Intel Deutschland GmbH
Johannes Berg8ca151b2013-01-24 14:25:36 +010038 * All rights reserved.
39 *
40 * Redistribution and use in source and binary forms, with or without
41 * modification, are permitted provided that the following conditions
42 * are met:
43 *
44 * * Redistributions of source code must retain the above copyright
45 * notice, this list of conditions and the following disclaimer.
46 * * Redistributions in binary form must reproduce the above copyright
47 * notice, this list of conditions and the following disclaimer in
48 * the documentation and/or other materials provided with the
49 * distribution.
50 * * Neither the name Intel Corporation nor the names of its
51 * contributors may be used to endorse or promote products derived
52 * from this software without specific prior written permission.
53 *
54 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
55 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
56 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
57 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
58 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
59 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
60 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
61 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
62 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
63 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
64 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
65 *****************************************************************************/
66
67#ifndef __fw_api_sta_h__
68#define __fw_api_sta_h__
69
70/**
71 * enum iwl_sta_flags - flags for the ADD_STA host command
72 * @STA_FLG_REDUCED_TX_PWR_CTRL:
73 * @STA_FLG_REDUCED_TX_PWR_DATA:
Andrei Otcheretianski09b0ce12014-05-25 17:07:38 +030074 * @STA_FLG_DISABLE_TX: set if TX should be disabled
Johannes Berg8ca151b2013-01-24 14:25:36 +010075 * @STA_FLG_PS: set if STA is in Power Save
76 * @STA_FLG_INVALID: set if STA is invalid
77 * @STA_FLG_DLP_EN: Direct Link Protocol is enabled
78 * @STA_FLG_SET_ALL_KEYS: the current key applies to all key IDs
79 * @STA_FLG_DRAIN_FLOW: drain flow
80 * @STA_FLG_PAN: STA is for PAN interface
81 * @STA_FLG_CLASS_AUTH:
82 * @STA_FLG_CLASS_ASSOC:
83 * @STA_FLG_CLASS_MIMO_PROT:
84 * @STA_FLG_MAX_AGG_SIZE_MSK: maximal size for A-MPDU
85 * @STA_FLG_AGG_MPDU_DENS_MSK: maximal MPDU density for Tx aggregation
86 * @STA_FLG_FAT_EN_MSK: support for channel width (for Tx). This flag is
87 * initialised by driver and can be updated by fw upon reception of
88 * action frames that can change the channel width. When cleared the fw
89 * will send all the frames in 20MHz even when FAT channel is requested.
90 * @STA_FLG_MIMO_EN_MSK: support for MIMO. This flag is initialised by the
91 * driver and can be updated by fw upon reception of action frames.
92 * @STA_FLG_MFP_EN: Management Frame Protection
93 */
94enum iwl_sta_flags {
95 STA_FLG_REDUCED_TX_PWR_CTRL = BIT(3),
96 STA_FLG_REDUCED_TX_PWR_DATA = BIT(6),
97
Andrei Otcheretianski09b0ce12014-05-25 17:07:38 +030098 STA_FLG_DISABLE_TX = BIT(4),
Johannes Berg8ca151b2013-01-24 14:25:36 +010099
100 STA_FLG_PS = BIT(8),
Johannes Berg8ca151b2013-01-24 14:25:36 +0100101 STA_FLG_DRAIN_FLOW = BIT(12),
102 STA_FLG_PAN = BIT(13),
103 STA_FLG_CLASS_AUTH = BIT(14),
104 STA_FLG_CLASS_ASSOC = BIT(15),
105 STA_FLG_RTS_MIMO_PROT = BIT(17),
106
107 STA_FLG_MAX_AGG_SIZE_SHIFT = 19,
108 STA_FLG_MAX_AGG_SIZE_8K = (0 << STA_FLG_MAX_AGG_SIZE_SHIFT),
109 STA_FLG_MAX_AGG_SIZE_16K = (1 << STA_FLG_MAX_AGG_SIZE_SHIFT),
110 STA_FLG_MAX_AGG_SIZE_32K = (2 << STA_FLG_MAX_AGG_SIZE_SHIFT),
111 STA_FLG_MAX_AGG_SIZE_64K = (3 << STA_FLG_MAX_AGG_SIZE_SHIFT),
112 STA_FLG_MAX_AGG_SIZE_128K = (4 << STA_FLG_MAX_AGG_SIZE_SHIFT),
113 STA_FLG_MAX_AGG_SIZE_256K = (5 << STA_FLG_MAX_AGG_SIZE_SHIFT),
114 STA_FLG_MAX_AGG_SIZE_512K = (6 << STA_FLG_MAX_AGG_SIZE_SHIFT),
115 STA_FLG_MAX_AGG_SIZE_1024K = (7 << STA_FLG_MAX_AGG_SIZE_SHIFT),
116 STA_FLG_MAX_AGG_SIZE_MSK = (7 << STA_FLG_MAX_AGG_SIZE_SHIFT),
117
118 STA_FLG_AGG_MPDU_DENS_SHIFT = 23,
119 STA_FLG_AGG_MPDU_DENS_2US = (4 << STA_FLG_AGG_MPDU_DENS_SHIFT),
120 STA_FLG_AGG_MPDU_DENS_4US = (5 << STA_FLG_AGG_MPDU_DENS_SHIFT),
121 STA_FLG_AGG_MPDU_DENS_8US = (6 << STA_FLG_AGG_MPDU_DENS_SHIFT),
122 STA_FLG_AGG_MPDU_DENS_16US = (7 << STA_FLG_AGG_MPDU_DENS_SHIFT),
123 STA_FLG_AGG_MPDU_DENS_MSK = (7 << STA_FLG_AGG_MPDU_DENS_SHIFT),
124
125 STA_FLG_FAT_EN_20MHZ = (0 << 26),
126 STA_FLG_FAT_EN_40MHZ = (1 << 26),
127 STA_FLG_FAT_EN_80MHZ = (2 << 26),
128 STA_FLG_FAT_EN_160MHZ = (3 << 26),
129 STA_FLG_FAT_EN_MSK = (3 << 26),
130
131 STA_FLG_MIMO_EN_SISO = (0 << 28),
132 STA_FLG_MIMO_EN_MIMO2 = (1 << 28),
133 STA_FLG_MIMO_EN_MIMO3 = (2 << 28),
134 STA_FLG_MIMO_EN_MSK = (3 << 28),
135};
136
137/**
138 * enum iwl_sta_key_flag - key flags for the ADD_STA host command
Max Stepanove36e5432013-08-27 19:56:13 +0300139 * @STA_KEY_FLG_NO_ENC: no encryption
140 * @STA_KEY_FLG_WEP: WEP encryption algorithm
141 * @STA_KEY_FLG_CCM: CCMP encryption algorithm
142 * @STA_KEY_FLG_TKIP: TKIP encryption algorithm
143 * @STA_KEY_FLG_EXT: extended cipher algorithm (depends on the FW support)
144 * @STA_KEY_FLG_CMAC: CMAC encryption algorithm
145 * @STA_KEY_FLG_ENC_UNKNOWN: unknown encryption algorithm
146 * @STA_KEY_FLG_EN_MSK: mask for encryption algorithmi value
Johannes Berg8ca151b2013-01-24 14:25:36 +0100147 * @STA_KEY_FLG_WEP_KEY_MAP: wep is either a group key (0 - legacy WEP) or from
148 * station info array (1 - n 1X mode)
149 * @STA_KEY_FLG_KEYID_MSK: the index of the key
150 * @STA_KEY_NOT_VALID: key is invalid
151 * @STA_KEY_FLG_WEP_13BYTES: set for 13 bytes WEP key
152 * @STA_KEY_MULTICAST: set for multical key
153 * @STA_KEY_MFP: key is used for Management Frame Protection
154 */
155enum iwl_sta_key_flag {
156 STA_KEY_FLG_NO_ENC = (0 << 0),
157 STA_KEY_FLG_WEP = (1 << 0),
158 STA_KEY_FLG_CCM = (2 << 0),
159 STA_KEY_FLG_TKIP = (3 << 0),
Max Stepanove36e5432013-08-27 19:56:13 +0300160 STA_KEY_FLG_EXT = (4 << 0),
Johannes Berg8ca151b2013-01-24 14:25:36 +0100161 STA_KEY_FLG_CMAC = (6 << 0),
162 STA_KEY_FLG_ENC_UNKNOWN = (7 << 0),
163 STA_KEY_FLG_EN_MSK = (7 << 0),
164
165 STA_KEY_FLG_WEP_KEY_MAP = BIT(3),
166 STA_KEY_FLG_KEYID_POS = 8,
167 STA_KEY_FLG_KEYID_MSK = (3 << STA_KEY_FLG_KEYID_POS),
168 STA_KEY_NOT_VALID = BIT(11),
169 STA_KEY_FLG_WEP_13BYTES = BIT(12),
170 STA_KEY_MULTICAST = BIT(14),
171 STA_KEY_MFP = BIT(15),
172};
173
174/**
175 * enum iwl_sta_modify_flag - indicate to the fw what flag are being changed
Liad Kaufman2b1ba3e2015-09-21 14:14:23 +0200176 * @STA_MODIFY_QUEUE_REMOVAL: this command removes a queue
Johannes Berg8ca151b2013-01-24 14:25:36 +0100177 * @STA_MODIFY_TID_DISABLE_TX: this command modifies %tid_disable_tx
178 * @STA_MODIFY_TX_RATE: unused
179 * @STA_MODIFY_ADD_BA_TID: this command modifies %add_immediate_ba_tid
180 * @STA_MODIFY_REMOVE_BA_TID: this command modifies %remove_immediate_ba_tid
181 * @STA_MODIFY_SLEEPING_STA_TX_COUNT: this command modifies %sleep_tx_count
182 * @STA_MODIFY_PROT_TH:
183 * @STA_MODIFY_QUEUES: modify the queues used by this station
184 */
185enum iwl_sta_modify_flag {
Liad Kaufman2b1ba3e2015-09-21 14:14:23 +0200186 STA_MODIFY_QUEUE_REMOVAL = BIT(0),
Johannes Berg8ca151b2013-01-24 14:25:36 +0100187 STA_MODIFY_TID_DISABLE_TX = BIT(1),
188 STA_MODIFY_TX_RATE = BIT(2),
189 STA_MODIFY_ADD_BA_TID = BIT(3),
190 STA_MODIFY_REMOVE_BA_TID = BIT(4),
191 STA_MODIFY_SLEEPING_STA_TX_COUNT = BIT(5),
192 STA_MODIFY_PROT_TH = BIT(6),
193 STA_MODIFY_QUEUES = BIT(7),
194};
195
196#define STA_MODE_MODIFY 1
197
198/**
199 * enum iwl_sta_sleep_flag - type of sleep of the station
200 * @STA_SLEEP_STATE_AWAKE:
201 * @STA_SLEEP_STATE_PS_POLL:
202 * @STA_SLEEP_STATE_UAPSD:
Johannes Berg3e56ead2013-02-15 22:23:18 +0100203 * @STA_SLEEP_STATE_MOREDATA: set more-data bit on
204 * (last) released frame
Johannes Berg8ca151b2013-01-24 14:25:36 +0100205 */
206enum iwl_sta_sleep_flag {
Johannes Berg3e56ead2013-02-15 22:23:18 +0100207 STA_SLEEP_STATE_AWAKE = 0,
208 STA_SLEEP_STATE_PS_POLL = BIT(0),
209 STA_SLEEP_STATE_UAPSD = BIT(1),
210 STA_SLEEP_STATE_MOREDATA = BIT(2),
Johannes Berg8ca151b2013-01-24 14:25:36 +0100211};
212
213/* STA ID and color bits definitions */
214#define STA_ID_SEED (0x0f)
215#define STA_ID_POS (0)
216#define STA_ID_MSK (STA_ID_SEED << STA_ID_POS)
217
218#define STA_COLOR_SEED (0x7)
219#define STA_COLOR_POS (4)
220#define STA_COLOR_MSK (STA_COLOR_SEED << STA_COLOR_POS)
221
222#define STA_ID_N_COLOR_GET_COLOR(id_n_color) \
223 (((id_n_color) & STA_COLOR_MSK) >> STA_COLOR_POS)
224#define STA_ID_N_COLOR_GET_ID(id_n_color) \
225 (((id_n_color) & STA_ID_MSK) >> STA_ID_POS)
226
227#define STA_KEY_MAX_NUM (16)
228#define STA_KEY_IDX_INVALID (0xff)
229#define STA_KEY_MAX_DATA_KEY_NUM (4)
230#define IWL_MAX_GLOBAL_KEYS (4)
231#define STA_KEY_LEN_WEP40 (5)
232#define STA_KEY_LEN_WEP104 (13)
233
234/**
235 * struct iwl_mvm_keyinfo - key information
236 * @key_flags: type %iwl_sta_key_flag
237 * @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection
238 * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx
239 * @key_offset: key offset in the fw's key table
240 * @key: 16-byte unicast decryption key
241 * @tx_secur_seq_cnt: initial RSC / PN needed for replay check
242 * @hw_tkip_mic_rx_key: byte: MIC Rx Key - used for TKIP only
243 * @hw_tkip_mic_tx_key: byte: MIC Tx Key - used for TKIP only
244 */
245struct iwl_mvm_keyinfo {
246 __le16 key_flags;
247 u8 tkip_rx_tsc_byte2;
248 u8 reserved1;
249 __le16 tkip_rx_ttak[5];
250 u8 key_offset;
251 u8 reserved2;
252 u8 key[16];
253 __le64 tx_secur_seq_cnt;
254 __le64 hw_tkip_mic_rx_key;
255 __le64 hw_tkip_mic_tx_key;
256} __packed;
257
Sara Sharon10b2b202016-03-20 16:23:41 +0200258#define IWL_ADD_STA_STATUS_MASK 0xFF
259#define IWL_ADD_STA_BAID_VALID_MASK 0x8000
260#define IWL_ADD_STA_BAID_MASK 0x7F00
261#define IWL_ADD_STA_BAID_SHIFT 8
Sara Sharon837c4da2016-01-07 16:50:45 +0200262
Johannes Berg8ca151b2013-01-24 14:25:36 +0100263/**
Sara Sharon854c5702016-01-26 13:17:47 +0200264 * struct iwl_mvm_add_sta_cmd_v7 - Add/modify a station in the fw's sta table.
Johannes Berg8ca151b2013-01-24 14:25:36 +0100265 * ( REPLY_ADD_STA = 0x18 )
266 * @add_modify: 1: modify existing, 0: add new station
Emmanuel Grumbachf9dc0002014-03-30 09:53:27 +0300267 * @awake_acs:
268 * @tid_disable_tx: is tid BIT(tid) enabled for Tx. Clear BIT(x) to enable
269 * AMPDU for tid x. Set %STA_MODIFY_TID_DISABLE_TX to change this field.
Johannes Berg8ca151b2013-01-24 14:25:36 +0100270 * @mac_id_n_color: the Mac context this station belongs to
271 * @addr[ETH_ALEN]: station's MAC address
272 * @sta_id: index of station in uCode's station table
273 * @modify_mask: STA_MODIFY_*, selects which parameters to modify vs. leave
274 * alone. 1 - modify, 0 - don't change.
Johannes Berg8ca151b2013-01-24 14:25:36 +0100275 * @station_flags: look at %iwl_sta_flags
276 * @station_flags_msk: what of %station_flags have changed
Johannes Berg8ca151b2013-01-24 14:25:36 +0100277 * @add_immediate_ba_tid: tid for which to add block-ack support (Rx)
278 * Set %STA_MODIFY_ADD_BA_TID to use this field, and also set
279 * add_immediate_ba_ssn.
280 * @remove_immediate_ba_tid: tid for which to remove block-ack support (Rx)
281 * Set %STA_MODIFY_REMOVE_BA_TID to use this field
282 * @add_immediate_ba_ssn: ssn for the Rx block-ack session. Used together with
283 * add_immediate_ba_tid.
284 * @sleep_tx_count: number of packets to transmit to station even though it is
285 * asleep. Used to synchronise PS-poll and u-APSD responses while ucode
286 * keeps track of STA sleep state.
287 * @sleep_state_flags: Look at %iwl_sta_sleep_flag.
288 * @assoc_id: assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP
289 * mac-addr.
290 * @beamform_flags: beam forming controls
291 * @tfd_queue_msk: tfd queues used by this station
292 *
293 * The device contains an internal table of per-station information, with info
294 * on security keys, aggregation parameters, and Tx rates for initial Tx
295 * attempt and any retries (set by REPLY_TX_LINK_QUALITY_CMD).
296 *
297 * ADD_STA sets up the table entry for one station, either creating a new
298 * entry, or modifying a pre-existing one.
299 */
Sara Sharon854c5702016-01-26 13:17:47 +0200300struct iwl_mvm_add_sta_cmd_v7 {
Max Stepanov5a258aa2013-04-07 09:11:21 +0300301 u8 add_modify;
Johannes Berg3e56ead2013-02-15 22:23:18 +0100302 u8 awake_acs;
Max Stepanov5a258aa2013-04-07 09:11:21 +0300303 __le16 tid_disable_tx;
304 __le32 mac_id_n_color;
305 u8 addr[ETH_ALEN]; /* _STA_ID_MODIFY_INFO_API_S_VER_1 */
306 __le16 reserved2;
307 u8 sta_id;
308 u8 modify_mask;
309 __le16 reserved3;
310 __le32 station_flags;
311 __le32 station_flags_msk;
312 u8 add_immediate_ba_tid;
313 u8 remove_immediate_ba_tid;
314 __le16 add_immediate_ba_ssn;
315 __le16 sleep_tx_count;
316 __le16 sleep_state_flags;
317 __le16 assoc_id;
318 __le16 beamform_flags;
319 __le32 tfd_queue_msk;
Johannes Berg3e56ead2013-02-15 22:23:18 +0100320} __packed; /* ADD_STA_CMD_API_S_VER_7 */
Max Stepanov5a258aa2013-04-07 09:11:21 +0300321
322/**
Sara Sharon854c5702016-01-26 13:17:47 +0200323 * struct iwl_mvm_add_sta_cmd - Add/modify a station in the fw's sta table.
324 * ( REPLY_ADD_STA = 0x18 )
325 * @add_modify: 1: modify existing, 0: add new station
326 * @awake_acs:
327 * @tid_disable_tx: is tid BIT(tid) enabled for Tx. Clear BIT(x) to enable
328 * AMPDU for tid x. Set %STA_MODIFY_TID_DISABLE_TX to change this field.
329 * @mac_id_n_color: the Mac context this station belongs to
330 * @addr[ETH_ALEN]: station's MAC address
331 * @sta_id: index of station in uCode's station table
332 * @modify_mask: STA_MODIFY_*, selects which parameters to modify vs. leave
333 * alone. 1 - modify, 0 - don't change.
334 * @station_flags: look at %iwl_sta_flags
335 * @station_flags_msk: what of %station_flags have changed
336 * @add_immediate_ba_tid: tid for which to add block-ack support (Rx)
337 * Set %STA_MODIFY_ADD_BA_TID to use this field, and also set
338 * add_immediate_ba_ssn.
339 * @remove_immediate_ba_tid: tid for which to remove block-ack support (Rx)
340 * Set %STA_MODIFY_REMOVE_BA_TID to use this field
341 * @add_immediate_ba_ssn: ssn for the Rx block-ack session. Used together with
342 * add_immediate_ba_tid.
343 * @sleep_tx_count: number of packets to transmit to station even though it is
344 * asleep. Used to synchronise PS-poll and u-APSD responses while ucode
345 * keeps track of STA sleep state.
346 * @sleep_state_flags: Look at %iwl_sta_sleep_flag.
347 * @assoc_id: assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP
348 * mac-addr.
349 * @beamform_flags: beam forming controls
350 * @tfd_queue_msk: tfd queues used by this station
351 * @rx_ba_window: aggregation window size
352 *
353 * The device contains an internal table of per-station information, with info
354 * on security keys, aggregation parameters, and Tx rates for initial Tx
355 * attempt and any retries (set by REPLY_TX_LINK_QUALITY_CMD).
356 *
357 * ADD_STA sets up the table entry for one station, either creating a new
358 * entry, or modifying a pre-existing one.
359 */
360struct iwl_mvm_add_sta_cmd {
361 u8 add_modify;
362 u8 awake_acs;
363 __le16 tid_disable_tx;
364 __le32 mac_id_n_color;
365 u8 addr[ETH_ALEN]; /* _STA_ID_MODIFY_INFO_API_S_VER_1 */
366 __le16 reserved2;
367 u8 sta_id;
368 u8 modify_mask;
369 __le16 reserved3;
370 __le32 station_flags;
371 __le32 station_flags_msk;
372 u8 add_immediate_ba_tid;
373 u8 remove_immediate_ba_tid;
374 __le16 add_immediate_ba_ssn;
375 __le16 sleep_tx_count;
376 __le16 sleep_state_flags;
377 __le16 assoc_id;
378 __le16 beamform_flags;
379 __le32 tfd_queue_msk;
380 __le16 rx_ba_window;
381 __le16 reserved;
382} __packed; /* ADD_STA_CMD_API_S_VER_8 */
383
384/**
Max Stepanov5a258aa2013-04-07 09:11:21 +0300385 * struct iwl_mvm_add_sta_key_cmd - add/modify sta key
386 * ( REPLY_ADD_STA_KEY = 0x17 )
387 * @sta_id: index of station in uCode's station table
388 * @key_offset: key offset in key storage
389 * @key_flags: type %iwl_sta_key_flag
390 * @key: key material data
391 * @key2: key material data
392 * @rx_secur_seq_cnt: RX security sequence counter for the key
393 * @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection
394 * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx
395 */
396struct iwl_mvm_add_sta_key_cmd {
397 u8 sta_id;
398 u8 key_offset;
399 __le16 key_flags;
400 u8 key[16];
401 u8 key2[16];
402 u8 rx_secur_seq_cnt[16];
403 u8 tkip_rx_tsc_byte2;
404 u8 reserved;
405 __le16 tkip_rx_ttak[5];
406} __packed; /* ADD_MODIFY_STA_KEY_API_S_VER_1 */
407
408/**
Johannes Berg8ca151b2013-01-24 14:25:36 +0100409 * enum iwl_mvm_add_sta_rsp_status - status in the response to ADD_STA command
410 * @ADD_STA_SUCCESS: operation was executed successfully
411 * @ADD_STA_STATIONS_OVERLOAD: no room left in the fw's station table
412 * @ADD_STA_IMMEDIATE_BA_FAILURE: can't add Rx block ack session
413 * @ADD_STA_MODIFY_NON_EXISTING_STA: driver requested to modify a station that
414 * doesn't exist.
415 */
416enum iwl_mvm_add_sta_rsp_status {
417 ADD_STA_SUCCESS = 0x1,
418 ADD_STA_STATIONS_OVERLOAD = 0x2,
419 ADD_STA_IMMEDIATE_BA_FAILURE = 0x4,
420 ADD_STA_MODIFY_NON_EXISTING_STA = 0x8,
421};
422
423/**
424 * struct iwl_mvm_rm_sta_cmd - Add / modify a station in the fw's station table
425 * ( REMOVE_STA = 0x19 )
426 * @sta_id: the station id of the station to be removed
427 */
428struct iwl_mvm_rm_sta_cmd {
429 u8 sta_id;
430 u8 reserved[3];
431} __packed; /* REMOVE_STA_CMD_API_S_VER_2 */
432
433/**
434 * struct iwl_mvm_mgmt_mcast_key_cmd
435 * ( MGMT_MCAST_KEY = 0x1f )
436 * @ctrl_flags: %iwl_sta_key_flag
437 * @IGTK:
Johannes Berg2001a132015-06-19 10:20:10 +0200438 * @K1: unused
439 * @K2: unused
Johannes Berg8ca151b2013-01-24 14:25:36 +0100440 * @sta_id: station ID that support IGTK
441 * @key_id:
442 * @receive_seq_cnt: initial RSC/PN needed for replay check
443 */
444struct iwl_mvm_mgmt_mcast_key_cmd {
445 __le32 ctrl_flags;
446 u8 IGTK[16];
447 u8 K1[16];
448 u8 K2[16];
449 __le32 key_id;
450 __le32 sta_id;
451 __le64 receive_seq_cnt;
452} __packed; /* SEC_MGMT_MULTICAST_KEY_CMD_API_S_VER_1 */
453
454struct iwl_mvm_wep_key {
455 u8 key_index;
456 u8 key_offset;
457 __le16 reserved1;
458 u8 key_size;
459 u8 reserved2[3];
460 u8 key[16];
461} __packed;
462
463struct iwl_mvm_wep_key_cmd {
464 __le32 mac_id_n_color;
465 u8 num_keys;
466 u8 decryption_type;
467 u8 flags;
468 u8 reserved;
469 struct iwl_mvm_wep_key wep_key[0];
470} __packed; /* SEC_CURR_WEP_KEY_CMD_API_S_VER_2 */
471
Johannes Berg3e56ead2013-02-15 22:23:18 +0100472/**
473 * struct iwl_mvm_eosp_notification - EOSP notification from firmware
474 * @remain_frame_count: # of frames remaining, non-zero if SP was cut
475 * short by GO absence
476 * @sta_id: station ID
477 */
478struct iwl_mvm_eosp_notification {
479 __le32 remain_frame_count;
480 __le32 sta_id;
481} __packed; /* UAPSD_EOSP_NTFY_API_S_VER_1 */
Johannes Berg8ca151b2013-01-24 14:25:36 +0100482
483#endif /* __fw_api_sta_h__ */