blob: e31cd74dded6e4f1aadce25ebbe06b130c7b7916 [file] [log] [blame]
Kalle Valo5e3dd152013-06-12 20:52:10 +03001/*
2 * Copyright (c) 2005-2011 Atheros Communications Inc.
3 * Copyright (c) 2011-2013 Qualcomm Atheros, Inc.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#ifndef _HTT_H_
19#define _HTT_H_
20
21#include <linux/bug.h>
Michal Kazior6e712d42013-09-24 10:18:36 +020022#include <linux/interrupt.h>
Michal Kaziora16942e2014-02-27 18:50:04 +020023#include <linux/dmapool.h>
Michal Kaziorc545070e2015-01-24 12:14:48 +020024#include <linux/hashtable.h>
Janusz Dziedzic8f739db2014-03-24 21:23:17 +010025#include <net/mac80211.h>
Kalle Valo5e3dd152013-06-12 20:52:10 +030026
Kalle Valo5e3dd152013-06-12 20:52:10 +030027#include "htc.h"
Michal Kazior6aa4cf12015-03-30 09:51:55 +030028#include "hw.h"
Kalle Valo5e3dd152013-06-12 20:52:10 +030029#include "rx_desc.h"
Rajkumar Manoharan8348db22015-03-25 13:12:27 +020030#include "hw.h"
Kalle Valo5e3dd152013-06-12 20:52:10 +030031
Kalle Valo5e3dd152013-06-12 20:52:10 +030032enum htt_dbg_stats_type {
33 HTT_DBG_STATS_WAL_PDEV_TXRX = 1 << 0,
34 HTT_DBG_STATS_RX_REORDER = 1 << 1,
35 HTT_DBG_STATS_RX_RATE_INFO = 1 << 2,
36 HTT_DBG_STATS_TX_PPDU_LOG = 1 << 3,
37 HTT_DBG_STATS_TX_RATE_INFO = 1 << 4,
38 /* bits 5-23 currently reserved */
39
40 HTT_DBG_NUM_STATS /* keep this last */
41};
42
43enum htt_h2t_msg_type { /* host-to-target */
44 HTT_H2T_MSG_TYPE_VERSION_REQ = 0,
45 HTT_H2T_MSG_TYPE_TX_FRM = 1,
46 HTT_H2T_MSG_TYPE_RX_RING_CFG = 2,
47 HTT_H2T_MSG_TYPE_STATS_REQ = 3,
48 HTT_H2T_MSG_TYPE_SYNC = 4,
49 HTT_H2T_MSG_TYPE_AGGR_CFG = 5,
50 HTT_H2T_MSG_TYPE_FRAG_DESC_BANK_CFG = 6,
Michal Kazior961d4c32013-08-09 10:13:34 +020051
52 /* This command is used for sending management frames in HTT < 3.0.
53 * HTT >= 3.0 uses TX_FRM for everything. */
Kalle Valo5e3dd152013-06-12 20:52:10 +030054 HTT_H2T_MSG_TYPE_MGMT_TX = 7,
55
56 HTT_H2T_NUM_MSGS /* keep this last */
57};
58
59struct htt_cmd_hdr {
60 u8 msg_type;
61} __packed;
62
63struct htt_ver_req {
64 u8 pad[sizeof(u32) - sizeof(struct htt_cmd_hdr)];
65} __packed;
66
67/*
68 * HTT tx MSDU descriptor
69 *
70 * The HTT tx MSDU descriptor is created by the host HTT SW for each
71 * tx MSDU. The HTT tx MSDU descriptor contains the information that
72 * the target firmware needs for the FW's tx processing, particularly
73 * for creating the HW msdu descriptor.
74 * The same HTT tx descriptor is used for HL and LL systems, though
75 * a few fields within the tx descriptor are used only by LL or
76 * only by HL.
77 * The HTT tx descriptor is defined in two manners: by a struct with
78 * bitfields, and by a series of [dword offset, bit mask, bit shift]
79 * definitions.
80 * The target should use the struct def, for simplicitly and clarity,
81 * but the host shall use the bit-mast + bit-shift defs, to be endian-
82 * neutral. Specifically, the host shall use the get/set macros built
83 * around the mask + shift defs.
84 */
85struct htt_data_tx_desc_frag {
Peter Ohfbc03a42015-07-15 19:01:19 -070086 union {
87 struct double_word_addr {
88 __le32 paddr;
89 __le32 len;
90 } __packed dword_addr;
91 struct triple_word_addr {
92 __le32 paddr_lo;
93 __le16 paddr_hi;
94 __le16 len_16;
95 } __packed tword_addr;
96 } __packed;
Kalle Valo5e3dd152013-06-12 20:52:10 +030097} __packed;
98
Raja Manid9156b52015-06-22 20:22:27 +053099struct htt_msdu_ext_desc {
100 __le32 tso_flag[4];
101 struct htt_data_tx_desc_frag frags[6];
102};
103
Kalle Valo5e3dd152013-06-12 20:52:10 +0300104enum htt_data_tx_desc_flags0 {
105 HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT = 1 << 0,
106 HTT_DATA_TX_DESC_FLAGS0_NO_AGGR = 1 << 1,
107 HTT_DATA_TX_DESC_FLAGS0_NO_ENCRYPT = 1 << 2,
108 HTT_DATA_TX_DESC_FLAGS0_NO_CLASSIFY = 1 << 3,
109 HTT_DATA_TX_DESC_FLAGS0_RSVD0 = 1 << 4
110#define HTT_DATA_TX_DESC_FLAGS0_PKT_TYPE_MASK 0xE0
111#define HTT_DATA_TX_DESC_FLAGS0_PKT_TYPE_LSB 5
112};
113
114enum htt_data_tx_desc_flags1 {
115#define HTT_DATA_TX_DESC_FLAGS1_VDEV_ID_BITS 6
116#define HTT_DATA_TX_DESC_FLAGS1_VDEV_ID_MASK 0x003F
117#define HTT_DATA_TX_DESC_FLAGS1_VDEV_ID_LSB 0
118#define HTT_DATA_TX_DESC_FLAGS1_EXT_TID_BITS 5
119#define HTT_DATA_TX_DESC_FLAGS1_EXT_TID_MASK 0x07C0
120#define HTT_DATA_TX_DESC_FLAGS1_EXT_TID_LSB 6
121 HTT_DATA_TX_DESC_FLAGS1_POSTPONED = 1 << 11,
122 HTT_DATA_TX_DESC_FLAGS1_MORE_IN_BATCH = 1 << 12,
123 HTT_DATA_TX_DESC_FLAGS1_CKSUM_L3_OFFLOAD = 1 << 13,
124 HTT_DATA_TX_DESC_FLAGS1_CKSUM_L4_OFFLOAD = 1 << 14,
125 HTT_DATA_TX_DESC_FLAGS1_RSVD1 = 1 << 15
126};
127
128enum htt_data_tx_ext_tid {
129 HTT_DATA_TX_EXT_TID_NON_QOS_MCAST_BCAST = 16,
130 HTT_DATA_TX_EXT_TID_MGMT = 17,
131 HTT_DATA_TX_EXT_TID_INVALID = 31
132};
133
134#define HTT_INVALID_PEERID 0xFFFF
135
136/*
137 * htt_data_tx_desc - used for data tx path
138 *
139 * Note: vdev_id irrelevant for pkt_type == raw and no_classify == 1.
140 * ext_tid: for qos-data frames (0-15), see %HTT_DATA_TX_EXT_TID_
141 * for special kinds of tids
142 * postponed: only for HL hosts. indicates if this is a resend
143 * (HL hosts manage queues on the host )
144 * more_in_batch: only for HL hosts. indicates if more packets are
145 * pending. this allows target to wait and aggregate
Michal Kazior8d6d3622014-11-24 14:58:31 +0100146 * freq: 0 means home channel of given vdev. intended for offchannel
Kalle Valo5e3dd152013-06-12 20:52:10 +0300147 */
148struct htt_data_tx_desc {
149 u8 flags0; /* %HTT_DATA_TX_DESC_FLAGS0_ */
150 __le16 flags1; /* %HTT_DATA_TX_DESC_FLAGS1_ */
151 __le16 len;
152 __le16 id;
153 __le32 frags_paddr;
Michal Kazior8d6d3622014-11-24 14:58:31 +0100154 __le16 peerid;
155 __le16 freq;
Kalle Valo5e3dd152013-06-12 20:52:10 +0300156 u8 prefetch[0]; /* start of frame, for FW classification engine */
157} __packed;
158
159enum htt_rx_ring_flags {
160 HTT_RX_RING_FLAGS_MAC80211_HDR = 1 << 0,
161 HTT_RX_RING_FLAGS_MSDU_PAYLOAD = 1 << 1,
162 HTT_RX_RING_FLAGS_PPDU_START = 1 << 2,
163 HTT_RX_RING_FLAGS_PPDU_END = 1 << 3,
164 HTT_RX_RING_FLAGS_MPDU_START = 1 << 4,
165 HTT_RX_RING_FLAGS_MPDU_END = 1 << 5,
166 HTT_RX_RING_FLAGS_MSDU_START = 1 << 6,
167 HTT_RX_RING_FLAGS_MSDU_END = 1 << 7,
168 HTT_RX_RING_FLAGS_RX_ATTENTION = 1 << 8,
169 HTT_RX_RING_FLAGS_FRAG_INFO = 1 << 9,
170 HTT_RX_RING_FLAGS_UNICAST_RX = 1 << 10,
171 HTT_RX_RING_FLAGS_MULTICAST_RX = 1 << 11,
172 HTT_RX_RING_FLAGS_CTRL_RX = 1 << 12,
173 HTT_RX_RING_FLAGS_MGMT_RX = 1 << 13,
174 HTT_RX_RING_FLAGS_NULL_RX = 1 << 14,
175 HTT_RX_RING_FLAGS_PHY_DATA_RX = 1 << 15
176};
177
Michal Kaziorfe2407a2014-11-27 11:12:43 +0100178#define HTT_RX_RING_SIZE_MIN 128
179#define HTT_RX_RING_SIZE_MAX 2048
180
Kalle Valo5e3dd152013-06-12 20:52:10 +0300181struct htt_rx_ring_setup_ring {
182 __le32 fw_idx_shadow_reg_paddr;
183 __le32 rx_ring_base_paddr;
184 __le16 rx_ring_len; /* in 4-byte words */
185 __le16 rx_ring_bufsize; /* rx skb size - in bytes */
186 __le16 flags; /* %HTT_RX_RING_FLAGS_ */
187 __le16 fw_idx_init_val;
188
189 /* the following offsets are in 4-byte units */
190 __le16 mac80211_hdr_offset;
191 __le16 msdu_payload_offset;
192 __le16 ppdu_start_offset;
193 __le16 ppdu_end_offset;
194 __le16 mpdu_start_offset;
195 __le16 mpdu_end_offset;
196 __le16 msdu_start_offset;
197 __le16 msdu_end_offset;
198 __le16 rx_attention_offset;
199 __le16 frag_info_offset;
200} __packed;
201
202struct htt_rx_ring_setup_hdr {
203 u8 num_rings; /* supported values: 1, 2 */
204 __le16 rsvd0;
205} __packed;
206
207struct htt_rx_ring_setup {
208 struct htt_rx_ring_setup_hdr hdr;
209 struct htt_rx_ring_setup_ring rings[0];
210} __packed;
211
212/*
213 * htt_stats_req - request target to send specified statistics
214 *
215 * @msg_type: hardcoded %HTT_H2T_MSG_TYPE_STATS_REQ
216 * @upload_types: see %htt_dbg_stats_type. this is 24bit field actually
217 * so make sure its little-endian.
218 * @reset_types: see %htt_dbg_stats_type. this is 24bit field actually
219 * so make sure its little-endian.
220 * @cfg_val: stat_type specific configuration
221 * @stat_type: see %htt_dbg_stats_type
222 * @cookie_lsb: used for confirmation message from target->host
223 * @cookie_msb: ditto as %cookie
224 */
225struct htt_stats_req {
226 u8 upload_types[3];
227 u8 rsvd0;
228 u8 reset_types[3];
229 struct {
230 u8 mpdu_bytes;
231 u8 mpdu_num_msdus;
232 u8 msdu_bytes;
233 } __packed;
234 u8 stat_type;
235 __le32 cookie_lsb;
236 __le32 cookie_msb;
237} __packed;
238
239#define HTT_STATS_REQ_CFG_STAT_TYPE_INVALID 0xff
240
241/*
242 * htt_oob_sync_req - request out-of-band sync
243 *
244 * The HTT SYNC tells the target to suspend processing of subsequent
245 * HTT host-to-target messages until some other target agent locally
246 * informs the target HTT FW that the current sync counter is equal to
247 * or greater than (in a modulo sense) the sync counter specified in
248 * the SYNC message.
249 *
250 * This allows other host-target components to synchronize their operation
251 * with HTT, e.g. to ensure that tx frames don't get transmitted until a
252 * security key has been downloaded to and activated by the target.
253 * In the absence of any explicit synchronization counter value
254 * specification, the target HTT FW will use zero as the default current
255 * sync value.
256 *
257 * The HTT target FW will suspend its host->target message processing as long
258 * as 0 < (in-band sync counter - out-of-band sync counter) & 0xff < 128.
259 */
260struct htt_oob_sync_req {
261 u8 sync_count;
262 __le16 rsvd0;
263} __packed;
264
Kalle Valo5e3dd152013-06-12 20:52:10 +0300265struct htt_aggr_conf {
266 u8 max_num_ampdu_subframes;
Janusz Dziedzicd3856232014-06-02 21:19:46 +0300267 /* amsdu_subframes is limited by 0x1F mask */
268 u8 max_num_amsdu_subframes;
Kalle Valo5e3dd152013-06-12 20:52:10 +0300269} __packed;
270
271#define HTT_MGMT_FRM_HDR_DOWNLOAD_LEN 32
272
273struct htt_mgmt_tx_desc {
274 u8 pad[sizeof(u32) - sizeof(struct htt_cmd_hdr)];
275 __le32 msdu_paddr;
276 __le32 desc_id;
277 __le32 len;
278 __le32 vdev_id;
279 u8 hdr[HTT_MGMT_FRM_HDR_DOWNLOAD_LEN];
280} __packed;
281
282enum htt_mgmt_tx_status {
283 HTT_MGMT_TX_STATUS_OK = 0,
284 HTT_MGMT_TX_STATUS_RETRY = 1,
285 HTT_MGMT_TX_STATUS_DROP = 2
286};
287
288/*=== target -> host messages ===============================================*/
289
Rajkumar Manoharan8348db22015-03-25 13:12:27 +0200290enum htt_main_t2h_msg_type {
291 HTT_MAIN_T2H_MSG_TYPE_VERSION_CONF = 0x0,
292 HTT_MAIN_T2H_MSG_TYPE_RX_IND = 0x1,
293 HTT_MAIN_T2H_MSG_TYPE_RX_FLUSH = 0x2,
294 HTT_MAIN_T2H_MSG_TYPE_PEER_MAP = 0x3,
295 HTT_MAIN_T2H_MSG_TYPE_PEER_UNMAP = 0x4,
296 HTT_MAIN_T2H_MSG_TYPE_RX_ADDBA = 0x5,
297 HTT_MAIN_T2H_MSG_TYPE_RX_DELBA = 0x6,
298 HTT_MAIN_T2H_MSG_TYPE_TX_COMPL_IND = 0x7,
299 HTT_MAIN_T2H_MSG_TYPE_PKTLOG = 0x8,
300 HTT_MAIN_T2H_MSG_TYPE_STATS_CONF = 0x9,
301 HTT_MAIN_T2H_MSG_TYPE_RX_FRAG_IND = 0xa,
302 HTT_MAIN_T2H_MSG_TYPE_SEC_IND = 0xb,
303 HTT_MAIN_T2H_MSG_TYPE_TX_INSPECT_IND = 0xd,
304 HTT_MAIN_T2H_MSG_TYPE_MGMT_TX_COMPL_IND = 0xe,
305 HTT_MAIN_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND = 0xf,
306 HTT_MAIN_T2H_MSG_TYPE_RX_PN_IND = 0x10,
307 HTT_MAIN_T2H_MSG_TYPE_RX_OFFLOAD_DELIVER_IND = 0x11,
308 HTT_MAIN_T2H_MSG_TYPE_TEST,
309 /* keep this last */
310 HTT_MAIN_T2H_NUM_MSGS
311};
312
313enum htt_10x_t2h_msg_type {
314 HTT_10X_T2H_MSG_TYPE_VERSION_CONF = 0x0,
315 HTT_10X_T2H_MSG_TYPE_RX_IND = 0x1,
316 HTT_10X_T2H_MSG_TYPE_RX_FLUSH = 0x2,
317 HTT_10X_T2H_MSG_TYPE_PEER_MAP = 0x3,
318 HTT_10X_T2H_MSG_TYPE_PEER_UNMAP = 0x4,
319 HTT_10X_T2H_MSG_TYPE_RX_ADDBA = 0x5,
320 HTT_10X_T2H_MSG_TYPE_RX_DELBA = 0x6,
321 HTT_10X_T2H_MSG_TYPE_TX_COMPL_IND = 0x7,
322 HTT_10X_T2H_MSG_TYPE_PKTLOG = 0x8,
323 HTT_10X_T2H_MSG_TYPE_STATS_CONF = 0x9,
324 HTT_10X_T2H_MSG_TYPE_RX_FRAG_IND = 0xa,
325 HTT_10X_T2H_MSG_TYPE_SEC_IND = 0xb,
326 HTT_10X_T2H_MSG_TYPE_RC_UPDATE_IND = 0xc,
327 HTT_10X_T2H_MSG_TYPE_TX_INSPECT_IND = 0xd,
328 HTT_10X_T2H_MSG_TYPE_TEST = 0xe,
329 HTT_10X_T2H_MSG_TYPE_CHAN_CHANGE = 0xf,
330 HTT_10X_T2H_MSG_TYPE_AGGR_CONF = 0x11,
331 HTT_10X_T2H_MSG_TYPE_STATS_NOUPLOAD = 0x12,
332 HTT_10X_T2H_MSG_TYPE_MGMT_TX_COMPL_IND = 0x13,
333 /* keep this last */
334 HTT_10X_T2H_NUM_MSGS
335};
336
337enum htt_tlv_t2h_msg_type {
338 HTT_TLV_T2H_MSG_TYPE_VERSION_CONF = 0x0,
339 HTT_TLV_T2H_MSG_TYPE_RX_IND = 0x1,
340 HTT_TLV_T2H_MSG_TYPE_RX_FLUSH = 0x2,
341 HTT_TLV_T2H_MSG_TYPE_PEER_MAP = 0x3,
342 HTT_TLV_T2H_MSG_TYPE_PEER_UNMAP = 0x4,
343 HTT_TLV_T2H_MSG_TYPE_RX_ADDBA = 0x5,
344 HTT_TLV_T2H_MSG_TYPE_RX_DELBA = 0x6,
345 HTT_TLV_T2H_MSG_TYPE_TX_COMPL_IND = 0x7,
346 HTT_TLV_T2H_MSG_TYPE_PKTLOG = 0x8,
347 HTT_TLV_T2H_MSG_TYPE_STATS_CONF = 0x9,
348 HTT_TLV_T2H_MSG_TYPE_RX_FRAG_IND = 0xa,
349 HTT_TLV_T2H_MSG_TYPE_SEC_IND = 0xb,
350 HTT_TLV_T2H_MSG_TYPE_RC_UPDATE_IND = 0xc, /* deprecated */
351 HTT_TLV_T2H_MSG_TYPE_TX_INSPECT_IND = 0xd,
352 HTT_TLV_T2H_MSG_TYPE_MGMT_TX_COMPL_IND = 0xe,
353 HTT_TLV_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND = 0xf,
354 HTT_TLV_T2H_MSG_TYPE_RX_PN_IND = 0x10,
355 HTT_TLV_T2H_MSG_TYPE_RX_OFFLOAD_DELIVER_IND = 0x11,
356 HTT_TLV_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND = 0x12,
Michal Kaziorc545070e2015-01-24 12:14:48 +0200357 /* 0x13 reservd */
Rajkumar Manoharan8348db22015-03-25 13:12:27 +0200358 HTT_TLV_T2H_MSG_TYPE_WDI_IPA_OP_RESPONSE = 0x14,
359 HTT_TLV_T2H_MSG_TYPE_CHAN_CHANGE = 0x15,
360 HTT_TLV_T2H_MSG_TYPE_RX_OFLD_PKT_ERR = 0x16,
361 HTT_TLV_T2H_MSG_TYPE_TEST,
362 /* keep this last */
363 HTT_TLV_T2H_NUM_MSGS
364};
Michal Kaziorc545070e2015-01-24 12:14:48 +0200365
Raja Mani721ad3c2015-06-22 20:22:24 +0530366enum htt_10_4_t2h_msg_type {
367 HTT_10_4_T2H_MSG_TYPE_VERSION_CONF = 0x0,
368 HTT_10_4_T2H_MSG_TYPE_RX_IND = 0x1,
369 HTT_10_4_T2H_MSG_TYPE_RX_FLUSH = 0x2,
370 HTT_10_4_T2H_MSG_TYPE_PEER_MAP = 0x3,
371 HTT_10_4_T2H_MSG_TYPE_PEER_UNMAP = 0x4,
372 HTT_10_4_T2H_MSG_TYPE_RX_ADDBA = 0x5,
373 HTT_10_4_T2H_MSG_TYPE_RX_DELBA = 0x6,
374 HTT_10_4_T2H_MSG_TYPE_TX_COMPL_IND = 0x7,
375 HTT_10_4_T2H_MSG_TYPE_PKTLOG = 0x8,
376 HTT_10_4_T2H_MSG_TYPE_STATS_CONF = 0x9,
377 HTT_10_4_T2H_MSG_TYPE_RX_FRAG_IND = 0xa,
378 HTT_10_4_T2H_MSG_TYPE_SEC_IND = 0xb,
379 HTT_10_4_T2H_MSG_TYPE_RC_UPDATE_IND = 0xc,
380 HTT_10_4_T2H_MSG_TYPE_TX_INSPECT_IND = 0xd,
381 HTT_10_4_T2H_MSG_TYPE_MGMT_TX_COMPL_IND = 0xe,
382 HTT_10_4_T2H_MSG_TYPE_CHAN_CHANGE = 0xf,
383 HTT_10_4_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND = 0x10,
384 HTT_10_4_T2H_MSG_TYPE_RX_PN_IND = 0x11,
385 HTT_10_4_T2H_MSG_TYPE_RX_OFFLOAD_DELIVER_IND = 0x12,
386 HTT_10_4_T2H_MSG_TYPE_TEST = 0x13,
387 HTT_10_4_T2H_MSG_TYPE_EN_STATS = 0x14,
388 HTT_10_4_T2H_MSG_TYPE_AGGR_CONF = 0x15,
389 HTT_10_4_T2H_MSG_TYPE_TX_FETCH_IND = 0x16,
390 HTT_10_4_T2H_MSG_TYPE_TX_FETCH_CONF = 0x17,
391 HTT_10_4_T2H_MSG_TYPE_STATS_NOUPLOAD = 0x18,
392 /* 0x19 to 0x2f are reserved */
393 HTT_10_4_T2H_MSG_TYPE_TX_LOW_LATENCY_IND = 0x30,
394 /* keep this last */
395 HTT_10_4_T2H_NUM_MSGS
396};
397
Rajkumar Manoharan8348db22015-03-25 13:12:27 +0200398enum htt_t2h_msg_type {
399 HTT_T2H_MSG_TYPE_VERSION_CONF,
400 HTT_T2H_MSG_TYPE_RX_IND,
401 HTT_T2H_MSG_TYPE_RX_FLUSH,
402 HTT_T2H_MSG_TYPE_PEER_MAP,
403 HTT_T2H_MSG_TYPE_PEER_UNMAP,
404 HTT_T2H_MSG_TYPE_RX_ADDBA,
405 HTT_T2H_MSG_TYPE_RX_DELBA,
406 HTT_T2H_MSG_TYPE_TX_COMPL_IND,
407 HTT_T2H_MSG_TYPE_PKTLOG,
408 HTT_T2H_MSG_TYPE_STATS_CONF,
409 HTT_T2H_MSG_TYPE_RX_FRAG_IND,
410 HTT_T2H_MSG_TYPE_SEC_IND,
411 HTT_T2H_MSG_TYPE_RC_UPDATE_IND,
412 HTT_T2H_MSG_TYPE_TX_INSPECT_IND,
413 HTT_T2H_MSG_TYPE_MGMT_TX_COMPLETION,
414 HTT_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND,
415 HTT_T2H_MSG_TYPE_RX_PN_IND,
416 HTT_T2H_MSG_TYPE_RX_OFFLOAD_DELIVER_IND,
417 HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND,
418 HTT_T2H_MSG_TYPE_WDI_IPA_OP_RESPONSE,
419 HTT_T2H_MSG_TYPE_CHAN_CHANGE,
420 HTT_T2H_MSG_TYPE_RX_OFLD_PKT_ERR,
421 HTT_T2H_MSG_TYPE_AGGR_CONF,
422 HTT_T2H_MSG_TYPE_STATS_NOUPLOAD,
Kalle Valo5e3dd152013-06-12 20:52:10 +0300423 HTT_T2H_MSG_TYPE_TEST,
Raja Mani721ad3c2015-06-22 20:22:24 +0530424 HTT_T2H_MSG_TYPE_EN_STATS,
425 HTT_T2H_MSG_TYPE_TX_FETCH_IND,
426 HTT_T2H_MSG_TYPE_TX_FETCH_CONF,
427 HTT_T2H_MSG_TYPE_TX_LOW_LATENCY_IND,
Kalle Valo5e3dd152013-06-12 20:52:10 +0300428 /* keep this last */
429 HTT_T2H_NUM_MSGS
430};
431
432/*
433 * htt_resp_hdr - header for target-to-host messages
434 *
435 * msg_type: see htt_t2h_msg_type
436 */
437struct htt_resp_hdr {
438 u8 msg_type;
439} __packed;
440
441#define HTT_RESP_HDR_MSG_TYPE_OFFSET 0
442#define HTT_RESP_HDR_MSG_TYPE_MASK 0xff
443#define HTT_RESP_HDR_MSG_TYPE_LSB 0
444
445/* htt_ver_resp - response sent for htt_ver_req */
446struct htt_ver_resp {
447 u8 minor;
448 u8 major;
449 u8 rsvd0;
450} __packed;
451
452struct htt_mgmt_tx_completion {
453 u8 rsvd0;
454 u8 rsvd1;
455 u8 rsvd2;
456 __le32 desc_id;
457 __le32 status;
458} __packed;
459
460#define HTT_RX_INDICATION_INFO0_EXT_TID_MASK (0x3F)
461#define HTT_RX_INDICATION_INFO0_EXT_TID_LSB (0)
462#define HTT_RX_INDICATION_INFO0_FLUSH_VALID (1 << 6)
463#define HTT_RX_INDICATION_INFO0_RELEASE_VALID (1 << 7)
464
465#define HTT_RX_INDICATION_INFO1_FLUSH_START_SEQNO_MASK 0x0000003F
466#define HTT_RX_INDICATION_INFO1_FLUSH_START_SEQNO_LSB 0
467#define HTT_RX_INDICATION_INFO1_FLUSH_END_SEQNO_MASK 0x00000FC0
468#define HTT_RX_INDICATION_INFO1_FLUSH_END_SEQNO_LSB 6
469#define HTT_RX_INDICATION_INFO1_RELEASE_START_SEQNO_MASK 0x0003F000
470#define HTT_RX_INDICATION_INFO1_RELEASE_START_SEQNO_LSB 12
471#define HTT_RX_INDICATION_INFO1_RELEASE_END_SEQNO_MASK 0x00FC0000
472#define HTT_RX_INDICATION_INFO1_RELEASE_END_SEQNO_LSB 18
473#define HTT_RX_INDICATION_INFO1_NUM_MPDU_RANGES_MASK 0xFF000000
474#define HTT_RX_INDICATION_INFO1_NUM_MPDU_RANGES_LSB 24
475
476struct htt_rx_indication_hdr {
477 u8 info0; /* %HTT_RX_INDICATION_INFO0_ */
478 __le16 peer_id;
479 __le32 info1; /* %HTT_RX_INDICATION_INFO1_ */
480} __packed;
481
482#define HTT_RX_INDICATION_INFO0_PHY_ERR_VALID (1 << 0)
483#define HTT_RX_INDICATION_INFO0_LEGACY_RATE_MASK (0x1E)
484#define HTT_RX_INDICATION_INFO0_LEGACY_RATE_LSB (1)
485#define HTT_RX_INDICATION_INFO0_LEGACY_RATE_CCK (1 << 5)
486#define HTT_RX_INDICATION_INFO0_END_VALID (1 << 6)
487#define HTT_RX_INDICATION_INFO0_START_VALID (1 << 7)
488
489#define HTT_RX_INDICATION_INFO1_VHT_SIG_A1_MASK 0x00FFFFFF
490#define HTT_RX_INDICATION_INFO1_VHT_SIG_A1_LSB 0
491#define HTT_RX_INDICATION_INFO1_PREAMBLE_TYPE_MASK 0xFF000000
492#define HTT_RX_INDICATION_INFO1_PREAMBLE_TYPE_LSB 24
493
494#define HTT_RX_INDICATION_INFO2_VHT_SIG_A1_MASK 0x00FFFFFF
495#define HTT_RX_INDICATION_INFO2_VHT_SIG_A1_LSB 0
496#define HTT_RX_INDICATION_INFO2_SERVICE_MASK 0xFF000000
497#define HTT_RX_INDICATION_INFO2_SERVICE_LSB 24
498
499enum htt_rx_legacy_rate {
500 HTT_RX_OFDM_48 = 0,
501 HTT_RX_OFDM_24 = 1,
502 HTT_RX_OFDM_12,
503 HTT_RX_OFDM_6,
504 HTT_RX_OFDM_54,
505 HTT_RX_OFDM_36,
506 HTT_RX_OFDM_18,
507 HTT_RX_OFDM_9,
508
509 /* long preamble */
510 HTT_RX_CCK_11_LP = 0,
511 HTT_RX_CCK_5_5_LP = 1,
512 HTT_RX_CCK_2_LP,
513 HTT_RX_CCK_1_LP,
514 /* short preamble */
515 HTT_RX_CCK_11_SP,
516 HTT_RX_CCK_5_5_SP,
517 HTT_RX_CCK_2_SP
518};
519
520enum htt_rx_legacy_rate_type {
521 HTT_RX_LEGACY_RATE_OFDM = 0,
522 HTT_RX_LEGACY_RATE_CCK
523};
524
525enum htt_rx_preamble_type {
526 HTT_RX_LEGACY = 0x4,
527 HTT_RX_HT = 0x8,
528 HTT_RX_HT_WITH_TXBF = 0x9,
529 HTT_RX_VHT = 0xC,
530 HTT_RX_VHT_WITH_TXBF = 0xD,
531};
532
533/*
534 * Fields: phy_err_valid, phy_err_code, tsf,
535 * usec_timestamp, sub_usec_timestamp
536 * ..are valid only if end_valid == 1.
537 *
538 * Fields: rssi_chains, legacy_rate_type,
539 * legacy_rate_cck, preamble_type, service,
540 * vht_sig_*
541 * ..are valid only if start_valid == 1;
542 */
543struct htt_rx_indication_ppdu {
544 u8 combined_rssi;
545 u8 sub_usec_timestamp;
546 u8 phy_err_code;
547 u8 info0; /* HTT_RX_INDICATION_INFO0_ */
548 struct {
549 u8 pri20_db;
550 u8 ext20_db;
551 u8 ext40_db;
552 u8 ext80_db;
553 } __packed rssi_chains[4];
554 __le32 tsf;
555 __le32 usec_timestamp;
556 __le32 info1; /* HTT_RX_INDICATION_INFO1_ */
557 __le32 info2; /* HTT_RX_INDICATION_INFO2_ */
558} __packed;
559
560enum htt_rx_mpdu_status {
561 HTT_RX_IND_MPDU_STATUS_UNKNOWN = 0x0,
562 HTT_RX_IND_MPDU_STATUS_OK,
563 HTT_RX_IND_MPDU_STATUS_ERR_FCS,
564 HTT_RX_IND_MPDU_STATUS_ERR_DUP,
565 HTT_RX_IND_MPDU_STATUS_ERR_REPLAY,
566 HTT_RX_IND_MPDU_STATUS_ERR_INV_PEER,
567 /* only accept EAPOL frames */
568 HTT_RX_IND_MPDU_STATUS_UNAUTH_PEER,
569 HTT_RX_IND_MPDU_STATUS_OUT_OF_SYNC,
570 /* Non-data in promiscous mode */
571 HTT_RX_IND_MPDU_STATUS_MGMT_CTRL,
572 HTT_RX_IND_MPDU_STATUS_TKIP_MIC_ERR,
573 HTT_RX_IND_MPDU_STATUS_DECRYPT_ERR,
574 HTT_RX_IND_MPDU_STATUS_MPDU_LENGTH_ERR,
575 HTT_RX_IND_MPDU_STATUS_ENCRYPT_REQUIRED_ERR,
576 HTT_RX_IND_MPDU_STATUS_PRIVACY_ERR,
577
578 /*
579 * MISC: discard for unspecified reasons.
580 * Leave this enum value last.
581 */
582 HTT_RX_IND_MPDU_STATUS_ERR_MISC = 0xFF
583};
584
585struct htt_rx_indication_mpdu_range {
586 u8 mpdu_count;
587 u8 mpdu_range_status; /* %htt_rx_mpdu_status */
588 u8 pad0;
589 u8 pad1;
590} __packed;
591
592struct htt_rx_indication_prefix {
593 __le16 fw_rx_desc_bytes;
594 u8 pad0;
595 u8 pad1;
596};
597
598struct htt_rx_indication {
599 struct htt_rx_indication_hdr hdr;
600 struct htt_rx_indication_ppdu ppdu;
601 struct htt_rx_indication_prefix prefix;
602
603 /*
604 * the following fields are both dynamically sized, so
605 * take care addressing them
606 */
607
608 /* the size of this is %fw_rx_desc_bytes */
609 struct fw_rx_desc_base fw_desc;
610
611 /*
612 * %mpdu_ranges starts after &%prefix + roundup(%fw_rx_desc_bytes, 4)
613 * and has %num_mpdu_ranges elements.
614 */
615 struct htt_rx_indication_mpdu_range mpdu_ranges[0];
616} __packed;
617
618static inline struct htt_rx_indication_mpdu_range *
619 htt_rx_ind_get_mpdu_ranges(struct htt_rx_indication *rx_ind)
620{
621 void *ptr = rx_ind;
622
623 ptr += sizeof(rx_ind->hdr)
624 + sizeof(rx_ind->ppdu)
625 + sizeof(rx_ind->prefix)
626 + roundup(__le16_to_cpu(rx_ind->prefix.fw_rx_desc_bytes), 4);
627 return ptr;
628}
629
630enum htt_rx_flush_mpdu_status {
631 HTT_RX_FLUSH_MPDU_DISCARD = 0,
632 HTT_RX_FLUSH_MPDU_REORDER = 1,
633};
634
635/*
636 * htt_rx_flush - discard or reorder given range of mpdus
637 *
638 * Note: host must check if all sequence numbers between
639 * [seq_num_start, seq_num_end-1] are valid.
640 */
641struct htt_rx_flush {
642 __le16 peer_id;
643 u8 tid;
644 u8 rsvd0;
645 u8 mpdu_status; /* %htt_rx_flush_mpdu_status */
646 u8 seq_num_start; /* it is 6 LSBs of 802.11 seq no */
647 u8 seq_num_end; /* it is 6 LSBs of 802.11 seq no */
648};
649
650struct htt_rx_peer_map {
651 u8 vdev_id;
652 __le16 peer_id;
653 u8 addr[6];
654 u8 rsvd0;
655 u8 rsvd1;
656} __packed;
657
658struct htt_rx_peer_unmap {
659 u8 rsvd0;
660 __le16 peer_id;
661} __packed;
662
663enum htt_security_types {
664 HTT_SECURITY_NONE,
665 HTT_SECURITY_WEP128,
666 HTT_SECURITY_WEP104,
667 HTT_SECURITY_WEP40,
668 HTT_SECURITY_TKIP,
669 HTT_SECURITY_TKIP_NOMIC,
670 HTT_SECURITY_AES_CCMP,
671 HTT_SECURITY_WAPI,
672
673 HTT_NUM_SECURITY_TYPES /* keep this last! */
674};
675
676enum htt_security_flags {
677#define HTT_SECURITY_TYPE_MASK 0x7F
678#define HTT_SECURITY_TYPE_LSB 0
679 HTT_SECURITY_IS_UNICAST = 1 << 7
680};
681
682struct htt_security_indication {
683 union {
684 /* dont use bitfields; undefined behaviour */
685 u8 flags; /* %htt_security_flags */
686 struct {
687 u8 security_type:7, /* %htt_security_types */
688 is_unicast:1;
689 } __packed;
690 } __packed;
691 __le16 peer_id;
692 u8 michael_key[8];
693 u8 wapi_rsc[16];
694} __packed;
695
696#define HTT_RX_BA_INFO0_TID_MASK 0x000F
697#define HTT_RX_BA_INFO0_TID_LSB 0
698#define HTT_RX_BA_INFO0_PEER_ID_MASK 0xFFF0
699#define HTT_RX_BA_INFO0_PEER_ID_LSB 4
700
701struct htt_rx_addba {
702 u8 window_size;
703 __le16 info0; /* %HTT_RX_BA_INFO0_ */
704} __packed;
705
706struct htt_rx_delba {
707 u8 rsvd0;
708 __le16 info0; /* %HTT_RX_BA_INFO0_ */
709} __packed;
710
711enum htt_data_tx_status {
712 HTT_DATA_TX_STATUS_OK = 0,
713 HTT_DATA_TX_STATUS_DISCARD = 1,
714 HTT_DATA_TX_STATUS_NO_ACK = 2,
715 HTT_DATA_TX_STATUS_POSTPONE = 3, /* HL only */
716 HTT_DATA_TX_STATUS_DOWNLOAD_FAIL = 128
717};
718
719enum htt_data_tx_flags {
720#define HTT_DATA_TX_STATUS_MASK 0x07
721#define HTT_DATA_TX_STATUS_LSB 0
722#define HTT_DATA_TX_TID_MASK 0x78
723#define HTT_DATA_TX_TID_LSB 3
724 HTT_DATA_TX_TID_INVALID = 1 << 7
725};
726
727#define HTT_TX_COMPL_INV_MSDU_ID 0xFFFF
728
729struct htt_data_tx_completion {
730 union {
731 u8 flags;
732 struct {
733 u8 status:3,
734 tid:4,
735 tid_invalid:1;
736 } __packed;
737 } __packed;
738 u8 num_msdus;
739 u8 rsvd0;
740 __le16 msdus[0]; /* variable length based on %num_msdus */
741} __packed;
742
743struct htt_tx_compl_ind_base {
744 u32 hdr;
745 u16 payload[1/*or more*/];
746} __packed;
747
748struct htt_rc_tx_done_params {
749 u32 rate_code;
750 u32 rate_code_flags;
751 u32 flags;
752 u32 num_enqued; /* 1 for non-AMPDU */
753 u32 num_retries;
754 u32 num_failed; /* for AMPDU */
755 u32 ack_rssi;
756 u32 time_stamp;
757 u32 is_probe;
758};
759
760struct htt_rc_update {
761 u8 vdev_id;
762 __le16 peer_id;
763 u8 addr[6];
764 u8 num_elems;
765 u8 rsvd0;
766 struct htt_rc_tx_done_params params[0]; /* variable length %num_elems */
767} __packed;
768
769/* see htt_rx_indication for similar fields and descriptions */
770struct htt_rx_fragment_indication {
771 union {
772 u8 info0; /* %HTT_RX_FRAG_IND_INFO0_ */
773 struct {
774 u8 ext_tid:5,
775 flush_valid:1;
776 } __packed;
777 } __packed;
778 __le16 peer_id;
779 __le32 info1; /* %HTT_RX_FRAG_IND_INFO1_ */
780 __le16 fw_rx_desc_bytes;
781 __le16 rsvd0;
782
783 u8 fw_msdu_rx_desc[0];
784} __packed;
785
786#define HTT_RX_FRAG_IND_INFO0_EXT_TID_MASK 0x1F
787#define HTT_RX_FRAG_IND_INFO0_EXT_TID_LSB 0
788#define HTT_RX_FRAG_IND_INFO0_FLUSH_VALID_MASK 0x20
789#define HTT_RX_FRAG_IND_INFO0_FLUSH_VALID_LSB 5
790
791#define HTT_RX_FRAG_IND_INFO1_FLUSH_SEQ_NUM_START_MASK 0x0000003F
792#define HTT_RX_FRAG_IND_INFO1_FLUSH_SEQ_NUM_START_LSB 0
793#define HTT_RX_FRAG_IND_INFO1_FLUSH_SEQ_NUM_END_MASK 0x00000FC0
794#define HTT_RX_FRAG_IND_INFO1_FLUSH_SEQ_NUM_END_LSB 6
795
Michal Kaziorc545070e2015-01-24 12:14:48 +0200796struct htt_rx_pn_ind {
797 __le16 peer_id;
798 u8 tid;
799 u8 seqno_start;
800 u8 seqno_end;
801 u8 pn_ie_count;
802 u8 reserved;
803 u8 pn_ies[0];
804} __packed;
805
806struct htt_rx_offload_msdu {
807 __le16 msdu_len;
808 __le16 peer_id;
809 u8 vdev_id;
810 u8 tid;
811 u8 fw_desc;
812 u8 payload[0];
813} __packed;
814
815struct htt_rx_offload_ind {
816 u8 reserved;
817 __le16 msdu_count;
818} __packed;
819
820struct htt_rx_in_ord_msdu_desc {
821 __le32 msdu_paddr;
822 __le16 msdu_len;
823 u8 fw_desc;
824 u8 reserved;
825} __packed;
826
827struct htt_rx_in_ord_ind {
828 u8 info;
829 __le16 peer_id;
830 u8 vdev_id;
831 u8 reserved;
832 __le16 msdu_count;
833 struct htt_rx_in_ord_msdu_desc msdu_descs[0];
834} __packed;
835
836#define HTT_RX_IN_ORD_IND_INFO_TID_MASK 0x0000001f
837#define HTT_RX_IN_ORD_IND_INFO_TID_LSB 0
838#define HTT_RX_IN_ORD_IND_INFO_OFFLOAD_MASK 0x00000020
839#define HTT_RX_IN_ORD_IND_INFO_OFFLOAD_LSB 5
840#define HTT_RX_IN_ORD_IND_INFO_FRAG_MASK 0x00000040
841#define HTT_RX_IN_ORD_IND_INFO_FRAG_LSB 6
842
Kalle Valo5e3dd152013-06-12 20:52:10 +0300843/*
844 * target -> host test message definition
845 *
846 * The following field definitions describe the format of the test
847 * message sent from the target to the host.
848 * The message consists of a 4-octet header, followed by a variable
849 * number of 32-bit integer values, followed by a variable number
850 * of 8-bit character values.
851 *
852 * |31 16|15 8|7 0|
853 * |-----------------------------------------------------------|
854 * | num chars | num ints | msg type |
855 * |-----------------------------------------------------------|
856 * | int 0 |
857 * |-----------------------------------------------------------|
858 * | int 1 |
859 * |-----------------------------------------------------------|
860 * | ... |
861 * |-----------------------------------------------------------|
862 * | char 3 | char 2 | char 1 | char 0 |
863 * |-----------------------------------------------------------|
864 * | | | ... | char 4 |
865 * |-----------------------------------------------------------|
866 * - MSG_TYPE
867 * Bits 7:0
868 * Purpose: identifies this as a test message
869 * Value: HTT_MSG_TYPE_TEST
870 * - NUM_INTS
871 * Bits 15:8
872 * Purpose: indicate how many 32-bit integers follow the message header
873 * - NUM_CHARS
874 * Bits 31:16
875 * Purpose: indicate how many 8-bit charaters follow the series of integers
876 */
877struct htt_rx_test {
878 u8 num_ints;
879 __le16 num_chars;
880
881 /* payload consists of 2 lists:
882 * a) num_ints * sizeof(__le32)
883 * b) num_chars * sizeof(u8) aligned to 4bytes */
884 u8 payload[0];
885} __packed;
886
887static inline __le32 *htt_rx_test_get_ints(struct htt_rx_test *rx_test)
888{
889 return (__le32 *)rx_test->payload;
890}
891
892static inline u8 *htt_rx_test_get_chars(struct htt_rx_test *rx_test)
893{
894 return rx_test->payload + (rx_test->num_ints * sizeof(__le32));
895}
896
897/*
898 * target -> host packet log message
899 *
900 * The following field definitions describe the format of the packet log
901 * message sent from the target to the host.
902 * The message consists of a 4-octet header,followed by a variable number
903 * of 32-bit character values.
904 *
905 * |31 24|23 16|15 8|7 0|
906 * |-----------------------------------------------------------|
907 * | | | | msg type |
908 * |-----------------------------------------------------------|
909 * | payload |
910 * |-----------------------------------------------------------|
911 * - MSG_TYPE
912 * Bits 7:0
913 * Purpose: identifies this as a test message
914 * Value: HTT_MSG_TYPE_PACKETLOG
915 */
916struct htt_pktlog_msg {
917 u8 pad[3];
Rajkumar Manoharanbfdd7932014-10-03 08:02:40 +0300918 u8 payload[0];
Kalle Valo5e3dd152013-06-12 20:52:10 +0300919} __packed;
920
921struct htt_dbg_stats_rx_reorder_stats {
922 /* Non QoS MPDUs received */
923 __le32 deliver_non_qos;
924
925 /* MPDUs received in-order */
926 __le32 deliver_in_order;
927
928 /* Flush due to reorder timer expired */
929 __le32 deliver_flush_timeout;
930
931 /* Flush due to move out of window */
932 __le32 deliver_flush_oow;
933
934 /* Flush due to DELBA */
935 __le32 deliver_flush_delba;
936
937 /* MPDUs dropped due to FCS error */
938 __le32 fcs_error;
939
940 /* MPDUs dropped due to monitor mode non-data packet */
941 __le32 mgmt_ctrl;
942
943 /* MPDUs dropped due to invalid peer */
944 __le32 invalid_peer;
945
946 /* MPDUs dropped due to duplication (non aggregation) */
947 __le32 dup_non_aggr;
948
949 /* MPDUs dropped due to processed before */
950 __le32 dup_past;
951
952 /* MPDUs dropped due to duplicate in reorder queue */
953 __le32 dup_in_reorder;
954
955 /* Reorder timeout happened */
956 __le32 reorder_timeout;
957
958 /* invalid bar ssn */
959 __le32 invalid_bar_ssn;
960
961 /* reorder reset due to bar ssn */
962 __le32 ssn_reset;
963};
964
965struct htt_dbg_stats_wal_tx_stats {
966 /* Num HTT cookies queued to dispatch list */
967 __le32 comp_queued;
968
969 /* Num HTT cookies dispatched */
970 __le32 comp_delivered;
971
972 /* Num MSDU queued to WAL */
973 __le32 msdu_enqued;
974
975 /* Num MPDU queue to WAL */
976 __le32 mpdu_enqued;
977
978 /* Num MSDUs dropped by WMM limit */
979 __le32 wmm_drop;
980
981 /* Num Local frames queued */
982 __le32 local_enqued;
983
984 /* Num Local frames done */
985 __le32 local_freed;
986
987 /* Num queued to HW */
988 __le32 hw_queued;
989
990 /* Num PPDU reaped from HW */
991 __le32 hw_reaped;
992
993 /* Num underruns */
994 __le32 underrun;
995
996 /* Num PPDUs cleaned up in TX abort */
997 __le32 tx_abort;
998
999 /* Num MPDUs requed by SW */
1000 __le32 mpdus_requed;
1001
1002 /* excessive retries */
1003 __le32 tx_ko;
1004
1005 /* data hw rate code */
1006 __le32 data_rc;
1007
1008 /* Scheduler self triggers */
1009 __le32 self_triggers;
1010
1011 /* frames dropped due to excessive sw retries */
1012 __le32 sw_retry_failure;
1013
1014 /* illegal rate phy errors */
1015 __le32 illgl_rate_phy_err;
1016
1017 /* wal pdev continous xretry */
1018 __le32 pdev_cont_xretry;
1019
1020 /* wal pdev continous xretry */
1021 __le32 pdev_tx_timeout;
1022
1023 /* wal pdev resets */
1024 __le32 pdev_resets;
1025
1026 __le32 phy_underrun;
1027
1028 /* MPDU is more than txop limit */
1029 __le32 txop_ovf;
1030} __packed;
1031
1032struct htt_dbg_stats_wal_rx_stats {
1033 /* Cnts any change in ring routing mid-ppdu */
1034 __le32 mid_ppdu_route_change;
1035
1036 /* Total number of statuses processed */
1037 __le32 status_rcvd;
1038
1039 /* Extra frags on rings 0-3 */
1040 __le32 r0_frags;
1041 __le32 r1_frags;
1042 __le32 r2_frags;
1043 __le32 r3_frags;
1044
1045 /* MSDUs / MPDUs delivered to HTT */
1046 __le32 htt_msdus;
1047 __le32 htt_mpdus;
1048
1049 /* MSDUs / MPDUs delivered to local stack */
1050 __le32 loc_msdus;
1051 __le32 loc_mpdus;
1052
1053 /* AMSDUs that have more MSDUs than the status ring size */
1054 __le32 oversize_amsdu;
1055
1056 /* Number of PHY errors */
1057 __le32 phy_errs;
1058
1059 /* Number of PHY errors drops */
1060 __le32 phy_err_drop;
1061
1062 /* Number of mpdu errors - FCS, MIC, ENC etc. */
1063 __le32 mpdu_errs;
1064} __packed;
1065
1066struct htt_dbg_stats_wal_peer_stats {
1067 __le32 dummy; /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
1068} __packed;
1069
1070struct htt_dbg_stats_wal_pdev_txrx {
1071 struct htt_dbg_stats_wal_tx_stats tx_stats;
1072 struct htt_dbg_stats_wal_rx_stats rx_stats;
1073 struct htt_dbg_stats_wal_peer_stats peer_stats;
1074} __packed;
1075
1076struct htt_dbg_stats_rx_rate_info {
1077 __le32 mcs[10];
1078 __le32 sgi[10];
1079 __le32 nss[4];
1080 __le32 stbc[10];
1081 __le32 bw[3];
1082 __le32 pream[6];
1083 __le32 ldpc;
1084 __le32 txbf;
1085};
1086
1087/*
1088 * htt_dbg_stats_status -
1089 * present - The requested stats have been delivered in full.
1090 * This indicates that either the stats information was contained
1091 * in its entirety within this message, or else this message
1092 * completes the delivery of the requested stats info that was
1093 * partially delivered through earlier STATS_CONF messages.
1094 * partial - The requested stats have been delivered in part.
1095 * One or more subsequent STATS_CONF messages with the same
1096 * cookie value will be sent to deliver the remainder of the
1097 * information.
1098 * error - The requested stats could not be delivered, for example due
1099 * to a shortage of memory to construct a message holding the
1100 * requested stats.
1101 * invalid - The requested stat type is either not recognized, or the
1102 * target is configured to not gather the stats type in question.
1103 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1104 * series_done - This special value indicates that no further stats info
1105 * elements are present within a series of stats info elems
1106 * (within a stats upload confirmation message).
1107 */
1108enum htt_dbg_stats_status {
1109 HTT_DBG_STATS_STATUS_PRESENT = 0,
1110 HTT_DBG_STATS_STATUS_PARTIAL = 1,
1111 HTT_DBG_STATS_STATUS_ERROR = 2,
1112 HTT_DBG_STATS_STATUS_INVALID = 3,
1113 HTT_DBG_STATS_STATUS_SERIES_DONE = 7
1114};
1115
1116/*
1117 * target -> host statistics upload
1118 *
1119 * The following field definitions describe the format of the HTT target
1120 * to host stats upload confirmation message.
1121 * The message contains a cookie echoed from the HTT host->target stats
1122 * upload request, which identifies which request the confirmation is
1123 * for, and a series of tag-length-value stats information elements.
1124 * The tag-length header for each stats info element also includes a
1125 * status field, to indicate whether the request for the stat type in
1126 * question was fully met, partially met, unable to be met, or invalid
1127 * (if the stat type in question is disabled in the target).
1128 * A special value of all 1's in this status field is used to indicate
1129 * the end of the series of stats info elements.
1130 *
1131 *
1132 * |31 16|15 8|7 5|4 0|
1133 * |------------------------------------------------------------|
1134 * | reserved | msg type |
1135 * |------------------------------------------------------------|
1136 * | cookie LSBs |
1137 * |------------------------------------------------------------|
1138 * | cookie MSBs |
1139 * |------------------------------------------------------------|
1140 * | stats entry length | reserved | S |stat type|
1141 * |------------------------------------------------------------|
1142 * | |
1143 * | type-specific stats info |
1144 * | |
1145 * |------------------------------------------------------------|
1146 * | stats entry length | reserved | S |stat type|
1147 * |------------------------------------------------------------|
1148 * | |
1149 * | type-specific stats info |
1150 * | |
1151 * |------------------------------------------------------------|
1152 * | n/a | reserved | 111 | n/a |
1153 * |------------------------------------------------------------|
1154 * Header fields:
1155 * - MSG_TYPE
1156 * Bits 7:0
1157 * Purpose: identifies this is a statistics upload confirmation message
1158 * Value: 0x9
1159 * - COOKIE_LSBS
1160 * Bits 31:0
1161 * Purpose: Provide a mechanism to match a target->host stats confirmation
1162 * message with its preceding host->target stats request message.
1163 * Value: LSBs of the opaque cookie specified by the host-side requestor
1164 * - COOKIE_MSBS
1165 * Bits 31:0
1166 * Purpose: Provide a mechanism to match a target->host stats confirmation
1167 * message with its preceding host->target stats request message.
1168 * Value: MSBs of the opaque cookie specified by the host-side requestor
1169 *
1170 * Stats Information Element tag-length header fields:
1171 * - STAT_TYPE
1172 * Bits 4:0
1173 * Purpose: identifies the type of statistics info held in the
1174 * following information element
1175 * Value: htt_dbg_stats_type
1176 * - STATUS
1177 * Bits 7:5
1178 * Purpose: indicate whether the requested stats are present
1179 * Value: htt_dbg_stats_status, including a special value (0x7) to mark
1180 * the completion of the stats entry series
1181 * - LENGTH
1182 * Bits 31:16
1183 * Purpose: indicate the stats information size
1184 * Value: This field specifies the number of bytes of stats information
1185 * that follows the element tag-length header.
1186 * It is expected but not required that this length is a multiple of
1187 * 4 bytes. Even if the length is not an integer multiple of 4, the
1188 * subsequent stats entry header will begin on a 4-byte aligned
1189 * boundary.
1190 */
1191
1192#define HTT_STATS_CONF_ITEM_INFO_STAT_TYPE_MASK 0x1F
1193#define HTT_STATS_CONF_ITEM_INFO_STAT_TYPE_LSB 0
1194#define HTT_STATS_CONF_ITEM_INFO_STATUS_MASK 0xE0
1195#define HTT_STATS_CONF_ITEM_INFO_STATUS_LSB 5
1196
1197struct htt_stats_conf_item {
1198 union {
1199 u8 info;
1200 struct {
1201 u8 stat_type:5; /* %HTT_DBG_STATS_ */
1202 u8 status:3; /* %HTT_DBG_STATS_STATUS_ */
1203 } __packed;
1204 } __packed;
1205 u8 pad;
1206 __le16 length;
1207 u8 payload[0]; /* roundup(length, 4) long */
1208} __packed;
1209
1210struct htt_stats_conf {
1211 u8 pad[3];
1212 __le32 cookie_lsb;
1213 __le32 cookie_msb;
1214
1215 /* each item has variable length! */
1216 struct htt_stats_conf_item items[0];
1217} __packed;
1218
1219static inline struct htt_stats_conf_item *htt_stats_conf_next_item(
1220 const struct htt_stats_conf_item *item)
1221{
1222 return (void *)item + sizeof(*item) + roundup(item->length, 4);
1223}
Kalle Valo8cc7f262014-09-14 12:50:39 +03001224
Kalle Valo5e3dd152013-06-12 20:52:10 +03001225/*
1226 * host -> target FRAG DESCRIPTOR/MSDU_EXT DESC bank
1227 *
1228 * The following field definitions describe the format of the HTT host
1229 * to target frag_desc/msdu_ext bank configuration message.
1230 * The message contains the based address and the min and max id of the
1231 * MSDU_EXT/FRAG_DESC that will be used by the HTT to map MSDU DESC and
1232 * MSDU_EXT/FRAG_DESC.
1233 * HTT will use id in HTT descriptor instead sending the frag_desc_ptr.
1234 * For QCA988X HW the firmware will use fragment_desc_ptr but in WIFI2.0
1235 * the hardware does the mapping/translation.
1236 *
1237 * Total banks that can be configured is configured to 16.
1238 *
1239 * This should be called before any TX has be initiated by the HTT
1240 *
1241 * |31 16|15 8|7 5|4 0|
1242 * |------------------------------------------------------------|
1243 * | DESC_SIZE | NUM_BANKS | RES |SWP|pdev| msg type |
1244 * |------------------------------------------------------------|
1245 * | BANK0_BASE_ADDRESS |
1246 * |------------------------------------------------------------|
1247 * | ... |
1248 * |------------------------------------------------------------|
1249 * | BANK15_BASE_ADDRESS |
1250 * |------------------------------------------------------------|
1251 * | BANK0_MAX_ID | BANK0_MIN_ID |
1252 * |------------------------------------------------------------|
1253 * | ... |
1254 * |------------------------------------------------------------|
1255 * | BANK15_MAX_ID | BANK15_MIN_ID |
1256 * |------------------------------------------------------------|
1257 * Header fields:
1258 * - MSG_TYPE
1259 * Bits 7:0
1260 * Value: 0x6
1261 * - BANKx_BASE_ADDRESS
1262 * Bits 31:0
1263 * Purpose: Provide a mechanism to specify the base address of the MSDU_EXT
1264 * bank physical/bus address.
1265 * - BANKx_MIN_ID
1266 * Bits 15:0
1267 * Purpose: Provide a mechanism to specify the min index that needs to
1268 * mapped.
1269 * - BANKx_MAX_ID
1270 * Bits 31:16
1271 * Purpose: Provide a mechanism to specify the max index that needs to
1272 *
1273 */
1274struct htt_frag_desc_bank_id {
1275 __le16 bank_min_id;
1276 __le16 bank_max_id;
1277} __packed;
1278
1279/* real is 16 but it wouldn't fit in the max htt message size
1280 * so we use a conservatively safe value for now */
1281#define HTT_FRAG_DESC_BANK_MAX 4
1282
1283#define HTT_FRAG_DESC_BANK_CFG_INFO_PDEV_ID_MASK 0x03
1284#define HTT_FRAG_DESC_BANK_CFG_INFO_PDEV_ID_LSB 0
1285#define HTT_FRAG_DESC_BANK_CFG_INFO_SWAP (1 << 2)
1286
1287struct htt_frag_desc_bank_cfg {
1288 u8 info; /* HTT_FRAG_DESC_BANK_CFG_INFO_ */
1289 u8 num_banks;
1290 u8 desc_size;
1291 __le32 bank_base_addrs[HTT_FRAG_DESC_BANK_MAX];
1292 struct htt_frag_desc_bank_id bank_id[HTT_FRAG_DESC_BANK_MAX];
1293} __packed;
1294
1295union htt_rx_pn_t {
1296 /* WEP: 24-bit PN */
1297 u32 pn24;
1298
1299 /* TKIP or CCMP: 48-bit PN */
1300 u_int64_t pn48;
1301
1302 /* WAPI: 128-bit PN */
1303 u_int64_t pn128[2];
1304};
1305
1306struct htt_cmd {
1307 struct htt_cmd_hdr hdr;
1308 union {
1309 struct htt_ver_req ver_req;
1310 struct htt_mgmt_tx_desc mgmt_tx;
1311 struct htt_data_tx_desc data_tx;
1312 struct htt_rx_ring_setup rx_setup;
1313 struct htt_stats_req stats_req;
1314 struct htt_oob_sync_req oob_sync_req;
1315 struct htt_aggr_conf aggr_conf;
1316 struct htt_frag_desc_bank_cfg frag_desc_bank_cfg;
1317 };
1318} __packed;
1319
1320struct htt_resp {
1321 struct htt_resp_hdr hdr;
1322 union {
1323 struct htt_ver_resp ver_resp;
1324 struct htt_mgmt_tx_completion mgmt_tx_completion;
1325 struct htt_data_tx_completion data_tx_completion;
1326 struct htt_rx_indication rx_ind;
1327 struct htt_rx_fragment_indication rx_frag_ind;
1328 struct htt_rx_peer_map peer_map;
1329 struct htt_rx_peer_unmap peer_unmap;
1330 struct htt_rx_flush rx_flush;
1331 struct htt_rx_addba rx_addba;
1332 struct htt_rx_delba rx_delba;
1333 struct htt_security_indication security_indication;
1334 struct htt_rc_update rc_update;
1335 struct htt_rx_test rx_test;
1336 struct htt_pktlog_msg pktlog_msg;
1337 struct htt_stats_conf stats_conf;
Michal Kaziorc545070e2015-01-24 12:14:48 +02001338 struct htt_rx_pn_ind rx_pn_ind;
1339 struct htt_rx_offload_ind rx_offload_ind;
1340 struct htt_rx_in_ord_ind rx_in_ord_ind;
Kalle Valo5e3dd152013-06-12 20:52:10 +03001341 };
1342} __packed;
1343
Kalle Valo5e3dd152013-06-12 20:52:10 +03001344/*** host side structures follow ***/
1345
1346struct htt_tx_done {
1347 u32 msdu_id;
1348 bool discard;
1349 bool no_ack;
Sujith Manoharan55314fc2015-04-01 22:53:21 +03001350 bool success;
Kalle Valo5e3dd152013-06-12 20:52:10 +03001351};
1352
1353struct htt_peer_map_event {
1354 u8 vdev_id;
1355 u16 peer_id;
1356 u8 addr[ETH_ALEN];
1357};
1358
1359struct htt_peer_unmap_event {
1360 u16 peer_id;
1361};
1362
Michal Kaziora16942e2014-02-27 18:50:04 +02001363struct ath10k_htt_txbuf {
1364 struct htt_data_tx_desc_frag frags[2];
1365 struct ath10k_htc_hdr htc_hdr;
1366 struct htt_cmd_hdr cmd_hdr;
1367 struct htt_data_tx_desc cmd_tx;
1368} __packed;
1369
Kalle Valo5e3dd152013-06-12 20:52:10 +03001370struct ath10k_htt {
1371 struct ath10k *ar;
1372 enum ath10k_htc_ep_id eid;
1373
Kalle Valo5e3dd152013-06-12 20:52:10 +03001374 u8 target_version_major;
1375 u8 target_version_minor;
1376 struct completion target_version_received;
Rajkumar Manoharan8348db22015-03-25 13:12:27 +02001377 enum ath10k_fw_htt_op_version op_version;
1378
1379 const enum htt_t2h_msg_type *t2h_msg_types;
1380 u32 t2h_msg_types_max;
Kalle Valo5e3dd152013-06-12 20:52:10 +03001381
1382 struct {
1383 /*
1384 * Ring of network buffer objects - This ring is
1385 * used exclusively by the host SW. This ring
1386 * mirrors the dev_addrs_ring that is shared
1387 * between the host SW and the MAC HW. The host SW
1388 * uses this netbufs ring to locate the network
1389 * buffer objects whose data buffers the HW has
1390 * filled.
1391 */
1392 struct sk_buff **netbufs_ring;
Michal Kaziorc545070e2015-01-24 12:14:48 +02001393
1394 /* This is used only with firmware supporting IN_ORD_IND.
1395 *
1396 * With Full Rx Reorder the HTT Rx Ring is more of a temporary
1397 * buffer ring from which buffer addresses are copied by the
1398 * firmware to MAC Rx ring. Firmware then delivers IN_ORD_IND
1399 * pointing to specific (re-ordered) buffers.
1400 *
1401 * FIXME: With kernel generic hashing functions there's a lot
1402 * of hash collisions for sk_buffs.
1403 */
1404 bool in_ord_rx;
1405 DECLARE_HASHTABLE(skb_table, 4);
1406
Kalle Valo5e3dd152013-06-12 20:52:10 +03001407 /*
1408 * Ring of buffer addresses -
1409 * This ring holds the "physical" device address of the
1410 * rx buffers the host SW provides for the MAC HW to
1411 * fill.
1412 */
1413 __le32 *paddrs_ring;
1414
1415 /*
1416 * Base address of ring, as a "physical" device address
1417 * rather than a CPU address.
1418 */
1419 dma_addr_t base_paddr;
1420
1421 /* how many elems in the ring (power of 2) */
1422 int size;
1423
1424 /* size - 1 */
1425 unsigned size_mask;
1426
1427 /* how many rx buffers to keep in the ring */
1428 int fill_level;
1429
1430 /* how many rx buffers (full+empty) are in the ring */
1431 int fill_cnt;
1432
1433 /*
1434 * alloc_idx - where HTT SW has deposited empty buffers
1435 * This is allocated in consistent mem, so that the FW can
1436 * read this variable, and program the HW's FW_IDX reg with
1437 * the value of this shadow register.
1438 */
1439 struct {
1440 __le32 *vaddr;
1441 dma_addr_t paddr;
1442 } alloc_idx;
1443
1444 /* where HTT SW has processed bufs filled by rx MAC DMA */
1445 struct {
1446 unsigned msdu_payld;
1447 } sw_rd_idx;
1448
1449 /*
1450 * refill_retry_timer - timer triggered when the ring is
1451 * not refilled to the level expected
1452 */
1453 struct timer_list refill_retry_timer;
1454
1455 /* Protects access to all rx ring buffer state variables */
1456 spinlock_t lock;
1457 } rx_ring;
1458
1459 unsigned int prefetch_len;
1460
Michal Kazior89d6d832015-01-24 12:14:51 +02001461 /* Protects access to pending_tx, num_pending_tx */
Kalle Valo5e3dd152013-06-12 20:52:10 +03001462 spinlock_t tx_lock;
1463 int max_num_pending_tx;
1464 int num_pending_tx;
Michal Kazior89d6d832015-01-24 12:14:51 +02001465 struct idr pending_tx;
Kalle Valo5e3dd152013-06-12 20:52:10 +03001466 wait_queue_head_t empty_tx_wq;
Michal Kaziora16942e2014-02-27 18:50:04 +02001467 struct dma_pool *tx_pool;
Kalle Valo5e3dd152013-06-12 20:52:10 +03001468
1469 /* set if host-fw communication goes haywire
1470 * used to avoid further failures */
1471 bool rx_confused;
Michal Kazior6e712d42013-09-24 10:18:36 +02001472 struct tasklet_struct rx_replenish_task;
Michal Kazior6c5151a2014-02-27 18:50:04 +02001473
1474 /* This is used to group tx/rx completions separately and process them
1475 * in batches to reduce cache stalls */
1476 struct tasklet_struct txrx_compl_task;
1477 struct sk_buff_head tx_compl_q;
1478 struct sk_buff_head rx_compl_q;
Michal Kaziorc545070e2015-01-24 12:14:48 +02001479 struct sk_buff_head rx_in_ord_compl_q;
Janusz Dziedzic6df92a32014-03-24 21:24:57 +01001480
1481 /* rx_status template */
1482 struct ieee80211_rx_status rx_status;
Raja Manid9156b52015-06-22 20:22:27 +05301483
1484 struct {
1485 dma_addr_t paddr;
1486 struct htt_msdu_ext_desc *vaddr;
1487 } frag_desc;
Kalle Valo5e3dd152013-06-12 20:52:10 +03001488};
1489
1490#define RX_HTT_HDR_STATUS_LEN 64
1491
1492/* This structure layout is programmed via rx ring setup
1493 * so that FW knows how to transfer the rx descriptor to the host.
1494 * Buffers like this are placed on the rx ring. */
1495struct htt_rx_desc {
1496 union {
1497 /* This field is filled on the host using the msdu buffer
1498 * from htt_rx_indication */
1499 struct fw_rx_desc_base fw_desc;
1500 u32 pad;
1501 } __packed;
1502 struct {
1503 struct rx_attention attention;
1504 struct rx_frag_info frag_info;
1505 struct rx_mpdu_start mpdu_start;
1506 struct rx_msdu_start msdu_start;
1507 struct rx_msdu_end msdu_end;
1508 struct rx_mpdu_end mpdu_end;
1509 struct rx_ppdu_start ppdu_start;
1510 struct rx_ppdu_end ppdu_end;
1511 } __packed;
1512 u8 rx_hdr_status[RX_HTT_HDR_STATUS_LEN];
1513 u8 msdu_payload[0];
1514};
1515
1516#define HTT_RX_DESC_ALIGN 8
1517
1518#define HTT_MAC_ADDR_LEN 6
1519
1520/*
1521 * FIX THIS
1522 * Should be: sizeof(struct htt_host_rx_desc) + max rx MSDU size,
1523 * rounded up to a cache line size.
1524 */
1525#define HTT_RX_BUF_SIZE 1920
1526#define HTT_RX_MSDU_SIZE (HTT_RX_BUF_SIZE - (int)sizeof(struct htt_rx_desc))
1527
Michal Kazior6e712d42013-09-24 10:18:36 +02001528/* Refill a bunch of RX buffers for each refill round so that FW/HW can handle
1529 * aggregated traffic more nicely. */
1530#define ATH10K_HTT_MAX_NUM_REFILL 16
1531
Kalle Valo5e3dd152013-06-12 20:52:10 +03001532/*
1533 * DMA_MAP expects the buffer to be an integral number of cache lines.
1534 * Rather than checking the actual cache line size, this code makes a
1535 * conservative estimate of what the cache line size could be.
1536 */
1537#define HTT_LOG2_MAX_CACHE_LINE_SIZE 7 /* 2^7 = 128 */
1538#define HTT_MAX_CACHE_LINE_SIZE_MASK ((1 << HTT_LOG2_MAX_CACHE_LINE_SIZE) - 1)
1539
Michal Kazior95bf21f2014-05-16 17:15:39 +03001540int ath10k_htt_connect(struct ath10k_htt *htt);
1541int ath10k_htt_init(struct ath10k *ar);
1542int ath10k_htt_setup(struct ath10k_htt *htt);
Kalle Valo5e3dd152013-06-12 20:52:10 +03001543
Michal Kazior95bf21f2014-05-16 17:15:39 +03001544int ath10k_htt_tx_alloc(struct ath10k_htt *htt);
1545void ath10k_htt_tx_free(struct ath10k_htt *htt);
1546
1547int ath10k_htt_rx_alloc(struct ath10k_htt *htt);
Michal Kaziorc545070e2015-01-24 12:14:48 +02001548int ath10k_htt_rx_ring_refill(struct ath10k *ar);
Michal Kazior95bf21f2014-05-16 17:15:39 +03001549void ath10k_htt_rx_free(struct ath10k_htt *htt);
1550
Kalle Valo5e3dd152013-06-12 20:52:10 +03001551void ath10k_htt_htc_tx_complete(struct ath10k *ar, struct sk_buff *skb);
1552void ath10k_htt_t2h_msg_handler(struct ath10k *ar, struct sk_buff *skb);
1553int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt);
Kalle Valoa3d135e2013-09-03 11:44:10 +03001554int ath10k_htt_h2t_stats_req(struct ath10k_htt *htt, u8 mask, u64 cookie);
Raja Manid9156b52015-06-22 20:22:27 +05301555int ath10k_htt_send_frag_desc_bank_cfg(struct ath10k_htt *htt);
Kalle Valo5e3dd152013-06-12 20:52:10 +03001556int ath10k_htt_send_rx_ring_cfg_ll(struct ath10k_htt *htt);
Janusz Dziedzicd3856232014-06-02 21:19:46 +03001557int ath10k_htt_h2t_aggr_cfg_msg(struct ath10k_htt *htt,
1558 u8 max_subfrms_ampdu,
1559 u8 max_subfrms_amsdu);
Kalle Valo5e3dd152013-06-12 20:52:10 +03001560
1561void __ath10k_htt_tx_dec_pending(struct ath10k_htt *htt);
Michal Kazior89d6d832015-01-24 12:14:51 +02001562int ath10k_htt_tx_alloc_msdu_id(struct ath10k_htt *htt, struct sk_buff *skb);
Kalle Valo5e3dd152013-06-12 20:52:10 +03001563void ath10k_htt_tx_free_msdu_id(struct ath10k_htt *htt, u16 msdu_id);
1564int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *);
1565int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *);
Michal Kazior6c5151a2014-02-27 18:50:04 +02001566
Kalle Valo5e3dd152013-06-12 20:52:10 +03001567#endif