Commit | Line | Data |
---|---|---|
8ca151b5 JB |
1 | /****************************************************************************** |
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 | * | |
51368bf7 | 8 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
8b4139dc | 9 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH |
854c5705 | 10 | * Copyright(c) 2016 Intel Deutschland GmbH |
8ca151b5 JB |
11 | * |
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 | |
410dc5aa | 27 | * in the file called COPYING. |
8ca151b5 JB |
28 | * |
29 | * Contact Information: | |
d01c5366 | 30 | * Intel Linux Wireless <linuxwifi@intel.com> |
8ca151b5 JB |
31 | * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 |
32 | * | |
33 | * BSD LICENSE | |
34 | * | |
51368bf7 | 35 | * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. |
8b4139dc | 36 | * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH |
854c5705 | 37 | * Copyright(c) 2016 Intel Deutschland GmbH |
8ca151b5 JB |
38 | * 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: | |
09b0ce1a | 74 | * @STA_FLG_DISABLE_TX: set if TX should be disabled |
8ca151b5 JB |
75 | * @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 | */ | |
94 | enum iwl_sta_flags { | |
95 | STA_FLG_REDUCED_TX_PWR_CTRL = BIT(3), | |
96 | STA_FLG_REDUCED_TX_PWR_DATA = BIT(6), | |
97 | ||
09b0ce1a | 98 | STA_FLG_DISABLE_TX = BIT(4), |
8ca151b5 JB |
99 | |
100 | STA_FLG_PS = BIT(8), | |
8ca151b5 JB |
101 | 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 | |
e36e5433 MS |
139 | * @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) | |
2a53d166 | 144 | * @STA_KEY_FLG_GCMP: GCMP encryption algorithm |
e36e5433 MS |
145 | * @STA_KEY_FLG_CMAC: CMAC encryption algorithm |
146 | * @STA_KEY_FLG_ENC_UNKNOWN: unknown encryption algorithm | |
147 | * @STA_KEY_FLG_EN_MSK: mask for encryption algorithmi value | |
8ca151b5 JB |
148 | * @STA_KEY_FLG_WEP_KEY_MAP: wep is either a group key (0 - legacy WEP) or from |
149 | * station info array (1 - n 1X mode) | |
150 | * @STA_KEY_FLG_KEYID_MSK: the index of the key | |
151 | * @STA_KEY_NOT_VALID: key is invalid | |
152 | * @STA_KEY_FLG_WEP_13BYTES: set for 13 bytes WEP key | |
2a53d166 | 153 | * @STA_KEY_FLG_KEY_32BYTES for non-wep key set for 32 bytes key |
8ca151b5 JB |
154 | * @STA_KEY_MULTICAST: set for multical key |
155 | * @STA_KEY_MFP: key is used for Management Frame Protection | |
156 | */ | |
157 | enum iwl_sta_key_flag { | |
158 | STA_KEY_FLG_NO_ENC = (0 << 0), | |
159 | STA_KEY_FLG_WEP = (1 << 0), | |
160 | STA_KEY_FLG_CCM = (2 << 0), | |
161 | STA_KEY_FLG_TKIP = (3 << 0), | |
e36e5433 | 162 | STA_KEY_FLG_EXT = (4 << 0), |
2a53d166 | 163 | STA_KEY_FLG_GCMP = (5 << 0), |
8ca151b5 JB |
164 | STA_KEY_FLG_CMAC = (6 << 0), |
165 | STA_KEY_FLG_ENC_UNKNOWN = (7 << 0), | |
166 | STA_KEY_FLG_EN_MSK = (7 << 0), | |
167 | ||
168 | STA_KEY_FLG_WEP_KEY_MAP = BIT(3), | |
169 | STA_KEY_FLG_KEYID_POS = 8, | |
170 | STA_KEY_FLG_KEYID_MSK = (3 << STA_KEY_FLG_KEYID_POS), | |
171 | STA_KEY_NOT_VALID = BIT(11), | |
172 | STA_KEY_FLG_WEP_13BYTES = BIT(12), | |
2a53d166 | 173 | STA_KEY_FLG_KEY_32BYTES = BIT(12), |
8ca151b5 JB |
174 | STA_KEY_MULTICAST = BIT(14), |
175 | STA_KEY_MFP = BIT(15), | |
176 | }; | |
177 | ||
178 | /** | |
179 | * enum iwl_sta_modify_flag - indicate to the fw what flag are being changed | |
2b1ba3ef | 180 | * @STA_MODIFY_QUEUE_REMOVAL: this command removes a queue |
8ca151b5 JB |
181 | * @STA_MODIFY_TID_DISABLE_TX: this command modifies %tid_disable_tx |
182 | * @STA_MODIFY_TX_RATE: unused | |
183 | * @STA_MODIFY_ADD_BA_TID: this command modifies %add_immediate_ba_tid | |
184 | * @STA_MODIFY_REMOVE_BA_TID: this command modifies %remove_immediate_ba_tid | |
185 | * @STA_MODIFY_SLEEPING_STA_TX_COUNT: this command modifies %sleep_tx_count | |
186 | * @STA_MODIFY_PROT_TH: | |
187 | * @STA_MODIFY_QUEUES: modify the queues used by this station | |
188 | */ | |
189 | enum iwl_sta_modify_flag { | |
2b1ba3ef | 190 | STA_MODIFY_QUEUE_REMOVAL = BIT(0), |
8ca151b5 JB |
191 | STA_MODIFY_TID_DISABLE_TX = BIT(1), |
192 | STA_MODIFY_TX_RATE = BIT(2), | |
193 | STA_MODIFY_ADD_BA_TID = BIT(3), | |
194 | STA_MODIFY_REMOVE_BA_TID = BIT(4), | |
195 | STA_MODIFY_SLEEPING_STA_TX_COUNT = BIT(5), | |
196 | STA_MODIFY_PROT_TH = BIT(6), | |
197 | STA_MODIFY_QUEUES = BIT(7), | |
198 | }; | |
199 | ||
200 | #define STA_MODE_MODIFY 1 | |
201 | ||
202 | /** | |
203 | * enum iwl_sta_sleep_flag - type of sleep of the station | |
204 | * @STA_SLEEP_STATE_AWAKE: | |
205 | * @STA_SLEEP_STATE_PS_POLL: | |
206 | * @STA_SLEEP_STATE_UAPSD: | |
3e56eadf JB |
207 | * @STA_SLEEP_STATE_MOREDATA: set more-data bit on |
208 | * (last) released frame | |
8ca151b5 JB |
209 | */ |
210 | enum iwl_sta_sleep_flag { | |
3e56eadf JB |
211 | STA_SLEEP_STATE_AWAKE = 0, |
212 | STA_SLEEP_STATE_PS_POLL = BIT(0), | |
213 | STA_SLEEP_STATE_UAPSD = BIT(1), | |
214 | STA_SLEEP_STATE_MOREDATA = BIT(2), | |
8ca151b5 JB |
215 | }; |
216 | ||
217 | /* STA ID and color bits definitions */ | |
218 | #define STA_ID_SEED (0x0f) | |
219 | #define STA_ID_POS (0) | |
220 | #define STA_ID_MSK (STA_ID_SEED << STA_ID_POS) | |
221 | ||
222 | #define STA_COLOR_SEED (0x7) | |
223 | #define STA_COLOR_POS (4) | |
224 | #define STA_COLOR_MSK (STA_COLOR_SEED << STA_COLOR_POS) | |
225 | ||
226 | #define STA_ID_N_COLOR_GET_COLOR(id_n_color) \ | |
227 | (((id_n_color) & STA_COLOR_MSK) >> STA_COLOR_POS) | |
228 | #define STA_ID_N_COLOR_GET_ID(id_n_color) \ | |
229 | (((id_n_color) & STA_ID_MSK) >> STA_ID_POS) | |
230 | ||
231 | #define STA_KEY_MAX_NUM (16) | |
232 | #define STA_KEY_IDX_INVALID (0xff) | |
233 | #define STA_KEY_MAX_DATA_KEY_NUM (4) | |
234 | #define IWL_MAX_GLOBAL_KEYS (4) | |
235 | #define STA_KEY_LEN_WEP40 (5) | |
236 | #define STA_KEY_LEN_WEP104 (13) | |
237 | ||
238 | /** | |
239 | * struct iwl_mvm_keyinfo - key information | |
240 | * @key_flags: type %iwl_sta_key_flag | |
241 | * @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection | |
242 | * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx | |
243 | * @key_offset: key offset in the fw's key table | |
244 | * @key: 16-byte unicast decryption key | |
245 | * @tx_secur_seq_cnt: initial RSC / PN needed for replay check | |
246 | * @hw_tkip_mic_rx_key: byte: MIC Rx Key - used for TKIP only | |
247 | * @hw_tkip_mic_tx_key: byte: MIC Tx Key - used for TKIP only | |
248 | */ | |
249 | struct iwl_mvm_keyinfo { | |
250 | __le16 key_flags; | |
251 | u8 tkip_rx_tsc_byte2; | |
252 | u8 reserved1; | |
253 | __le16 tkip_rx_ttak[5]; | |
254 | u8 key_offset; | |
255 | u8 reserved2; | |
256 | u8 key[16]; | |
257 | __le64 tx_secur_seq_cnt; | |
258 | __le64 hw_tkip_mic_rx_key; | |
259 | __le64 hw_tkip_mic_tx_key; | |
260 | } __packed; | |
261 | ||
10b2b201 SS |
262 | #define IWL_ADD_STA_STATUS_MASK 0xFF |
263 | #define IWL_ADD_STA_BAID_VALID_MASK 0x8000 | |
264 | #define IWL_ADD_STA_BAID_MASK 0x7F00 | |
265 | #define IWL_ADD_STA_BAID_SHIFT 8 | |
837c4da9 | 266 | |
854c5705 SS |
267 | /** |
268 | * struct iwl_mvm_add_sta_cmd_v7 - Add/modify a station in the fw's sta table. | |
269 | * ( REPLY_ADD_STA = 0x18 ) | |
270 | * @add_modify: 1: modify existing, 0: add new station | |
271 | * @awake_acs: | |
272 | * @tid_disable_tx: is tid BIT(tid) enabled for Tx. Clear BIT(x) to enable | |
273 | * AMPDU for tid x. Set %STA_MODIFY_TID_DISABLE_TX to change this field. | |
274 | * @mac_id_n_color: the Mac context this station belongs to | |
275 | * @addr[ETH_ALEN]: station's MAC address | |
276 | * @sta_id: index of station in uCode's station table | |
277 | * @modify_mask: STA_MODIFY_*, selects which parameters to modify vs. leave | |
278 | * alone. 1 - modify, 0 - don't change. | |
279 | * @station_flags: look at %iwl_sta_flags | |
280 | * @station_flags_msk: what of %station_flags have changed | |
281 | * @add_immediate_ba_tid: tid for which to add block-ack support (Rx) | |
282 | * Set %STA_MODIFY_ADD_BA_TID to use this field, and also set | |
283 | * add_immediate_ba_ssn. | |
284 | * @remove_immediate_ba_tid: tid for which to remove block-ack support (Rx) | |
285 | * Set %STA_MODIFY_REMOVE_BA_TID to use this field | |
286 | * @add_immediate_ba_ssn: ssn for the Rx block-ack session. Used together with | |
287 | * add_immediate_ba_tid. | |
288 | * @sleep_tx_count: number of packets to transmit to station even though it is | |
289 | * asleep. Used to synchronise PS-poll and u-APSD responses while ucode | |
290 | * keeps track of STA sleep state. | |
291 | * @sleep_state_flags: Look at %iwl_sta_sleep_flag. | |
292 | * @assoc_id: assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP | |
293 | * mac-addr. | |
294 | * @beamform_flags: beam forming controls | |
295 | * @tfd_queue_msk: tfd queues used by this station | |
296 | * | |
297 | * The device contains an internal table of per-station information, with info | |
298 | * on security keys, aggregation parameters, and Tx rates for initial Tx | |
299 | * attempt and any retries (set by REPLY_TX_LINK_QUALITY_CMD). | |
300 | * | |
301 | * ADD_STA sets up the table entry for one station, either creating a new | |
302 | * entry, or modifying a pre-existing one. | |
303 | */ | |
304 | struct iwl_mvm_add_sta_cmd_v7 { | |
305 | u8 add_modify; | |
306 | u8 awake_acs; | |
307 | __le16 tid_disable_tx; | |
308 | __le32 mac_id_n_color; | |
309 | u8 addr[ETH_ALEN]; /* _STA_ID_MODIFY_INFO_API_S_VER_1 */ | |
310 | __le16 reserved2; | |
311 | u8 sta_id; | |
312 | u8 modify_mask; | |
313 | __le16 reserved3; | |
314 | __le32 station_flags; | |
315 | __le32 station_flags_msk; | |
316 | u8 add_immediate_ba_tid; | |
317 | u8 remove_immediate_ba_tid; | |
318 | __le16 add_immediate_ba_ssn; | |
319 | __le16 sleep_tx_count; | |
320 | __le16 sleep_state_flags; | |
321 | __le16 assoc_id; | |
322 | __le16 beamform_flags; | |
323 | __le32 tfd_queue_msk; | |
324 | } __packed; /* ADD_STA_CMD_API_S_VER_7 */ | |
325 | ||
8ca151b5 | 326 | /** |
f9dc0004 | 327 | * struct iwl_mvm_add_sta_cmd - Add/modify a station in the fw's sta table. |
8ca151b5 JB |
328 | * ( REPLY_ADD_STA = 0x18 ) |
329 | * @add_modify: 1: modify existing, 0: add new station | |
f9dc0004 EG |
330 | * @awake_acs: |
331 | * @tid_disable_tx: is tid BIT(tid) enabled for Tx. Clear BIT(x) to enable | |
332 | * AMPDU for tid x. Set %STA_MODIFY_TID_DISABLE_TX to change this field. | |
8ca151b5 JB |
333 | * @mac_id_n_color: the Mac context this station belongs to |
334 | * @addr[ETH_ALEN]: station's MAC address | |
335 | * @sta_id: index of station in uCode's station table | |
336 | * @modify_mask: STA_MODIFY_*, selects which parameters to modify vs. leave | |
337 | * alone. 1 - modify, 0 - don't change. | |
8ca151b5 JB |
338 | * @station_flags: look at %iwl_sta_flags |
339 | * @station_flags_msk: what of %station_flags have changed | |
8ca151b5 JB |
340 | * @add_immediate_ba_tid: tid for which to add block-ack support (Rx) |
341 | * Set %STA_MODIFY_ADD_BA_TID to use this field, and also set | |
342 | * add_immediate_ba_ssn. | |
343 | * @remove_immediate_ba_tid: tid for which to remove block-ack support (Rx) | |
344 | * Set %STA_MODIFY_REMOVE_BA_TID to use this field | |
345 | * @add_immediate_ba_ssn: ssn for the Rx block-ack session. Used together with | |
346 | * add_immediate_ba_tid. | |
347 | * @sleep_tx_count: number of packets to transmit to station even though it is | |
348 | * asleep. Used to synchronise PS-poll and u-APSD responses while ucode | |
349 | * keeps track of STA sleep state. | |
350 | * @sleep_state_flags: Look at %iwl_sta_sleep_flag. | |
351 | * @assoc_id: assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP | |
352 | * mac-addr. | |
353 | * @beamform_flags: beam forming controls | |
354 | * @tfd_queue_msk: tfd queues used by this station | |
854c5705 | 355 | * @rx_ba_window: aggregation window size |
8ca151b5 JB |
356 | * |
357 | * The device contains an internal table of per-station information, with info | |
358 | * on security keys, aggregation parameters, and Tx rates for initial Tx | |
359 | * attempt and any retries (set by REPLY_TX_LINK_QUALITY_CMD). | |
360 | * | |
361 | * ADD_STA sets up the table entry for one station, either creating a new | |
362 | * entry, or modifying a pre-existing one. | |
363 | */ | |
f9dc0004 | 364 | struct iwl_mvm_add_sta_cmd { |
5a258aae | 365 | u8 add_modify; |
3e56eadf | 366 | u8 awake_acs; |
5a258aae MS |
367 | __le16 tid_disable_tx; |
368 | __le32 mac_id_n_color; | |
369 | u8 addr[ETH_ALEN]; /* _STA_ID_MODIFY_INFO_API_S_VER_1 */ | |
370 | __le16 reserved2; | |
371 | u8 sta_id; | |
372 | u8 modify_mask; | |
373 | __le16 reserved3; | |
374 | __le32 station_flags; | |
375 | __le32 station_flags_msk; | |
376 | u8 add_immediate_ba_tid; | |
377 | u8 remove_immediate_ba_tid; | |
378 | __le16 add_immediate_ba_ssn; | |
379 | __le16 sleep_tx_count; | |
380 | __le16 sleep_state_flags; | |
381 | __le16 assoc_id; | |
382 | __le16 beamform_flags; | |
383 | __le32 tfd_queue_msk; | |
854c5705 SS |
384 | __le16 rx_ba_window; |
385 | __le16 reserved; | |
386 | } __packed; /* ADD_STA_CMD_API_S_VER_8 */ | |
5a258aae MS |
387 | |
388 | /** | |
389 | * struct iwl_mvm_add_sta_key_cmd - add/modify sta key | |
390 | * ( REPLY_ADD_STA_KEY = 0x17 ) | |
391 | * @sta_id: index of station in uCode's station table | |
392 | * @key_offset: key offset in key storage | |
393 | * @key_flags: type %iwl_sta_key_flag | |
394 | * @key: key material data | |
5a258aae MS |
395 | * @rx_secur_seq_cnt: RX security sequence counter for the key |
396 | * @tkip_rx_tsc_byte2: TSC[2] for key mix ph1 detection | |
397 | * @tkip_rx_ttak: 10-byte unicast TKIP TTAK for Rx | |
398 | */ | |
399 | struct iwl_mvm_add_sta_key_cmd { | |
400 | u8 sta_id; | |
401 | u8 key_offset; | |
402 | __le16 key_flags; | |
2a53d166 | 403 | u8 key[32]; |
5a258aae MS |
404 | u8 rx_secur_seq_cnt[16]; |
405 | u8 tkip_rx_tsc_byte2; | |
406 | u8 reserved; | |
407 | __le16 tkip_rx_ttak[5]; | |
408 | } __packed; /* ADD_MODIFY_STA_KEY_API_S_VER_1 */ | |
409 | ||
8ca151b5 JB |
410 | /** |
411 | * enum iwl_mvm_add_sta_rsp_status - status in the response to ADD_STA command | |
412 | * @ADD_STA_SUCCESS: operation was executed successfully | |
413 | * @ADD_STA_STATIONS_OVERLOAD: no room left in the fw's station table | |
414 | * @ADD_STA_IMMEDIATE_BA_FAILURE: can't add Rx block ack session | |
415 | * @ADD_STA_MODIFY_NON_EXISTING_STA: driver requested to modify a station that | |
416 | * doesn't exist. | |
417 | */ | |
418 | enum iwl_mvm_add_sta_rsp_status { | |
419 | ADD_STA_SUCCESS = 0x1, | |
420 | ADD_STA_STATIONS_OVERLOAD = 0x2, | |
421 | ADD_STA_IMMEDIATE_BA_FAILURE = 0x4, | |
422 | ADD_STA_MODIFY_NON_EXISTING_STA = 0x8, | |
423 | }; | |
424 | ||
425 | /** | |
426 | * struct iwl_mvm_rm_sta_cmd - Add / modify a station in the fw's station table | |
427 | * ( REMOVE_STA = 0x19 ) | |
428 | * @sta_id: the station id of the station to be removed | |
429 | */ | |
430 | struct iwl_mvm_rm_sta_cmd { | |
431 | u8 sta_id; | |
432 | u8 reserved[3]; | |
433 | } __packed; /* REMOVE_STA_CMD_API_S_VER_2 */ | |
434 | ||
8e160ab8 AB |
435 | /** |
436 | * struct iwl_mvm_mgmt_mcast_key_cmd_v1 | |
437 | * ( MGMT_MCAST_KEY = 0x1f ) | |
438 | * @ctrl_flags: %iwl_sta_key_flag | |
439 | * @igtk: | |
440 | * @k1: unused | |
441 | * @k2: unused | |
442 | * @sta_id: station ID that support IGTK | |
443 | * @key_id: | |
444 | * @receive_seq_cnt: initial RSC/PN needed for replay check | |
445 | */ | |
446 | struct iwl_mvm_mgmt_mcast_key_cmd_v1 { | |
447 | __le32 ctrl_flags; | |
448 | u8 igtk[16]; | |
449 | u8 k1[16]; | |
450 | u8 k2[16]; | |
451 | __le32 key_id; | |
452 | __le32 sta_id; | |
453 | __le64 receive_seq_cnt; | |
454 | } __packed; /* SEC_MGMT_MULTICAST_KEY_CMD_API_S_VER_1 */ | |
455 | ||
8ca151b5 JB |
456 | /** |
457 | * struct iwl_mvm_mgmt_mcast_key_cmd | |
458 | * ( MGMT_MCAST_KEY = 0x1f ) | |
459 | * @ctrl_flags: %iwl_sta_key_flag | |
8e160ab8 | 460 | * @igtk: IGTK master key |
8ca151b5 JB |
461 | * @sta_id: station ID that support IGTK |
462 | * @key_id: | |
463 | * @receive_seq_cnt: initial RSC/PN needed for replay check | |
464 | */ | |
465 | struct iwl_mvm_mgmt_mcast_key_cmd { | |
466 | __le32 ctrl_flags; | |
8e160ab8 | 467 | u8 igtk[32]; |
8ca151b5 JB |
468 | __le32 key_id; |
469 | __le32 sta_id; | |
470 | __le64 receive_seq_cnt; | |
8e160ab8 | 471 | } __packed; /* SEC_MGMT_MULTICAST_KEY_CMD_API_S_VER_2 */ |
8ca151b5 JB |
472 | |
473 | struct iwl_mvm_wep_key { | |
474 | u8 key_index; | |
475 | u8 key_offset; | |
476 | __le16 reserved1; | |
477 | u8 key_size; | |
478 | u8 reserved2[3]; | |
479 | u8 key[16]; | |
480 | } __packed; | |
481 | ||
482 | struct iwl_mvm_wep_key_cmd { | |
483 | __le32 mac_id_n_color; | |
484 | u8 num_keys; | |
485 | u8 decryption_type; | |
486 | u8 flags; | |
487 | u8 reserved; | |
488 | struct iwl_mvm_wep_key wep_key[0]; | |
489 | } __packed; /* SEC_CURR_WEP_KEY_CMD_API_S_VER_2 */ | |
490 | ||
3e56eadf JB |
491 | /** |
492 | * struct iwl_mvm_eosp_notification - EOSP notification from firmware | |
493 | * @remain_frame_count: # of frames remaining, non-zero if SP was cut | |
494 | * short by GO absence | |
495 | * @sta_id: station ID | |
496 | */ | |
497 | struct iwl_mvm_eosp_notification { | |
498 | __le32 remain_frame_count; | |
499 | __le32 sta_id; | |
500 | } __packed; /* UAPSD_EOSP_NTFY_API_S_VER_1 */ | |
8ca151b5 JB |
501 | |
502 | #endif /* __fw_api_sta_h__ */ |