blob: 30008237323a76e2de2e6d680d76add8cd9745ce [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.
Sara Sharonc47de662016-09-29 17:28:33 +03009 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
Johannes Berg8ca151b2013-01-24 14:25:36 +010010 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of version 2 of the GNU General Public License as
13 * published by the Free Software Foundation.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
23 * USA
24 *
25 * The full GNU General Public License is included in this distribution
Emmanuel Grumbach410dc5a2013-02-18 09:22:28 +020026 * in the file called COPYING.
Johannes Berg8ca151b2013-01-24 14:25:36 +010027 *
28 * Contact Information:
Emmanuel Grumbachd01c5362015-11-17 15:39:56 +020029 * Intel Linux Wireless <linuxwifi@intel.com>
Johannes Berg8ca151b2013-01-24 14:25:36 +010030 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
31 *
32 * BSD LICENSE
33 *
Emmanuel Grumbach51368bf2013-12-30 13:15:54 +020034 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
Sara Sharonc47de662016-09-29 17:28:33 +030035 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
Johannes Berg8ca151b2013-01-24 14:25:36 +010036 * All rights reserved.
37 *
38 * Redistribution and use in source and binary forms, with or without
39 * modification, are permitted provided that the following conditions
40 * are met:
41 *
42 * * Redistributions of source code must retain the above copyright
43 * notice, this list of conditions and the following disclaimer.
44 * * Redistributions in binary form must reproduce the above copyright
45 * notice, this list of conditions and the following disclaimer in
46 * the documentation and/or other materials provided with the
47 * distribution.
48 * * Neither the name Intel Corporation nor the names of its
49 * contributors may be used to endorse or promote products derived
50 * from this software without specific prior written permission.
51 *
52 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
53 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
54 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
55 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
56 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
57 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
58 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
59 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
60 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
61 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
62 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63 *****************************************************************************/
64
65#ifndef __fw_api_tx_h__
66#define __fw_api_tx_h__
67
68/**
69 * enum iwl_tx_flags - bitmasks for tx_flags in TX command
70 * @TX_CMD_FLG_PROT_REQUIRE: use RTS or CTS-to-self to protect the frame
Andrei Otcheretianskif1daa002014-07-01 12:54:25 +030071 * @TX_CMD_FLG_WRITE_TX_POWER: update current tx power value in the mgmt frame
Johannes Berg8ca151b2013-01-24 14:25:36 +010072 * @TX_CMD_FLG_ACK: expect ACK from receiving station
73 * @TX_CMD_FLG_STA_RATE: use RS table with initial index from the TX command.
74 * Otherwise, use rate_n_flags from the TX command
Johannes Berg8ca151b2013-01-24 14:25:36 +010075 * @TX_CMD_FLG_BAR: this frame is a BA request, immediate BAR is expected
76 * Must set TX_CMD_FLG_ACK with this flag.
Johannes Berg8ca151b2013-01-24 14:25:36 +010077 * @TX_CMD_FLG_VHT_NDPA: mark frame is NDPA for VHT beamformer sequence
78 * @TX_CMD_FLG_HT_NDPA: mark frame is NDPA for HT beamformer sequence
79 * @TX_CMD_FLG_CSI_FDBK2HOST: mark to send feedback to host (only if good CRC)
Emmanuel Grumbachee7bea52014-03-06 10:30:49 +020080 * @TX_CMD_FLG_BT_PRIO_POS: the position of the BT priority (bit 11 is ignored
81 * on old firmwares).
Johannes Berg8ca151b2013-01-24 14:25:36 +010082 * @TX_CMD_FLG_BT_DIS: disable BT priority for this frame
83 * @TX_CMD_FLG_SEQ_CTL: set if FW should override the sequence control.
84 * Should be set for mgmt, non-QOS data, mcast, bcast and in scan command
85 * @TX_CMD_FLG_MORE_FRAG: this frame is non-last MPDU
Johannes Berg8ca151b2013-01-24 14:25:36 +010086 * @TX_CMD_FLG_TSF: FW should calculate and insert TSF in the frame
87 * Should be set for beacons and probe responses
88 * @TX_CMD_FLG_CALIB: activate PA TX power calibrations
89 * @TX_CMD_FLG_KEEP_SEQ_CTL: if seq_ctl is set, don't increase inner seq count
Johannes Berg8ca151b2013-01-24 14:25:36 +010090 * @TX_CMD_FLG_MH_PAD: driver inserted 2 byte padding after MAC header.
91 * Should be set for 26/30 length MAC headers
92 * @TX_CMD_FLG_RESP_TO_DRV: zero this if the response should go only to FW
Johannes Berg8ca151b2013-01-24 14:25:36 +010093 * @TX_CMD_FLG_TKIP_MIC_DONE: FW already performed TKIP MIC calculation
Johannes Berg8ca151b2013-01-24 14:25:36 +010094 * @TX_CMD_FLG_DUR: disable duration overwriting used in PS-Poll Assoc-id
95 * @TX_CMD_FLG_FW_DROP: FW should mark frame to be dropped
96 * @TX_CMD_FLG_EXEC_PAPD: execute PAPD
97 * @TX_CMD_FLG_PAPD_TYPE: 0 for reference power, 1 for nominal power
98 * @TX_CMD_FLG_HCCA_CHUNK: mark start of TSPEC chunk
99 */
100enum iwl_tx_flags {
101 TX_CMD_FLG_PROT_REQUIRE = BIT(0),
Andrei Otcheretianskif1daa002014-07-01 12:54:25 +0300102 TX_CMD_FLG_WRITE_TX_POWER = BIT(1),
Johannes Berg8ca151b2013-01-24 14:25:36 +0100103 TX_CMD_FLG_ACK = BIT(3),
104 TX_CMD_FLG_STA_RATE = BIT(4),
Johannes Berg8ca151b2013-01-24 14:25:36 +0100105 TX_CMD_FLG_BAR = BIT(6),
106 TX_CMD_FLG_TXOP_PROT = BIT(7),
107 TX_CMD_FLG_VHT_NDPA = BIT(8),
108 TX_CMD_FLG_HT_NDPA = BIT(9),
109 TX_CMD_FLG_CSI_FDBK2HOST = BIT(10),
Emmanuel Grumbachee7bea52014-03-06 10:30:49 +0200110 TX_CMD_FLG_BT_PRIO_POS = 11,
Johannes Berg8ca151b2013-01-24 14:25:36 +0100111 TX_CMD_FLG_BT_DIS = BIT(12),
112 TX_CMD_FLG_SEQ_CTL = BIT(13),
113 TX_CMD_FLG_MORE_FRAG = BIT(14),
Johannes Berg8ca151b2013-01-24 14:25:36 +0100114 TX_CMD_FLG_TSF = BIT(16),
115 TX_CMD_FLG_CALIB = BIT(17),
116 TX_CMD_FLG_KEEP_SEQ_CTL = BIT(18),
Johannes Berg8ca151b2013-01-24 14:25:36 +0100117 TX_CMD_FLG_MH_PAD = BIT(20),
118 TX_CMD_FLG_RESP_TO_DRV = BIT(21),
Johannes Berg8ca151b2013-01-24 14:25:36 +0100119 TX_CMD_FLG_TKIP_MIC_DONE = BIT(23),
Johannes Berg8ca151b2013-01-24 14:25:36 +0100120 TX_CMD_FLG_DUR = BIT(25),
121 TX_CMD_FLG_FW_DROP = BIT(26),
122 TX_CMD_FLG_EXEC_PAPD = BIT(27),
123 TX_CMD_FLG_PAPD_TYPE = BIT(28),
124 TX_CMD_FLG_HCCA_CHUNK = BIT(31)
125}; /* TX_FLAGS_BITS_API_S_VER_1 */
126
Avri Altmanb084a352015-07-12 09:10:05 +0300127/**
Sara Sharonc47de662016-09-29 17:28:33 +0300128 * enum iwl_tx_cmd_flags - bitmasks for tx_flags in TX command for a000
129 * @IWL_TX_FLAGS_CMD_RATE: use rate from the TX command
130 * @IWL_TX_FLAGS_ENCRYPT_DIS: frame should not be encrypted, even if it belongs
131 * to a secured STA
132 * @IWL_TX_FLAGS_HIGH_PRI: high priority frame (like EAPOL) - can affect rate
133 * selection, retry limits and BT kill
134 */
135enum iwl_tx_cmd_flags {
136 IWL_TX_FLAGS_CMD_RATE = BIT(0),
137 IWL_TX_FLAGS_ENCRYPT_DIS = BIT(1),
138 IWL_TX_FLAGS_HIGH_PRI = BIT(2),
139}; /* TX_FLAGS_BITS_API_S_VER_3 */
140
141/**
Avri Altmanb084a352015-07-12 09:10:05 +0300142 * enum iwl_tx_pm_timeouts - pm timeout values in TX command
143 * @PM_FRAME_NONE: no need to suspend sleep mode
144 * @PM_FRAME_MGMT: fw suspend sleep mode for 100TU
145 * @PM_FRAME_ASSOC: fw suspend sleep mode for 10sec
146 */
147enum iwl_tx_pm_timeouts {
148 PM_FRAME_NONE = 0,
149 PM_FRAME_MGMT = 2,
150 PM_FRAME_ASSOC = 3,
151};
152
Emmanuel Grumbach4270b872013-05-06 10:41:03 +0300153#define TX_CMD_SEC_MSK 0x07
Johannes Berg8ca151b2013-01-24 14:25:36 +0100154#define TX_CMD_SEC_WEP_KEY_IDX_POS 6
155#define TX_CMD_SEC_WEP_KEY_IDX_MSK 0xc0
Ayala Beker2a53d162016-04-07 16:21:57 +0300156
157/**
158 * enum iwl_tx_cmd_sec_ctrl - bitmasks for security control in TX command
159 * @TX_CMD_SEC_WEP: WEP encryption algorithm.
160 * @TX_CMD_SEC_CCM: CCM encryption algorithm.
161 * @TX_CMD_SEC_TKIP: TKIP encryption algorithm.
162 * @TX_CMD_SEC_EXT: extended cipher algorithm.
163 * @TX_CMD_SEC_GCMP: GCMP encryption algorithm.
164 * @TX_CMD_SEC_KEY128: set for 104 bits WEP key.
Emmanuel Grumbach4dc65112016-09-13 22:59:27 +0300165 * @TX_CMD_SEC_KEY_FROM_TABLE: for a non-WEP key, set if the key should be taken
Ayala Beker2a53d162016-04-07 16:21:57 +0300166 * from the table instead of from the TX command.
167 * If the key is taken from the key table its index should be given by the
168 * first byte of the TX command key field.
169 */
170enum iwl_tx_cmd_sec_ctrl {
171 TX_CMD_SEC_WEP = 0x01,
172 TX_CMD_SEC_CCM = 0x02,
173 TX_CMD_SEC_TKIP = 0x03,
174 TX_CMD_SEC_EXT = 0x04,
175 TX_CMD_SEC_GCMP = 0x05,
176 TX_CMD_SEC_KEY128 = 0x08,
David Spinadel0f17e1b2017-01-04 09:30:24 +0200177 TX_CMD_SEC_KEY_FROM_TABLE = 0x10,
Ayala Beker2a53d162016-04-07 16:21:57 +0300178};
Johannes Berg8ca151b2013-01-24 14:25:36 +0100179
Johannes Berg8ca151b2013-01-24 14:25:36 +0100180/*
181 * TX command Frame life time in us - to be written in pm_frame_timeout
182 */
183#define TX_CMD_LIFE_TIME_INFINITE 0xFFFFFFFF
184#define TX_CMD_LIFE_TIME_DEFAULT 2000000 /* 2000 ms*/
185#define TX_CMD_LIFE_TIME_PROBE_RESP 40000 /* 40 ms */
186#define TX_CMD_LIFE_TIME_EXPIRED_FRAME 0
187
188/*
189 * TID for non QoS frames - to be written in tid_tspec
190 */
191#define IWL_TID_NON_QOS IWL_MAX_TID_COUNT
192
193/*
194 * Limits on the retransmissions - to be written in {data,rts}_retry_limit
195 */
196#define IWL_DEFAULT_TX_RETRY 15
197#define IWL_MGMT_DFAULT_RETRY_LIMIT 3
198#define IWL_RTS_DFAULT_RETRY_LIMIT 60
199#define IWL_BAR_DFAULT_RETRY_LIMIT 60
200#define IWL_LOW_RETRY_LIMIT 7
201
Sara Sharond8fe4842016-03-09 10:12:45 +0200202/**
203 * enum iwl_tx_offload_assist_flags_pos - set %iwl_tx_cmd offload_assist values
204 * @TX_CMD_OFFLD_IP_HDR_OFFSET: offset to start of IP header (in words)
205 * from mac header end. For normal case it is 4 words for SNAP.
206 * note: tx_cmd, mac header and pad are not counted in the offset.
207 * This is used to help the offload in case there is tunneling such as
208 * IPv6 in IPv4, in such case the ip header offset should point to the
209 * inner ip header and IPv4 checksum of the external header should be
210 * calculated by driver.
211 * @TX_CMD_OFFLD_L4_EN: enable TCP/UDP checksum
212 * @TX_CMD_OFFLD_L3_EN: enable IP header checksum
213 * @TX_CMD_OFFLD_MH_SIZE: size of the mac header in words. Includes the IV
214 * field. Doesn't include the pad.
215 * @TX_CMD_OFFLD_PAD: mark 2-byte pad was inserted after the mac header for
216 * alignment
217 * @TX_CMD_OFFLD_AMSDU: mark TX command is A-MSDU
218 */
219enum iwl_tx_offload_assist_flags_pos {
220 TX_CMD_OFFLD_IP_HDR = 0,
221 TX_CMD_OFFLD_L4_EN = 6,
222 TX_CMD_OFFLD_L3_EN = 7,
223 TX_CMD_OFFLD_MH_SIZE = 8,
224 TX_CMD_OFFLD_PAD = 13,
225 TX_CMD_OFFLD_AMSDU = 14,
226};
227
228#define IWL_TX_CMD_OFFLD_MH_MASK 0x1f
229#define IWL_TX_CMD_OFFLD_IP_HDR_MASK 0x3f
230
Johannes Berg8ca151b2013-01-24 14:25:36 +0100231/* TODO: complete documentation for try_cnt and btkill_cnt */
232/**
233 * struct iwl_tx_cmd - TX command struct to FW
234 * ( TX_CMD = 0x1c )
235 * @len: in bytes of the payload, see below for details
Sara Sharond8fe4842016-03-09 10:12:45 +0200236 * @offload_assist: TX offload configuration
Johannes Berg8ca151b2013-01-24 14:25:36 +0100237 * @tx_flags: combination of TX_CMD_FLG_*
238 * @rate_n_flags: rate for *all* Tx attempts, if TX_CMD_FLG_STA_RATE_MSK is
239 * cleared. Combination of RATE_MCS_*
240 * @sta_id: index of destination station in FW station table
241 * @sec_ctl: security control, TX_CMD_SEC_*
242 * @initial_rate_index: index into the the rate table for initial TX attempt.
243 * Applied if TX_CMD_FLG_STA_RATE_MSK is set, normally 0 for data frames.
244 * @key: security key
Johannes Bergb1e06c62017-03-15 09:53:13 +0100245 * @reserved3: reserved
Johannes Berg8ca151b2013-01-24 14:25:36 +0100246 * @life_time: frame life time (usecs??)
247 * @dram_lsb_ptr: Physical address of scratch area in the command (try_cnt +
248 * btkill_cnd + reserved), first 32 bits. "0" disables usage.
249 * @dram_msb_ptr: upper bits of the scratch physical address
250 * @rts_retry_limit: max attempts for RTS
251 * @data_retry_limit: max attempts to send the data packet
252 * @tid_spec: TID/tspec
253 * @pm_frame_timeout: PM TX frame timeout
Johannes Berg8ca151b2013-01-24 14:25:36 +0100254 *
255 * The byte count (both len and next_frame_len) includes MAC header
256 * (24/26/30/32 bytes)
257 * + 2 bytes pad if 26/30 header size
258 * + 8 byte IV for CCM or TKIP (not used for WEP)
259 * + Data payload
260 * + 8-byte MIC (not used for CCM/WEP)
261 * It does not include post-MAC padding, i.e.,
262 * MIC (CCM) 8 bytes, ICV (WEP/TKIP/CKIP) 4 bytes, CRC 4 bytes.
263 * Range of len: 14-2342 bytes.
264 *
265 * After the struct fields the MAC header is placed, plus any padding,
266 * and then the actial payload.
267 */
268struct iwl_tx_cmd {
269 __le16 len;
Sara Sharond8fe4842016-03-09 10:12:45 +0200270 __le16 offload_assist;
Johannes Berg8ca151b2013-01-24 14:25:36 +0100271 __le32 tx_flags;
Johannes Bergbc888f42013-06-10 15:58:13 +0200272 struct {
273 u8 try_cnt;
274 u8 btkill_cnt;
275 __le16 reserved;
276 } scratch; /* DRAM_SCRATCH_API_U_VER_1 */
Johannes Berg8ca151b2013-01-24 14:25:36 +0100277 __le32 rate_n_flags;
278 u8 sta_id;
279 u8 sec_ctl;
280 u8 initial_rate_index;
281 u8 reserved2;
282 u8 key[16];
Emmanuel Grumbach7f514f52014-07-02 12:00:51 +0300283 __le32 reserved3;
Johannes Berg8ca151b2013-01-24 14:25:36 +0100284 __le32 life_time;
285 __le32 dram_lsb_ptr;
286 u8 dram_msb_ptr;
287 u8 rts_retry_limit;
288 u8 data_retry_limit;
289 u8 tid_tspec;
290 __le16 pm_frame_timeout;
Emmanuel Grumbach7f514f52014-07-02 12:00:51 +0300291 __le16 reserved4;
Johannes Berg8ca151b2013-01-24 14:25:36 +0100292 u8 payload[0];
293 struct ieee80211_hdr hdr[0];
Sara Sharond8fe4842016-03-09 10:12:45 +0200294} __packed; /* TX_CMD_API_S_VER_6 */
Johannes Berg8ca151b2013-01-24 14:25:36 +0100295
Sara Sharonc47de662016-09-29 17:28:33 +0300296struct iwl_dram_sec_info {
297 __le32 pn_low;
298 __le16 pn_high;
299 __le16 aux_info;
300} __packed; /* DRAM_SEC_INFO_API_S_VER_1 */
301
302/**
303 * struct iwl_tx_cmd_gen2 - TX command struct to FW for a000 devices
304 * ( TX_CMD = 0x1c )
305 * @len: in bytes of the payload, see below for details
306 * @offload_assist: TX offload configuration
307 * @tx_flags: combination of &iwl_tx_cmd_flags
308 * @dram_info: FW internal DRAM storage
309 * @rate_n_flags: rate for *all* Tx attempts, if TX_CMD_FLG_STA_RATE_MSK is
310 * cleared. Combination of RATE_MCS_*
311 */
312struct iwl_tx_cmd_gen2 {
313 __le16 len;
314 __le16 offload_assist;
315 __le32 flags;
316 struct iwl_dram_sec_info dram_info;
317 __le32 rate_n_flags;
318 struct ieee80211_hdr hdr[0];
319} __packed; /* TX_CMD_API_S_VER_7 */
320
Johannes Berg8ca151b2013-01-24 14:25:36 +0100321/*
322 * TX response related data
323 */
324
325/*
326 * enum iwl_tx_status - status that is returned by the fw after attempts to Tx
327 * @TX_STATUS_SUCCESS:
328 * @TX_STATUS_DIRECT_DONE:
329 * @TX_STATUS_POSTPONE_DELAY:
330 * @TX_STATUS_POSTPONE_FEW_BYTES:
331 * @TX_STATUS_POSTPONE_BT_PRIO:
332 * @TX_STATUS_POSTPONE_QUIET_PERIOD:
333 * @TX_STATUS_POSTPONE_CALC_TTAK:
334 * @TX_STATUS_FAIL_INTERNAL_CROSSED_RETRY:
335 * @TX_STATUS_FAIL_SHORT_LIMIT:
336 * @TX_STATUS_FAIL_LONG_LIMIT:
337 * @TX_STATUS_FAIL_UNDERRUN:
338 * @TX_STATUS_FAIL_DRAIN_FLOW:
339 * @TX_STATUS_FAIL_RFKILL_FLUSH:
340 * @TX_STATUS_FAIL_LIFE_EXPIRE:
341 * @TX_STATUS_FAIL_DEST_PS:
342 * @TX_STATUS_FAIL_HOST_ABORTED:
343 * @TX_STATUS_FAIL_BT_RETRY:
344 * @TX_STATUS_FAIL_STA_INVALID:
345 * @TX_TATUS_FAIL_FRAG_DROPPED:
346 * @TX_STATUS_FAIL_TID_DISABLE:
347 * @TX_STATUS_FAIL_FIFO_FLUSHED:
348 * @TX_STATUS_FAIL_SMALL_CF_POLL:
349 * @TX_STATUS_FAIL_FW_DROP:
350 * @TX_STATUS_FAIL_STA_COLOR_MISMATCH: mismatch between color of Tx cmd and
351 * STA table
352 * @TX_FRAME_STATUS_INTERNAL_ABORT:
353 * @TX_MODE_MSK:
354 * @TX_MODE_NO_BURST:
355 * @TX_MODE_IN_BURST_SEQ:
356 * @TX_MODE_FIRST_IN_BURST:
357 * @TX_QUEUE_NUM_MSK:
358 *
359 * Valid only if frame_count =1
360 * TODO: complete documentation
361 */
362enum iwl_tx_status {
363 TX_STATUS_MSK = 0x000000ff,
364 TX_STATUS_SUCCESS = 0x01,
365 TX_STATUS_DIRECT_DONE = 0x02,
366 /* postpone TX */
367 TX_STATUS_POSTPONE_DELAY = 0x40,
368 TX_STATUS_POSTPONE_FEW_BYTES = 0x41,
369 TX_STATUS_POSTPONE_BT_PRIO = 0x42,
370 TX_STATUS_POSTPONE_QUIET_PERIOD = 0x43,
371 TX_STATUS_POSTPONE_CALC_TTAK = 0x44,
372 /* abort TX */
373 TX_STATUS_FAIL_INTERNAL_CROSSED_RETRY = 0x81,
374 TX_STATUS_FAIL_SHORT_LIMIT = 0x82,
375 TX_STATUS_FAIL_LONG_LIMIT = 0x83,
376 TX_STATUS_FAIL_UNDERRUN = 0x84,
377 TX_STATUS_FAIL_DRAIN_FLOW = 0x85,
378 TX_STATUS_FAIL_RFKILL_FLUSH = 0x86,
379 TX_STATUS_FAIL_LIFE_EXPIRE = 0x87,
380 TX_STATUS_FAIL_DEST_PS = 0x88,
381 TX_STATUS_FAIL_HOST_ABORTED = 0x89,
382 TX_STATUS_FAIL_BT_RETRY = 0x8a,
383 TX_STATUS_FAIL_STA_INVALID = 0x8b,
384 TX_STATUS_FAIL_FRAG_DROPPED = 0x8c,
385 TX_STATUS_FAIL_TID_DISABLE = 0x8d,
386 TX_STATUS_FAIL_FIFO_FLUSHED = 0x8e,
387 TX_STATUS_FAIL_SMALL_CF_POLL = 0x8f,
388 TX_STATUS_FAIL_FW_DROP = 0x90,
389 TX_STATUS_FAIL_STA_COLOR_MISMATCH = 0x91,
390 TX_STATUS_INTERNAL_ABORT = 0x92,
391 TX_MODE_MSK = 0x00000f00,
392 TX_MODE_NO_BURST = 0x00000000,
393 TX_MODE_IN_BURST_SEQ = 0x00000100,
394 TX_MODE_FIRST_IN_BURST = 0x00000200,
395 TX_QUEUE_NUM_MSK = 0x0001f000,
396 TX_NARROW_BW_MSK = 0x00060000,
397 TX_NARROW_BW_1DIV2 = 0x00020000,
398 TX_NARROW_BW_1DIV4 = 0x00040000,
399 TX_NARROW_BW_1DIV8 = 0x00060000,
400};
401
402/*
403 * enum iwl_tx_agg_status - TX aggregation status
404 * @AGG_TX_STATE_STATUS_MSK:
405 * @AGG_TX_STATE_TRANSMITTED:
406 * @AGG_TX_STATE_UNDERRUN:
407 * @AGG_TX_STATE_BT_PRIO:
408 * @AGG_TX_STATE_FEW_BYTES:
409 * @AGG_TX_STATE_ABORT:
410 * @AGG_TX_STATE_LAST_SENT_TTL:
411 * @AGG_TX_STATE_LAST_SENT_TRY_CNT:
412 * @AGG_TX_STATE_LAST_SENT_BT_KILL:
413 * @AGG_TX_STATE_SCD_QUERY:
414 * @AGG_TX_STATE_TEST_BAD_CRC32:
415 * @AGG_TX_STATE_RESPONSE:
416 * @AGG_TX_STATE_DUMP_TX:
417 * @AGG_TX_STATE_DELAY_TX:
418 * @AGG_TX_STATE_TRY_CNT_MSK: Retry count for 1st frame in aggregation (retries
419 * occur if tx failed for this frame when it was a member of a previous
420 * aggregation block). If rate scaling is used, retry count indicates the
421 * rate table entry used for all frames in the new agg.
422 *@ AGG_TX_STATE_SEQ_NUM_MSK: Command ID and sequence number of Tx command for
423 * this frame
424 *
425 * TODO: complete documentation
426 */
427enum iwl_tx_agg_status {
428 AGG_TX_STATE_STATUS_MSK = 0x00fff,
429 AGG_TX_STATE_TRANSMITTED = 0x000,
430 AGG_TX_STATE_UNDERRUN = 0x001,
431 AGG_TX_STATE_BT_PRIO = 0x002,
432 AGG_TX_STATE_FEW_BYTES = 0x004,
433 AGG_TX_STATE_ABORT = 0x008,
434 AGG_TX_STATE_LAST_SENT_TTL = 0x010,
435 AGG_TX_STATE_LAST_SENT_TRY_CNT = 0x020,
436 AGG_TX_STATE_LAST_SENT_BT_KILL = 0x040,
437 AGG_TX_STATE_SCD_QUERY = 0x080,
438 AGG_TX_STATE_TEST_BAD_CRC32 = 0x0100,
439 AGG_TX_STATE_RESPONSE = 0x1ff,
440 AGG_TX_STATE_DUMP_TX = 0x200,
441 AGG_TX_STATE_DELAY_TX = 0x400,
442 AGG_TX_STATE_TRY_CNT_POS = 12,
443 AGG_TX_STATE_TRY_CNT_MSK = 0xf << AGG_TX_STATE_TRY_CNT_POS,
444};
445
446#define AGG_TX_STATE_LAST_SENT_MSK (AGG_TX_STATE_LAST_SENT_TTL| \
447 AGG_TX_STATE_LAST_SENT_TRY_CNT| \
448 AGG_TX_STATE_LAST_SENT_BT_KILL)
449
450/*
451 * The mask below describes a status where we are absolutely sure that the MPDU
452 * wasn't sent. For BA/Underrun we cannot be that sure. All we know that we've
453 * written the bytes to the TXE, but we know nothing about what the DSP did.
454 */
455#define AGG_TX_STAT_FRAME_NOT_SENT (AGG_TX_STATE_FEW_BYTES | \
456 AGG_TX_STATE_ABORT | \
457 AGG_TX_STATE_SCD_QUERY)
458
459/*
460 * REPLY_TX = 0x1c (response)
461 *
462 * This response may be in one of two slightly different formats, indicated
463 * by the frame_count field:
464 *
465 * 1) No aggregation (frame_count == 1). This reports Tx results for a single
466 * frame. Multiple attempts, at various bit rates, may have been made for
467 * this frame.
468 *
469 * 2) Aggregation (frame_count > 1). This reports Tx results for two or more
470 * frames that used block-acknowledge. All frames were transmitted at
471 * same rate. Rate scaling may have been used if first frame in this new
472 * agg block failed in previous agg block(s).
473 *
474 * Note that, for aggregation, ACK (block-ack) status is not delivered
475 * here; block-ack has not been received by the time the device records
476 * this status.
477 * This status relates to reasons the tx might have been blocked or aborted
478 * within the device, rather than whether it was received successfully by
479 * the destination station.
480 */
481
482/**
483 * struct agg_tx_status - per packet TX aggregation status
484 * @status: enum iwl_tx_agg_status
485 * @sequence: Sequence # for this frame's Tx cmd (not SSN!)
486 */
487struct agg_tx_status {
488 __le16 status;
489 __le16 sequence;
490} __packed;
491
492/*
493 * definitions for initial rate index field
494 * bits [3:0] initial rate index
495 * bits [6:4] rate table color, used for the initial rate
496 * bit-7 invalid rate indication
497 */
498#define TX_RES_INIT_RATE_INDEX_MSK 0x0f
499#define TX_RES_RATE_TABLE_COLOR_MSK 0x70
500#define TX_RES_INV_RATE_INDEX_MSK 0x80
501
502#define IWL_MVM_TX_RES_GET_TID(_ra_tid) ((_ra_tid) & 0x0f)
503#define IWL_MVM_TX_RES_GET_RA(_ra_tid) ((_ra_tid) >> 4)
504
505/**
506 * struct iwl_mvm_tx_resp - notifies that fw is TXing a packet
507 * ( REPLY_TX = 0x1c )
508 * @frame_count: 1 no aggregation, >1 aggregation
509 * @bt_kill_count: num of times blocked by bluetooth (unused for agg)
510 * @failure_rts: num of failures due to unsuccessful RTS
511 * @failure_frame: num failures due to no ACK (unused for agg)
512 * @initial_rate: for non-agg: rate of the successful Tx. For agg: rate of the
513 * Tx of all the batch. RATE_MCS_*
514 * @wireless_media_time: for non-agg: RTS + CTS + frame tx attempts time + ACK.
515 * for agg: RTS + CTS + aggregation tx time + block-ack time.
516 * in usec.
517 * @pa_status: tx power info
518 * @pa_integ_res_a: tx power info
519 * @pa_integ_res_b: tx power info
520 * @pa_integ_res_c: tx power info
521 * @measurement_req_id: tx power info
522 * @tfd_info: TFD information set by the FH
523 * @seq_ctl: sequence control from the Tx cmd
524 * @byte_cnt: byte count from the Tx cmd
525 * @tlc_info: TLC rate info
526 * @ra_tid: bits [3:0] = ra, bits [7:4] = tid
527 * @frame_ctrl: frame control
Sara Sharon12db2942017-01-17 14:28:21 +0200528 * @tx_queue: TX queue for this response
Johannes Berg8ca151b2013-01-24 14:25:36 +0100529 * @status: for non-agg: frame status TX_STATUS_*
530 * for agg: status of 1st frame, AGG_TX_STATE_*; other frame status fields
531 * follow this one, up to frame_count.
Sara Sharon12db2942017-01-17 14:28:21 +0200532 * For version 6 TX response isn't received for aggregation at all.
Johannes Berg8ca151b2013-01-24 14:25:36 +0100533 *
534 * After the array of statuses comes the SSN of the SCD. Look at
535 * %iwl_mvm_get_scd_ssn for more details.
536 */
537struct iwl_mvm_tx_resp {
538 u8 frame_count;
539 u8 bt_kill_count;
540 u8 failure_rts;
541 u8 failure_frame;
542 __le32 initial_rate;
543 __le16 wireless_media_time;
544
545 u8 pa_status;
546 u8 pa_integ_res_a[3];
547 u8 pa_integ_res_b[3];
548 u8 pa_integ_res_c[3];
549 __le16 measurement_req_id;
Eliad Peller3a84b692014-03-12 15:05:06 +0200550 u8 reduced_tpc;
551 u8 reserved;
Johannes Berg8ca151b2013-01-24 14:25:36 +0100552
553 __le32 tfd_info;
554 __le16 seq_ctl;
555 __le16 byte_cnt;
556 u8 tlc_info;
557 u8 ra_tid;
558 __le16 frame_ctrl;
Sara Sharon12db2942017-01-17 14:28:21 +0200559 union {
560 struct {
561 struct agg_tx_status status;
562 } v3;/* TX_RSP_API_S_VER_3 */
563 struct {
564 __le16 tx_queue;
565 __le16 reserved2;
566 struct agg_tx_status status;
567 } v6;
568 };
569} __packed; /* TX_RSP_API_S_VER_6 */
Johannes Berg8ca151b2013-01-24 14:25:36 +0100570
571/**
572 * struct iwl_mvm_ba_notif - notifies about reception of BA
573 * ( BA_NOTIF = 0xc5 )
Johannes Berg3dc6dd92017-03-09 14:08:51 +0100574 * @sta_addr: MAC address
Johannes Berg31a658b2017-03-09 15:56:57 +0100575 * @reserved: reserved
Johannes Berg8ca151b2013-01-24 14:25:36 +0100576 * @sta_id: Index of recipient (BA-sending) station in fw's station table
577 * @tid: tid of the session
Johannes Berg31a658b2017-03-09 15:56:57 +0100578 * @seq_ctl: sequence control field
Johannes Berg8ca151b2013-01-24 14:25:36 +0100579 * @bitmap: the bitmap of the BA notification as seen in the air
580 * @scd_flow: the tx queue this BA relates to
581 * @scd_ssn: the index of the last contiguously sent packet
582 * @txed: number of Txed frames in this batch
583 * @txed_2_done: number of Acked frames in this batch
Gregory Greenman69c7fda2015-12-29 11:26:35 +0200584 * @reduced_txp: power reduced according to TPC. This is the actual value and
585 * not a copy from the LQ command. Thus, if not the first rate was used
586 * for Tx-ing then this value will be set to 0 by FW.
Johannes Berg31a658b2017-03-09 15:56:57 +0100587 * @reserved1: reserved
Johannes Berg8ca151b2013-01-24 14:25:36 +0100588 */
589struct iwl_mvm_ba_notif {
Johannes Berg3dc6dd92017-03-09 14:08:51 +0100590 u8 sta_addr[ETH_ALEN];
Johannes Berg8ca151b2013-01-24 14:25:36 +0100591 __le16 reserved;
592
593 u8 sta_id;
594 u8 tid;
595 __le16 seq_ctl;
596 __le64 bitmap;
597 __le16 scd_flow;
598 __le16 scd_ssn;
599 u8 txed;
600 u8 txed_2_done;
Gregory Greenman69c7fda2015-12-29 11:26:35 +0200601 u8 reduced_txp;
602 u8 reserved1;
Johannes Berg8ca151b2013-01-24 14:25:36 +0100603} __packed;
604
Andrei Otcheretianskid3a108a2016-02-28 17:12:21 +0200605/**
Sara Sharonc46e7722016-07-17 14:24:55 +0300606 * struct iwl_mvm_compressed_ba_tfd - progress of a TFD queue
607 * @q_num: TFD queue number
608 * @tfd_index: Index of first un-acked frame in the TFD queue
Sara Sharon12db2942017-01-17 14:28:21 +0200609 * @scd_queue: For debug only - the physical queue the TFD queue is bound to
Johannes Berg31a658b2017-03-09 15:56:57 +0100610 * @reserved: reserved for alignment
Sara Sharonc46e7722016-07-17 14:24:55 +0300611 */
612struct iwl_mvm_compressed_ba_tfd {
Sara Sharon12db2942017-01-17 14:28:21 +0200613 __le16 q_num;
Sara Sharonc46e7722016-07-17 14:24:55 +0300614 __le16 tfd_index;
Sara Sharon12db2942017-01-17 14:28:21 +0200615 u8 scd_queue;
Johannes Berg31a658b2017-03-09 15:56:57 +0100616 u8 reserved[3];
Sara Sharonc46e7722016-07-17 14:24:55 +0300617} __packed; /* COMPRESSED_BA_TFD_API_S_VER_1 */
618
619/**
620 * struct iwl_mvm_compressed_ba_ratid - progress of a RA TID queue
621 * @q_num: RA TID queue number
622 * @tid: TID of the queue
623 * @ssn: BA window current SSN
624 */
625struct iwl_mvm_compressed_ba_ratid {
626 u8 q_num;
627 u8 tid;
628 __le16 ssn;
629} __packed; /* COMPRESSED_BA_RATID_API_S_VER_1 */
630
631/*
632 * enum iwl_mvm_ba_resp_flags - TX aggregation status
633 * @IWL_MVM_BA_RESP_TX_AGG: generated due to BA
634 * @IWL_MVM_BA_RESP_TX_BAR: generated due to BA after BAR
635 * @IWL_MVM_BA_RESP_TX_AGG_FAIL: aggregation didn't receive BA
636 * @IWL_MVM_BA_RESP_TX_UNDERRUN: aggregation got underrun
637 * @IWL_MVM_BA_RESP_TX_BT_KILL: aggregation got BT-kill
638 * @IWL_MVM_BA_RESP_TX_DSP_TIMEOUT: aggregation didn't finish within the
639 * expected time
640 */
641enum iwl_mvm_ba_resp_flags {
642 IWL_MVM_BA_RESP_TX_AGG,
643 IWL_MVM_BA_RESP_TX_BAR,
644 IWL_MVM_BA_RESP_TX_AGG_FAIL,
645 IWL_MVM_BA_RESP_TX_UNDERRUN,
646 IWL_MVM_BA_RESP_TX_BT_KILL,
647 IWL_MVM_BA_RESP_TX_DSP_TIMEOUT
648};
649
650/**
651 * struct iwl_mvm_compressed_ba_notif - notifies about reception of BA
652 * ( BA_NOTIF = 0xc5 )
653 * @flags: status flag, see the &iwl_mvm_ba_resp_flags
654 * @sta_id: Index of recipient (BA-sending) station in fw's station table
655 * @reduced_txp: power reduced according to TPC. This is the actual value and
656 * not a copy from the LQ command. Thus, if not the first rate was used
657 * for Tx-ing then this value will be set to 0 by FW.
658 * @initial_rate: TLC rate info, initial rate index, TLC table color
659 * @retry_cnt: retry count
660 * @query_byte_cnt: SCD query byte count
661 * @query_frame_cnt: SCD query frame count
662 * @txed: number of frames sent in the aggregation (all-TIDs)
663 * @done: number of frames that were Acked by the BA (all-TIDs)
Johannes Berg31a658b2017-03-09 15:56:57 +0100664 * @reserved: reserved (for alignment)
Sara Sharonc46e7722016-07-17 14:24:55 +0300665 * @wireless_time: Wireless-media time
666 * @tx_rate: the rate the aggregation was sent at
667 * @tfd_cnt: number of TFD-Q elements
668 * @ra_tid_cnt: number of RATID-Q elements
Johannes Berg31a658b2017-03-09 15:56:57 +0100669 * @tfd: array of TFD queue status updates. See &iwl_mvm_compressed_ba_tfd
Sara Sharon951cb312016-12-29 10:11:40 +0200670 * for details.
671 * @ra_tid: array of RA-TID queue status updates. For debug purposes only. See
672 * &iwl_mvm_compressed_ba_ratid for more details.
Sara Sharonc46e7722016-07-17 14:24:55 +0300673 */
674struct iwl_mvm_compressed_ba_notif {
675 __le32 flags;
676 u8 sta_id;
677 u8 reduced_txp;
678 u8 initial_rate;
679 u8 retry_cnt;
680 __le32 query_byte_cnt;
681 __le16 query_frame_cnt;
682 __le16 txed;
683 __le16 done;
Sara Sharon951cb312016-12-29 10:11:40 +0200684 __le16 reserved;
Sara Sharonc46e7722016-07-17 14:24:55 +0300685 __le32 wireless_time;
686 __le32 tx_rate;
687 __le16 tfd_cnt;
688 __le16 ra_tid_cnt;
689 struct iwl_mvm_compressed_ba_tfd tfd[1];
690 struct iwl_mvm_compressed_ba_ratid ra_tid[0];
691} __packed; /* COMPRESSED_BA_RES_API_S_VER_4 */
692
693/**
Andrei Otcheretianskid3a108a2016-02-28 17:12:21 +0200694 * struct iwl_mac_beacon_cmd_v6 - beacon template command
Johannes Berg8ca151b2013-01-24 14:25:36 +0100695 * @tx: the tx commands associated with the beacon frame
696 * @template_id: currently equal to the mac context id of the coresponding
697 * mac.
698 * @tim_idx: the offset of the tim IE in the beacon
699 * @tim_size: the length of the tim IE
700 * @frame: the template of the beacon frame
701 */
Andrei Otcheretianskid3a108a2016-02-28 17:12:21 +0200702struct iwl_mac_beacon_cmd_v6 {
Johannes Berg8ca151b2013-01-24 14:25:36 +0100703 struct iwl_tx_cmd tx;
704 __le32 template_id;
705 __le32 tim_idx;
706 __le32 tim_size;
707 struct ieee80211_hdr frame[0];
Andrei Otcheretianskid3a108a2016-02-28 17:12:21 +0200708} __packed; /* BEACON_TEMPLATE_CMD_API_S_VER_6 */
709
710/**
Sara Sharon8364fbb2016-12-08 11:44:20 +0200711 * struct iwl_mac_beacon_cmd_data - data of beacon template with offloaded CSA
Andrei Otcheretianskid3a108a2016-02-28 17:12:21 +0200712 * @template_id: currently equal to the mac context id of the coresponding
713 * mac.
714 * @tim_idx: the offset of the tim IE in the beacon
715 * @tim_size: the length of the tim IE
716 * @ecsa_offset: offset to the ECSA IE if present
717 * @csa_offset: offset to the CSA IE if present
718 * @frame: the template of the beacon frame
719 */
Sara Sharon8364fbb2016-12-08 11:44:20 +0200720struct iwl_mac_beacon_cmd_data {
Andrei Otcheretianskid3a108a2016-02-28 17:12:21 +0200721 __le32 template_id;
722 __le32 tim_idx;
723 __le32 tim_size;
724 __le32 ecsa_offset;
725 __le32 csa_offset;
726 struct ieee80211_hdr frame[0];
Sara Sharon8364fbb2016-12-08 11:44:20 +0200727};
728
729/**
730 * struct iwl_mac_beacon_cmd_v7 - beacon template command with offloaded CSA
731 * @tx: the tx commands associated with the beacon frame
732 * @data: see &iwl_mac_beacon_cmd_data
733 */
734struct iwl_mac_beacon_cmd_v7 {
735 struct iwl_tx_cmd tx;
736 struct iwl_mac_beacon_cmd_data data;
Andrei Otcheretianskid3a108a2016-02-28 17:12:21 +0200737} __packed; /* BEACON_TEMPLATE_CMD_API_S_VER_7 */
Johannes Berg8ca151b2013-01-24 14:25:36 +0100738
Sara Sharon8364fbb2016-12-08 11:44:20 +0200739/**
740 * struct iwl_mac_beacon_cmd - beacon template command with offloaded CSA
741 * @byte_cnt: byte count of the beacon frame
742 * @flags: for future use
Johannes Berg31a658b2017-03-09 15:56:57 +0100743 * @reserved: reserved
Sara Sharon8364fbb2016-12-08 11:44:20 +0200744 * @data: see &iwl_mac_beacon_cmd_data
745 */
746struct iwl_mac_beacon_cmd {
747 __le16 byte_cnt;
748 __le16 flags;
749 __le64 reserved;
750 struct iwl_mac_beacon_cmd_data data;
751} __packed; /* BEACON_TEMPLATE_CMD_API_S_VER_8 */
752
Ilan Peer571765c2013-03-05 15:26:03 +0200753struct iwl_beacon_notif {
754 struct iwl_mvm_tx_resp beacon_notify_hdr;
755 __le64 tsf;
756 __le32 ibss_mgr_status;
757} __packed;
758
Johannes Berg8ca151b2013-01-24 14:25:36 +0100759/**
David Spinadel1c87bba2014-02-27 16:41:52 +0200760 * struct iwl_extended_beacon_notif - notifies about beacon transmission
761 * @beacon_notify_hdr: tx response command associated with the beacon
762 * @tsf: last beacon tsf
763 * @ibss_mgr_status: whether IBSS is manager
764 * @gp2: last beacon time in gp2
765 */
766struct iwl_extended_beacon_notif {
767 struct iwl_mvm_tx_resp beacon_notify_hdr;
768 __le64 tsf;
769 __le32 ibss_mgr_status;
770 __le32 gp2;
771} __packed; /* BEACON_NTFY_API_S_VER_5 */
772
773/**
Johannes Berg8ca151b2013-01-24 14:25:36 +0100774 * enum iwl_dump_control - dump (flush) control flags
775 * @DUMP_TX_FIFO_FLUSH: Dump MSDUs until the the FIFO is empty
776 * and the TFD queues are empty.
777 */
778enum iwl_dump_control {
779 DUMP_TX_FIFO_FLUSH = BIT(1),
780};
781
782/**
783 * struct iwl_tx_path_flush_cmd -- queue/FIFO flush command
784 * @queues_ctl: bitmap of queues to flush
785 * @flush_ctl: control flags
786 * @reserved: reserved
787 */
788struct iwl_tx_path_flush_cmd {
789 __le32 queues_ctl;
790 __le16 flush_ctl;
791 __le16 reserved;
792} __packed; /* TX_PATH_FLUSH_CMD_API_S_VER_1 */
793
Liad Kaufmanf7c692d2016-03-08 10:41:32 +0200794/* Available options for the SCD_QUEUE_CFG HCMD */
795enum iwl_scd_cfg_actions {
796 SCD_CFG_DISABLE_QUEUE = 0x0,
797 SCD_CFG_ENABLE_QUEUE = 0x1,
798 SCD_CFG_UPDATE_QUEUE_TID = 0x2,
799};
800
Emmanuel Grumbach0294d9e2015-01-05 16:52:55 +0200801/**
802 * struct iwl_scd_txq_cfg_cmd - New txq hw scheduler config command
Johannes Berg31a658b2017-03-09 15:56:57 +0100803 * @token: unused
Emmanuel Grumbach0294d9e2015-01-05 16:52:55 +0200804 * @sta_id: station id
Johannes Berg31a658b2017-03-09 15:56:57 +0100805 * @tid: TID
Emmanuel Grumbach0294d9e2015-01-05 16:52:55 +0200806 * @scd_queue: scheduler queue to confiug
Liad Kaufmanf7c692d2016-03-08 10:41:32 +0200807 * @action: 1 queue enable, 0 queue disable, 2 change txq's tid owner
Johannes Berg67625862017-03-14 11:01:27 +0100808 * Value is one of &enum iwl_scd_cfg_actions options
Emmanuel Grumbach0294d9e2015-01-05 16:52:55 +0200809 * @aggregate: 1 aggregated queue, 0 otherwise
Johannes Berg67625862017-03-14 11:01:27 +0100810 * @tx_fifo: &enum iwl_mvm_tx_fifo
Emmanuel Grumbach0294d9e2015-01-05 16:52:55 +0200811 * @window: BA window size
812 * @ssn: SSN for the BA agreement
Johannes Berg31a658b2017-03-09 15:56:57 +0100813 * @reserved: reserved
Emmanuel Grumbach0294d9e2015-01-05 16:52:55 +0200814 */
815struct iwl_scd_txq_cfg_cmd {
816 u8 token;
817 u8 sta_id;
818 u8 tid;
819 u8 scd_queue;
Liad Kaufmanf7c692d2016-03-08 10:41:32 +0200820 u8 action;
Emmanuel Grumbach0294d9e2015-01-05 16:52:55 +0200821 u8 aggregate;
822 u8 tx_fifo;
823 u8 window;
824 __le16 ssn;
825 __le16 reserved;
826} __packed; /* SCD_QUEUE_CFG_CMD_API_S_VER_1 */
827
828/**
829 * struct iwl_scd_txq_cfg_rsp
830 * @token: taken from the command
831 * @sta_id: station id from the command
832 * @tid: tid from the command
833 * @scd_queue: scd_queue from the command
834 */
835struct iwl_scd_txq_cfg_rsp {
836 u8 token;
837 u8 sta_id;
838 u8 tid;
839 u8 scd_queue;
840} __packed; /* SCD_QUEUE_CFG_RSP_API_S_VER_1 */
841
Johannes Berg8ca151b2013-01-24 14:25:36 +0100842#endif /* __fw_api_tx_h__ */