blob: e42c1833a952dda79b7a8b9bb216ba08bd92c969 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kapil Guptab3a981b2016-06-26 13:36:51 +05302 * Copyright (c) 2012-2013, 2016 The Linux Foundation. All rights reserved.
Kiet Lam1ed83fc2014-02-19 01:15:45 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
Kiet Lamaa8e15a2014-02-11 23:30:06 -080020 */
Kiet Lam1ed83fc2014-02-19 01:15:45 -080021
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
Jeff Johnson295189b2012-06-20 16:38:30 -070028#ifndef WLAN_QCT_WDI_BD_H
29#define WLAN_QCT_WDI_BD_H
30
31/*===========================================================================
32
33 W L A N D E V I C E A B S T R A C T I O N L A Y E R
34 I N T E R N A L A P I F O R T H E
35 B D H E A D E R D E F I N I T I O N
36
37
38DESCRIPTION
39 This file contains the internal BD definition exposed by the DAL Control
Kiet Lam1ed83fc2014-02-19 01:15:45 -080040 Path Core module to be used by the DAL Data Path Core.
Jeff Johnson295189b2012-06-20 16:38:30 -070041===========================================================================*/
42
43
44/*===========================================================================
45
46 EDIT HISTORY FOR FILE
47
48
49 This section contains comments describing changes made to the module.
50 Notice that changes are listed in reverse chronological order.
51
52
53 $Header:$ $DateTime: $ $Author: $
54
55
56when who what, where, why
57-------- --- ----------------------------------------------------------
5808/19/10 lti Created module.
59
60===========================================================================*/
61
62#include "wlan_qct_pal_type.h"
63
64
65/*=========================================================================
66 BD STRUCTURE Defines
67 =========================================================================*/
68/*---------------------------------------------------------------------------
69 WDI_RxBdType - The format of the RX BD
70---------------------------------------------------------------------------*/
71typedef struct
72{
73 /* 0x00 */
74#ifdef WPT_BIG_BYTE_ENDIAN
75
76 /** (Only used by the DPU)
77 This routing flag indicates the WQ number to which the DPU will push the
78 frame after it finished processing it. */
79 wpt_uint32 dpuRF:8;
80
81 /** This is DPU sig inserted by RXP. Signature on RA's DPU descriptor */
82 wpt_uint32 dpuSignature:3;
83
84 /** When set Sta is authenticated. SW needs to set bit
85 addr2_auth_extract_enable in rxp_config2 register. Then RXP will use bit 3
86 in DPU sig to say whether STA is authenticated or not. In this case only
87 lower 2bits of DPU Sig is valid */
88 wpt_uint32 stAuF:1;
89
90 /** When set address2 is not valid */
91 wpt_uint32 A2HF:1;
92
93 /** When set it indicates TPE has sent the Beacon frame */
94 wpt_uint32 bsf:1;
95
96 /** This bit filled by rxp when set indicates if the current tsf is smaller
97 than received tsf */
98 wpt_uint32 rtsf:1;
Jeff Johnsone7245742012-09-05 17:12:55 -070099
100#ifdef WCN_PRONTO_CSU
101 /** No valid header found during parsing. Therefore no checksum was validated */
102 wpt_uint32 csuNoValHd:1;
103
104 /** 0 = CSU did not verify TCP/UDP (Transport Layer TL) checksum; 1 = CSU verified TCP/UDP checksum */
105 wpt_uint32 csuVerifiedTLChksum:1;
106
107 /** 0 = CSU did not verify IP checksum; 1 = CSU verified IP checksum */
108 wpt_uint32 csuVerifiedIPChksum:1;
109
110 /** 0 = BD field checksum is not valid; 1 = BD field checksum is valid */
111 wpt_uint32 csuChksumValid:1;
112
113 /** 0 = No TCP/UDP checksum error; 1 = Has TCP/UDP checksum error */
114 wpt_uint32 csuTLChksumError:1;
115
116 /** 0 = No IPv4/IPv6 checksum error; 1 = Has IPv4/IPv6 checksum error */
117 wpt_uint32 csuIPChksumError:1;
118#else /*WCN_PRONTO*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700119 /** These two fields are used by SW to carry the Rx Channel number and SCAN bit in RxBD*/
120 wpt_uint32 rxChannel:4;
121 wpt_uint32 scanLearn:1;
Jeff Johnson295189b2012-06-20 16:38:30 -0700122 wpt_uint32 reserved0:1;
Jeff Johnsone7245742012-09-05 17:12:55 -0700123#endif /*WCN_PRONTO*/
124
Jeff Johnson295189b2012-06-20 16:38:30 -0700125 /** LLC Removed
126 This bit is only used in Libra rsvd for Virgo1.0/Virgo2.0
127 Filled by ADU when it is set LLC is removed from packet */
128 wpt_uint32 llcr:1;
129
130 wpt_uint32 umaByPass:1;
131
132 /** This bit is only available in Virgo2.0/libra it is reserved in Virgo1.0
133 Robust Management frame. This bit indicates to DPU that the packet is a
134 robust management frame which requires decryption(this bit is only valid for
135 management unicast encrypted frames)
136 1 - Needs decryption
137 0 - No decryption required */
138 wpt_uint32 rmf:1;
139
140 /**
141 This bit is only in Virgo2.0/libra it is reserved in Virgo 1.0
142 This 1-bit field indicates to DPU Unicast/BC/MC packet
143 0 - Unicast packet
144 1 - Broadcast/Multicast packet
145 This bit is only valid when RMF bit is 1 */
146 wpt_uint32 ub:1;
147
148 /** This is the KEY ID extracted from WEP packets and is used for determine
149 the RX Key Index to use in the DPU Descriptror.
150 This field is 2bits for virgo 1.0
151 And 3 bits in virgo2.0 and Libra
152 In virgo2.0/libra it is 3bits for the BC/MC packets */
153 wpt_uint32 rxKeyId:3;
154
155 /** (Only used by the DPU)
156 No encryption/decryption
157 0: No action
158 1: DPU will not encrypt/decrypt the frame, and discard any encryption
159 related settings in the PDU descriptor. */
160 wpt_uint32 dpuNE:1;
161
162 /**
163 This is only available in libra/virgo2.0 it is reserved for virgo1.0
164 This bit is filled by RXP and modified by ADU
165 This bit indicates to ADU/UMA module that the packet requires 802.11n to
166 802.3 frame translation. Once ADU/UMA is done with translation they
167 overwrite it with 1'b0/1'b1 depending on how the translation resulted
168 When used by ADU
169 0 - No frame translation required
170 1 - Frame Translation required
171 When used by SW
172 0 - Frame translation not done, MPDU header offset points to 802.11 header..
173 1 - Frame translation done ; hence MPDU header offset will point to a
174 802.3 header */
175 wpt_uint32 ft:1;
176
177 /** (Only used by the DPU)
178 BD Type
179 00: 'Generic BD', as indicted above
180 01: De-fragmentation format
181 10-11: Reserved for future use. */
182 wpt_uint32 bdt:2;
183
184#else
185 wpt_uint32 bdt:2;
186 wpt_uint32 ft:1;
187 wpt_uint32 dpuNE:1;
188 wpt_uint32 rxKeyId:3;
189 wpt_uint32 ub:1;
190 wpt_uint32 rmf:1;
Jeff Johnsone7245742012-09-05 17:12:55 -0700191 wpt_uint32 umaByPass:1;
192 wpt_uint32 llcr:1;
193
194#ifdef WCN_PRONTO_CSU
195 wpt_uint32 csuIPChksumError:1;
196 wpt_uint32 csuTLChksumError:1;
197 wpt_uint32 csuChksumValid:1;
198 wpt_uint32 csuVerifiedIPChksum:1;
199 wpt_uint32 csuVerifiedTLChksum:1;
200 wpt_uint32 csuNoValHd:1;
201#else /*WCN_PRONTO*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700202 wpt_uint32 reserved0:1;
203 wpt_uint32 scanLearn:1;
204 wpt_uint32 rxChannel:4;
Jeff Johnsone7245742012-09-05 17:12:55 -0700205#endif /*WCN_PRONTO*/
206
Jeff Johnson295189b2012-06-20 16:38:30 -0700207 wpt_uint32 rtsf:1;
208 wpt_uint32 bsf:1;
209 wpt_uint32 A2HF:1;
210 wpt_uint32 stAuF:1;
211 wpt_uint32 dpuSignature:3;
212 wpt_uint32 dpuRF:8;
213#endif
214
215 /* 0x04 */
216#ifdef WPT_BIG_BYTE_ENDIAN
217
218 /** This is used for AMSDU this is the PDU index of the PDU which is the
219 one before last PDU; for all non AMSDU frames, this field SHALL be 0.
220 Used in ADU (for AMSDU deaggregation) */
221 wpt_uint32 penultimatePduIdx:16;
222
Jeff Johnsone7245742012-09-05 17:12:55 -0700223#ifdef WCN_PRONTO
224 wpt_uint32 aduFeedback:7;
225 wpt_uint32 dpuMagicPacket: 1;
226#else
Jeff Johnson295189b2012-06-20 16:38:30 -0700227 wpt_uint32 aduFeedback:8;
Jeff Johnsone7245742012-09-05 17:12:55 -0700228#endif //WCN_PRONTO
Jeff Johnson295189b2012-06-20 16:38:30 -0700229
230 /** DPU feedback */
231 wpt_uint32 dpuFeedback:8;
232
233#else
234 wpt_uint32 dpuFeedback:8;
Jeff Johnsone7245742012-09-05 17:12:55 -0700235#ifdef WCN_PRONTO
236 wpt_uint32 dpuMagicPacket: 1;
237 wpt_uint32 aduFeedback:7;
238#else
Jeff Johnson295189b2012-06-20 16:38:30 -0700239 wpt_uint32 aduFeedback:8;
Jeff Johnsone7245742012-09-05 17:12:55 -0700240#endif //WCN_PRONTO
Jeff Johnson295189b2012-06-20 16:38:30 -0700241 wpt_uint32 penultimatePduIdx:16;
242#endif
243
244 /* 0x08 */
245#ifdef WPT_BIG_BYTE_ENDIAN
246
247 /** In case PDUs are linked to the BD, this field indicates the index of
248 the first PDU linked to the BD. When PDU count is zero, this field has an
249 undefined value. */
250 wpt_uint32 headPduIdx:16;
251
252 /** In case PDUs are linked to the BD, this field indicates the index of
253 the last PDU. When PDU count is zero, this field has an undefined value.*/
254 wpt_uint32 tailPduIdx:16;
255
256#else
257 wpt_uint32 tailPduIdx:16;
258 wpt_uint32 headPduIdx:16;
259#endif
260
261 /* 0x0c */
262#ifdef WPT_BIG_BYTE_ENDIAN
263
264 /** The length (in number of bytes) of the MPDU header.
265 Limitation: The MPDU header offset + MPDU header length can never go beyond
266 the end of the first PDU */
267 wpt_uint32 mpduHeaderLength:8;
268
269 /** The start byte number of the MPDU header.
270 The byte numbering is done in the BE format. Word 0x0, bits [31:24] has
271 byte index 0. */
272 wpt_uint32 mpduHeaderOffset:8;
273
274 /** The start byte number of the MPDU data.
275 The byte numbering is done in the BE format. Word 0x0, bits [31:24] has
276 byte index 0. Note that this offset can point all the way into the first
277 linked PDU.
278 Limitation: MPDU DATA OFFSET can not point into the 2nd linked PDU */
279 wpt_uint32 mpduDataOffset:9;
280
281 /** The number of PDUs linked to the BD.
282 This field should always indicate the correct amount. */
283 wpt_uint32 pduCount:7;
284#else
285
286 wpt_uint32 pduCount:7;
287 wpt_uint32 mpduDataOffset:9;
288 wpt_uint32 mpduHeaderOffset:8;
289 wpt_uint32 mpduHeaderLength:8;
290#endif
291
292 /* 0x10 */
293#ifdef WPT_BIG_BYTE_ENDIAN
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700294
295 /** This is the length (in number of bytes) of the entire MPDU
Jeff Johnson295189b2012-06-20 16:38:30 -0700296 (header and data). Note that the length does not include FCS field. */
297 wpt_uint32 mpduLength:16;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700298
299#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
300 wpt_uint32 offloadScanLearn:1;
301 wpt_uint32 roamCandidateInd:1;
Jeff Johnsone7245742012-09-05 17:12:55 -0700302#else
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700303 wpt_uint32 reserved22:2;
304#endif
305
306#ifdef WCN_PRONTO
Dino Mycle41bdc942014-06-10 11:30:24 +0530307#ifdef WLAN_FEATURE_EXTSCAN
308 wpt_uint32 extscanBuffer:1;
309#else
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700310 wpt_uint32 reserved3: 1;
Dino Mycle41bdc942014-06-10 11:30:24 +0530311#endif
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700312 wpt_uint32 rxDXEPriorityRouting:1;
313#else
Dino Mycle41bdc942014-06-10 11:30:24 +0530314#ifdef WLAN_FEATURE_EXTSCAN
315 wpt_uint32 extscanBuffer:1;
316 wpt_uint32 reserved3: 1;
317#else
318 wpt_uint32 reserved3: 2;
319#endif
Jeff Johnsone7245742012-09-05 17:12:55 -0700320#endif //WCN_PRONTO
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700321
322
Jeff Johnson295189b2012-06-20 16:38:30 -0700323 /** Traffic Identifier
324 Indicates the traffic class the frame belongs to. For non QoS frames,
325 this field is set to zero. */
326 wpt_uint32 tid:4;
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700327
Jeff Johnson295189b2012-06-20 16:38:30 -0700328 wpt_uint32 reserved4:8;
329#else
330 wpt_uint32 reserved4:8;
331 wpt_uint32 tid:4;
Jeff Johnsone7245742012-09-05 17:12:55 -0700332#ifdef WCN_PRONTO
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700333 wpt_uint32 rxDXEPriorityRouting:1;
Dino Mycle41bdc942014-06-10 11:30:24 +0530334#ifdef WLAN_FEATURE_EXTSCAN
335 wpt_uint32 extscanBuffer:1;
Jeff Johnsone7245742012-09-05 17:12:55 -0700336#else
Dino Mycle41bdc942014-06-10 11:30:24 +0530337 wpt_uint32 reserved3: 1;
338#endif
339#else
340#ifdef WLAN_FEATURE_EXTSCAN
341 wpt_uint32 reserved3: 1;
342 wpt_uint32 extscanBuffer:1;
343#else
344 wpt_uint32 reserved3: 2;
345#endif
Jeff Johnsone7245742012-09-05 17:12:55 -0700346#endif //WCN_PRONTO
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700347#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
348 wpt_uint32 roamCandidateInd:1;
349 wpt_uint32 offloadScanLearn:1;
350#else
351 wpt_uint32 reserved22:2;
352#endif
353
Jeff Johnson295189b2012-06-20 16:38:30 -0700354 wpt_uint32 mpduLength:16;
355#endif
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700356
Jeff Johnson295189b2012-06-20 16:38:30 -0700357 /* 0x14 */
358#ifdef WPT_BIG_BYTE_ENDIAN
359
360 /** (Only used by the DPU)
361 The DPU descriptor index is used to calculate where in memory the DPU can
362 find the DPU descriptor related to this frame. The DPU calculates the
363 address by multiplying this index with the DPU descriptor size and adding
364 the DPU descriptors base address. The DPU descriptor contains information
365 specifying the encryption and compression type and contains references to
366 where encryption keys can be found. */
367 wpt_uint32 dpuDescIdx:8;
368
369 /** The result from the binary address search on the ADDR1 of the incoming
370 frame. See chapter: RXP filter for encoding of this field. */
371 wpt_uint32 addr1Index:8;
372
373 /** The result from the binary address search on the ADDR2 of the incoming
374 frame. See chapter: RXP filter for encoding of this field. */
375 wpt_uint32 addr2Index:8;
376
377 /** The result from the binary address search on the ADDR3 of the incoming
378 frame. See chapter: RXP filter for encoding of this field. */
379 wpt_uint32 addr3Index:8;
380#else
381 wpt_uint32 addr3Index:8;
382 wpt_uint32 addr2Index:8;
383 wpt_uint32 addr1Index:8;
384 wpt_uint32 dpuDescIdx:8;
385#endif
386
387#ifdef WPT_BIG_BYTE_ENDIAN
388
389 /** Indicates Rate Index of packet received */
390 wpt_uint32 rateIndex:9;
391
392 /** An overview of RXP status information related to receiving the frame.*/
393 wpt_uint32 rxpFlags:23;
394
395#else
396
397 wpt_uint32 rxpFlags:23; /* RxP flags*/
398 wpt_uint32 rateIndex:9;
399
400#endif
401 /* 0x1c, 20 */
402 /** The PHY can be programmed to put all the PHY STATS received from the
403 PHY when receiving a frame in the BD. */
404 wpt_uint32 phyStats0; /* PHY status word 0*/
405 wpt_uint32 phyStats1; /* PHY status word 1*/
406
407 /* 0x24 */
408 /** The value of the TSF[31:0] bits at the moment that the RXP start
409 receiving a frame from the PHY RX. */
410 wpt_uint32 mclkRxTimestamp; /* Rx timestamp, microsecond based*/
411
412 /* 0x28~0x38 */
413 /** The bits from the PMI command as received from the PHY RX. */
414 wpt_uint32 pmiCmd4to23[5]; /* PMI cmd rcvd from RxP */
415
416 /* 0x3c */
Jeff Johnsone7245742012-09-05 17:12:55 -0700417#ifdef WCN_PRONTO
418#ifdef WPT_BIG_BYTE_ENDIAN
419 /** The bits from the PMI command as received from the PHY RX. */
420 wpt_uint32 pmiCmd24to25:16;
421
422 /* 16-bit CSU Checksum value for the fragmented receive frames */
423 wpt_uint32 csuChecksum:16;
424#else
425 wpt_uint32 csuChecksum:16;
426 wpt_uint32 pmiCmd24to25:16;
427#endif
428#else /*WCN_PRONTO*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700429 /** The bits from the PMI command as received from the PHY RX. */
430 wpt_uint32 pmiCmd24to25;
Jeff Johnsone7245742012-09-05 17:12:55 -0700431#endif /*WCN_PRONTO*/
432
Jeff Johnson295189b2012-06-20 16:38:30 -0700433 /* 0x40 */
434#ifdef WPT_BIG_BYTE_ENDIAN
435
436 /** Gives commands to software upon which host will perform some commands.
437 Please refer to following RPE document for description of all different
438 values for this field. */
439 wpt_uint32 reorderOpcode:4;
440
441 wpt_uint32 reserved6:12;
442
443 /** Filled by RPE to Indicate to the host up to which slot the host needs
444 to forward the packets to upper Mac layer. This field mostly used for AMDPU
445 packets */
446 wpt_uint32 reorderFwdIdx:6;
447
448 /** Filled by RPE which indicates to the host which one of slots in the
449 available 64 slots should the host Queue the packet. This field only
450 applied to AMPDU packets. */
451 wpt_uint32 reorderSlotIdx:6;
452
Jeff Johnsone7245742012-09-05 17:12:55 -0700453#ifdef WCN_PRONTO
Kapil Guptab3a981b2016-06-26 13:36:51 +0530454 wpt_uint32 reserved7: 1;
455 wpt_uint32 perRoamCndInd:1;
Jeff Johnsone7245742012-09-05 17:12:55 -0700456 wpt_uint32 outOfOrderForward: 1;
457 wpt_uint32 reorderEnable: 1;
Jeff Johnson295189b2012-06-20 16:38:30 -0700458#else
459 wpt_uint32 reserved7:4;
Jeff Johnsone7245742012-09-05 17:12:55 -0700460#endif //WCN_PRONTO
461
462#else
463
464#ifdef WCN_PRONTO
465 wpt_uint32 reorderEnable: 1;
466 wpt_uint32 outOfOrderForward: 1;
Kapil Guptab3a981b2016-06-26 13:36:51 +0530467 wpt_uint32 perRoamCndInd:1;
468 wpt_uint32 reserved7: 1;
Jeff Johnsone7245742012-09-05 17:12:55 -0700469#else
470 wpt_uint32 reserved7:4;
471#endif //WCN_PRONTO
Jeff Johnson295189b2012-06-20 16:38:30 -0700472 wpt_uint32 reorderSlotIdx:6;
473 wpt_uint32 reorderFwdIdx:6;
474 wpt_uint32 reserved6:12;
475 wpt_uint32 reorderOpcode:4;
476#endif
477
478 /* 0x44 */
479#ifdef WPT_BIG_BYTE_ENDIAN
480 /** reserved8 from a hardware perspective.
481 Used by SW to propogate frame type/subtype information */
Kiran Kumar Lokere79540f92013-04-25 17:32:16 -0700482 wpt_uint32 frameTypeSubtype:6;
483 wpt_uint32 rfBand:2;
Jeff Johnson295189b2012-06-20 16:38:30 -0700484
485 /** Filled RPE gives the current sequence number in bitmap */
486 wpt_uint32 currentPktSeqNo:12;
487
488 /** Filled by RPE which gives the sequence number of next expected packet
489 in bitmap */
490 wpt_uint32 expectedPktSeqNo:12;
491#else
492 wpt_uint32 expectedPktSeqNo:12;
493 wpt_uint32 currentPktSeqNo:12;
Kiran Kumar Lokere79540f92013-04-25 17:32:16 -0700494 wpt_uint32 rfBand:2;
495 wpt_uint32 frameTypeSubtype:6;
Jeff Johnson295189b2012-06-20 16:38:30 -0700496#endif
497
498 /* 0x48 */
499#ifdef WPT_BIG_BYTE_ENDIAN
500
501 /** When set it is the AMSDU subframe */
502 wpt_uint32 asf:1;
503
504 /** When set it is the First subframe of the AMSDU packet */
505 wpt_uint32 esf:1;
506
507 /** When set it is the last subframe of the AMSDU packet */
508 wpt_uint32 lsf:1;
509
510 /** When set it indicates an Errored AMSDU packet */
511 wpt_uint32 aef:1;
512
513 wpt_uint32 reserved9:4;
514
515 /** It gives the order in which the AMSDU packet is processed
516 Basically this is a number which increments by one for every AMSDU frame
517 received. Mainly for debugging purpose. */
518 wpt_uint32 processOrder:4;
519
520 /** It is the order of the subframe of AMSDU that is processed by ADU.
521 This is reset to 0 when ADU deaggregates the first subframe from a new
522 AMSDU and increments by 1 for every new subframe deaggregated within the
523 AMSDU, after it reaches 4'hf it stops incrementing. That means host should
524 not rely on this field as index for subframe queuing. Theoretically there
525 can be way more than 16 subframes in an AMSDU. This is only used for debug
526 purpose, SW should use LSF and FSF bits to determine first and last
527 subframes. */
528 wpt_uint32 sybFrameIdx:4;
529
530 /** Filled by ADU this is the total AMSDU size */
531 wpt_uint32 totalMsduSize:16;
532#else
533 wpt_uint32 totalMsduSize:16;
534 wpt_uint32 sybFrameIdx:4;
535 wpt_uint32 processOrder:4;
536 wpt_uint32 reserved9:4;
537 wpt_uint32 aef:1;
538 wpt_uint32 lsf:1;
539 wpt_uint32 esf:1;
540 wpt_uint32 asf:1;
541#endif
542
543} WDI_RxBdType;
544
545/*---------------------------------------------------------------------------
546 WDI_RxFcBdType - The format of the RX special flow control BD
547---------------------------------------------------------------------------*/
548typedef struct
549{
550 /* 0x00 */
551#ifdef WPT_BIG_BYTE_ENDIAN
552
553 /** (Only used by the DPU)
554 This routing flag indicates the WQ number to which the DPU will push the
555 frame after it finished processing it. */
556 wpt_uint32 dpuRF:8;
557
558 /** This is DPU sig inserted by RXP. Signature on RA's DPU descriptor */
559 wpt_uint32 dpuSignature:3;
560
561 /** When set Sta is authenticated. SW needs to set bit
562 addr2_auth_extract_enable in rxp_config2 register. Then RXP will use bit 3
563 in DPU sig to say whether STA is authenticated or not. In this case only
564 lower 2bits of DPU Sig is valid */
565 wpt_uint32 stAuF:1;
566
567 /** When set address2 is not valid */
568 wpt_uint32 A2HF:1;
569
570 /** When set it indicates TPE has sent the Beacon frame */
571 wpt_uint32 bsf:1;
572
573 /** This bit filled by rxp when set indicates if the current tsf is smaller
574 than received tsf */
575 wpt_uint32 rtsf:1;
576
577 /** These two fields are used by SW to carry the Rx Channel number and SCAN bit in RxBD*/
578 wpt_uint32 rxChannel:4;
579 wpt_uint32 scanLearn:1;
580
581 wpt_uint32 reserved0:1;
582
583 /** LLC Removed
584 This bit is only used in Libra rsvd for Virgo1.0/Virgo2.0
585 Filled by ADU when it is set LLC is removed from packet */
586 wpt_uint32 llcr:1;
587
588 wpt_uint32 umaByPass:1;
589
590 /** This bit is only available in Virgo2.0/libra it is reserved in Virgo1.0
591 Robust Management frame. This bit indicates to DPU that the packet is a
592 robust management frame which requires decryption(this bit is only valid for
593 management unicast encrypted frames)
594 1 - Needs decryption
595 0 - No decryption required */
596 wpt_uint32 rmf:1;
597
598 /**
599 This bit is only in Virgo2.0/libra it is reserved in Virgo 1.0
600 This 1-bit field indicates to DPU Unicast/BC/MC packet
601 0 - Unicast packet
602 1 - Broadcast/Multicast packet
603 This bit is only valid when RMF bit is 1 */
604 wpt_uint32 ub:1;
605
606 /** This is the KEY ID extracted from WEP packets and is used for determine
607 the RX Key Index to use in the DPU Descriptror.
608 This field is 2bits for virgo 1.0
609 And 3 bits in virgo2.0 and Libra
610 In virgo2.0/libra it is 3bits for the BC/MC packets */
611 wpt_uint32 rxKeyId:3;
612
613 /** (Only used by the DPU)
614 No encryption/decryption
615 0: No action
616 1: DPU will not encrypt/decrypt the frame, and discard any encryption
617 related settings in the PDU descriptor. */
618 wpt_uint32 dpuNE:1;
619
620 /**
621 This is only available in libra/virgo2.0 it is reserved for virgo1.0
622 This bit is filled by RXP and modified by ADU
623 This bit indicates to ADU/UMA module that the packet requires 802.11n to
624 802.3 frame translation. Once ADU/UMA is done with translation they
625 overwrite it with 1'b0/1'b1 depending on how the translation resulted
626 When used by ADU
627 0 - No frame translation required
628 1 - Frame Translation required
629 When used by SW
630 0 - Frame translation not done, MPDU header offset points to 802.11 header..
631 1 - Frame translation done ; hence MPDU header offset will point to a
632 802.3 header */
633 wpt_uint32 ft:1;
634
635 /** (Only used by the DPU)
636 BD Type
637 00: 'Generic BD', as indicted above
638 01: De-fragmentation format
639 10-11: Reserved for future use. */
640 wpt_uint32 bdt:2;
641
642#else
643 wpt_uint32 bdt:2;
644 wpt_uint32 ft:1;
645 wpt_uint32 dpuNE:1;
646 wpt_uint32 rxKeyId:3;
647 wpt_uint32 ub:1;
648 wpt_uint32 rmf:1;
649 wpt_uint32 reserved1:1;
650 wpt_uint32 llc:1;
651 wpt_uint32 reserved0:1;
652 wpt_uint32 scanLearn:1;
653 wpt_uint32 rxChannel:4;
654 wpt_uint32 rtsf:1;
655 wpt_uint32 bsf:1;
656 wpt_uint32 A2HF:1;
657 wpt_uint32 stAuF:1;
658 wpt_uint32 dpuSignature:3;
659 wpt_uint32 dpuRF:8;
660#endif
661
662 /* 0x04 */
663#ifdef WPT_BIG_BYTE_ENDIAN
664
665 /** This is used for AMSDU this is the PDU index of the PDU which is the
666 one before last PDU; for all non AMSDU frames, this field SHALL be 0.
667 Used in ADU (for AMSDU deaggregation) */
668 wpt_uint32 penultimatePduIdx:16;
669
670 wpt_uint32 aduFeedback:8;
671
672 /** DPU feedback */
673 wpt_uint32 dpuFeedback:8;
674
675#else
676 wpt_uint32 dpuFeedback:8;
677 wpt_uint32 aduFeedback:8;
678 wpt_uint32 penultimatePduIdx:16;
679#endif
680
681 /* 0x08 */
682#ifdef WPT_BIG_BYTE_ENDIAN
683
684 /** In case PDUs are linked to the BD, this field indicates the index of
685 the first PDU linked to the BD. When PDU count is zero, this field has an
686 undefined value. */
687 wpt_uint32 headPduIdx:16;
688
689 /** In case PDUs are linked to the BD, this field indicates the index of
690 the last PDU. When PDU count is zero, this field has an undefined value.*/
691 wpt_uint32 tailPduIdx:16;
692
693#else
694 wpt_uint32 tailPduIdx:16;
695 wpt_uint32 headPduIdx:16;
696#endif
697
698 /* 0x0c */
699#ifdef WPT_BIG_BYTE_ENDIAN
700
701 /** The length (in number of bytes) of the MPDU header.
702 Limitation: The MPDU header offset + MPDU header length can never go beyond
703 the end of the first PDU */
704 wpt_uint32 mpduHeaderLength:8;
705
706 /** The start byte number of the MPDU header.
707 The byte numbering is done in the BE format. Word 0x0, bits [31:24] has
708 byte index 0. */
709 wpt_uint32 mpduHeaderOffset:8;
710
711 /** The start byte number of the MPDU data.
712 The byte numbering is done in the BE format. Word 0x0, bits [31:24] has
713 byte index 0. Note that this offset can point all the way into the first
714 linked PDU.
715 Limitation: MPDU DATA OFFSET can not point into the 2nd linked PDU */
716 wpt_uint32 mpduDataOffset:9;
717
718 /** The number of PDUs linked to the BD.
719 This field should always indicate the correct amount. */
720 wpt_uint32 pduCount:7;
721#else
722
723 wpt_uint32 pduCount:7;
724 wpt_uint32 mpduDataOffset:9;
725 wpt_uint32 mpduHeaderOffset:8;
726 wpt_uint32 mpduHeaderLength:8;
727#endif
728
729 /* 0x10 */
730#ifdef WPT_BIG_BYTE_ENDIAN
731
732 /** This is the length (in number of bytes) of the entire MPDU
733 (header and data). Note that the length does not include FCS field. */
734 wpt_uint32 mpduLength:16;
735
736 wpt_uint32 reserved3:4;
737
738 /** Traffic Identifier
739 Indicates the traffic class the frame belongs to. For non QoS frames,
740 this field is set to zero. */
741 wpt_uint32 tid:4;
742
743 wpt_uint32 reserved4:7;
744 wpt_uint32 fc:1; //if set then its special flow control BD.
745#else
746 wpt_uint32 fc:1; //if set then its special flow control BD.
747 wpt_uint32 reserved4:7;
748 wpt_uint32 tid:4;
749 wpt_uint32 reserved3:4;
750 wpt_uint32 mpduLength:16;
751#endif
752
753 /* 0x14 */
754#ifdef WPT_BIG_BYTE_ENDIAN
755
756 /** (Only used by the DPU)
757 The DPU descriptor index is used to calculate where in memory the DPU can
758 find the DPU descriptor related to this frame. The DPU calculates the
759 address by multiplying this index with the DPU descriptor size and adding
760 the DPU descriptors base address. The DPU descriptor contains information
761 specifying the encryption and compression type and contains references to
762 where encryption keys can be found. */
763 wpt_uint32 dpuDescIdx:8;
764
765 /** The result from the binary address search on the ADDR1 of the incoming
766 frame. See chapter: RXP filter for encoding of this field. */
767 wpt_uint32 addr1Index:8;
768
769 /** The result from the binary address search on the ADDR2 of the incoming
770 frame. See chapter: RXP filter for encoding of this field. */
771 wpt_uint32 addr2Index:8;
772
773 /** The result from the binary address search on the ADDR3 of the incoming
774 frame. See chapter: RXP filter for encoding of this field. */
775 wpt_uint32 addr3Index:8;
776#else
777 wpt_uint32 addr3Index:8;
778 wpt_uint32 addr2Index:8;
779 wpt_uint32 addr1Index:8;
780 wpt_uint32 dpuDescIdx:8;
781#endif
782
783#ifdef WPT_BIG_BYTE_ENDIAN
784
785 /** Indicates Rate Index of packet received */
786 wpt_uint32 rateIndex:9;
787
788 /** An overview of RXP status information related to receiving the frame.*/
789 wpt_uint32 rxpFlags:23;
790
791#else
792
793 wpt_uint32 rxpFlags:23; /* RxP flags*/
794 wpt_uint32 rateIndex:9;
795
796#endif
797 /* 0x1c, 20 */
798 /** The PHY can be programmed to put all the PHY STATS received from the
799 PHY when receiving a frame in the BD. */
800 wpt_uint32 phyStats0; /* PHY status word 0*/
801 wpt_uint32 phyStats1; /* PHY status word 1*/
802
803 /* 0x24 */
804 /** The value of the TSF[31:0] bits at the moment that the RXP start
805 receiving a frame from the PHY RX. */
806 wpt_uint32 mclkRxTimestamp; /* Rx timestamp, microsecond based*/
807
808 /* 0x28 - 0x2c*/
809#ifdef WPT_BIG_BYTE_ENDIAN
810 /** One bit per STA. Bit X for STA id X, X=0~7. When set, corresponding STA is valid in FW's STA table.*/
811 wpt_uint32 fcSTAValidMask:16;
812 /** One bit per STA. Bit X for STA id X, X=0~7. Valid only when corresponding bit in fcSTAValisMask is set.*/
813 wpt_uint32 fcSTAPwrSaveStateMask:16;
814 /** One bit per STA. Bit X for STA id X, X=0~7. Valid only when corresponding bit in fcSTAValisMask is set.
815 When set, corresponding fcSTAThreshEnableMask bit in previous flow control request packet frame was enabled
816 AND the STA TxQ length is lower than configured fcSTAThresh<X> value. */
817 wpt_uint32 fcSTAThreshIndMask:16;
818 /** Bit 0 unit: 1=BD count(Libra SoftAP project default). 0=packet count. Bit 7-1: Reserved */
819 wpt_uint32 fcSTATxQStatus:16;
820#else
821 wpt_uint32 fcSTATxQStatus:16;
822 wpt_uint32 fcSTAThreshIndMask:16;
823 wpt_uint32 fcSTAPwrSaveStateMask:16;
824 wpt_uint32 fcSTAValidMask:16;
825#endif
826 /* 0x30 */
827#ifdef WPT_BIG_BYTE_ENDIAN
828 wpt_uint32 fcStaTxDisabledBitmap:16;
829 wpt_uint32 reserved5:16;
830#else
831 wpt_uint32 reserved5:16;
832 wpt_uint32 fcStaTxDisabledBitmap:16;
833#endif
834
835 // with HAL_NUM_STA as 12
836 /* 0x34 to 0x3A*/
837 wpt_uint32 fcSTATxQLen[12]; // one byte per STA.
838 wpt_uint32 fcSTACurTxRate[12]; // current Tx rate for each sta.
839
840} WDI_FcRxBdType; //flow control BD
841
842/*---------------------------------------------------------------------------
843 WDI_TxBdType - The format of the TX BD
844---------------------------------------------------------------------------*/
845typedef struct
846{
847 /* 0x00 */
848#ifdef WPT_BIG_BYTE_ENDIAN
849 /** (Only used by the DPU) This routing flag indicates the WQ number to
850 which the DPU will push the frame after it finished processing it. */
851 wpt_uint32 dpuRF:8;
852
853 /** DPU signature. Filled by Host in Virgo 1.0 but by ADU in Virgo 2.0 */
854 wpt_uint32 dpuSignature:3;
Jeff Johnsone7245742012-09-05 17:12:55 -0700855
856#ifdef WCN_PRONTO
857 /** Reserved */
858 wpt_uint32 reserved0:2;
859
860 /** Set to '1' to terminate the current AMPDU session. Added based on the
861 request for WiFi Display */
862 wpt_uint32 terminateAMPDU:1;
863
864 /** Bssid index to indicate ADU to use which of the 4 default MAC address
865 to use while 802.3 to 802.11 translation in case search in ADU UMA table
866 fails. The default MAC address should be appropriately programmed in the
867 uma_tx_default_wmacaddr_u(_1,_2,_3) and uma_tx_default_wmacaddr_l(_1,_2,_3)
868 registers */
869 wpt_uint32 umaBssidIdx:2;
870
871 /** Set to 1 to enable uma filling the BD when FT is not enabled.
872 Ignored when FT is enabled. */
873 wpt_uint32 umaBDEnable:1;
874
875 /** (Only used by the CSU)
876 0: No action
877 1: Host will indicate TCP/UPD header start location and provide pseudo header value in BD.
878 */
879 wpt_uint32 csuSWMode:1;
880
881 /** Enable/Disable CSU on TX direction.
882 0: Disable Checksum Unit (CSU) for Transmit.
883 1: Enable
884 */
885 wpt_uint32 csuTXEnable:1;
886
887 /** Enable/Disable Transport layer Checksum in CSU
888 0: Disable TCP UDP checksum generation for TX.
889 1: Enable TCP UDP checksum generation for TX.
890 */
891 wpt_uint32 csuEnableTLCksum:1;
892
893 /** Enable/Disable IP layer Checksum in CSU
894 0: Disable IPv4/IPv6 checksum generation for TX
895 1: Enable IPv4/IPv6 checksum generation for TX
896 */
897 wpt_uint32 csuEnableIPCksum:1;
898
899 /** Filled by CSU to indicate whether transport layer Checksum is generated by CSU or not
900 0: TCP/UDP checksum is being generated for TX.
901 1: TCP/UDP checksum is NOT being generated for TX.
902 */
903 wpt_uint32 csuTLCksumGenerated:1;
904
905 /** Filled by CSU in error scenario
906 1: No valid header found during parsing. Therefore no checksum was validated.
907 0: Valid header found
908 */
909 wpt_uint32 csuNoValidHeader:1;
910#else /*WCN_PRONTO*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700911 wpt_uint32 reserved0:12;
Jeff Johnsone7245742012-09-05 17:12:55 -0700912#endif /*WCN_PRONTO*/
913
Jeff Johnson295189b2012-06-20 16:38:30 -0700914 /** Only available in Virgo 2.0 and reserved in Virgo 1.0.
915 This bit indicates to DPU that the packet is a robust management frame
916 which requires encryption(this bit is only valid for certain management
917 frames)
918 1 - Needs encryption
919 0 - No encrytion required
920 It is only set when Privacy bit=1 AND type/subtype=Deauth, Action,
921 Disassoc. Otherwise it should always be 0. */
922 wpt_uint32 rmf:1;
923
924 /** This bit is only in Virgo2.0/libra it is reserved in Virgo 1.0
925 This 1-bit field indicates to DPU Unicast/BC/MC packet
926 0 - Unicast packet
927 1 - Broadcast/Multicast packet
928 This bit is valid only if RMF bit is set */
929 wpt_uint32 ub:1;
930
931 wpt_uint32 reserved1:1;
932
933 /** This bit is only in Virgo2.0/libra it is reserved in Virgo 1.0
934 This bit indicates TPE has to assert the TX complete interrupt.
935 0 - no interrupt
936 1 - generate interrupt */
937 wpt_uint32 txComplete1:1;
938 wpt_uint32 fwTxComplete0:1;
939
940 /** (Only used by the DPU)
941 No encryption/decryption
942 0: No action
943 1: DPU will not encrypt/decrypt the frame, and discard any encryption
944 related settings in the PDU descriptor. */
945 wpt_uint32 dpuNE:1;
946
947
948 /** This is only available in libra/virgo2.0 it is reserved for virgo1.0
949 This bit indicates to ADU/UMA module that the packet requires 802.11n
950 to 802.3 frame translation. When used by ADU
951 0 - No frame translation required
952 1 - Frame Translation required */
953 wpt_uint32 ft:1;
954
955 /** BD Type
956 00: 'Generic BD', as indicted above
957 01: De-fragmentation format
958 10-11: Reserved for future use. */
959 wpt_uint32 bdt:2;
960#else
961 wpt_uint32 bdt:2;
962 wpt_uint32 ft:1;
963 wpt_uint32 dpuNE:1;
964 wpt_uint32 fwTxComplete0:1;
965 wpt_uint32 txComplete1:1;
966 wpt_uint32 reserved1:1;
967 wpt_uint32 ub:1;
968 wpt_uint32 rmf:1;
Jeff Johnsone7245742012-09-05 17:12:55 -0700969#ifdef WCN_PRONTO
970 wpt_uint32 csuNoValidHeader:1;
971 wpt_uint32 csuTLCksumGenerated:1;
972 wpt_uint32 csuEnableIPCksum:1;
973 wpt_uint32 csuEnableTLCksum:1;
974 wpt_uint32 csuTXEnable:1;
975 wpt_uint32 csuSWMode:1;
976 wpt_uint32 umaBDEnable:1;
977 wpt_uint32 umaBssidIdx:2;
978 wpt_uint32 terminateAMPDU:1;
979 wpt_uint32 reserved0:2;
980#else /*WCN_PRONTO*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700981 wpt_uint32 reserved0:12;
Jeff Johnsone7245742012-09-05 17:12:55 -0700982#endif /*WCN_PRONTO*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700983 wpt_uint32 dpuSignature:3;
984 wpt_uint32 dpuRF:8;
985#endif
986
987 /* 0x04 */
988#ifdef WPT_BIG_BYTE_ENDIAN
989 wpt_uint32 reserved2:16; /* MUST BE 0 otherwise triggers BMU error*/
990 wpt_uint32 aduFeedback:8;
991
992 /* DPU feedback in Tx path.*/
993 wpt_uint32 dpuFeedback:8;
994
995#else
996 wpt_uint32 dpuFeedback:8;
997 wpt_uint32 aduFeedback:8;
998 wpt_uint32 reserved2:16;
999#endif
1000
1001 /* 0x08 */
1002#ifdef WPT_BIG_BYTE_ENDIAN
1003 /** It is initially filled by DXE then if encryption is on, then DPU will
1004 overwrite these fields. In case PDUs are linked to the BD, this field
1005 indicates the index of the first PDU linked to the BD. When PDU count is
1006 zero, this field has an undefined value. */
1007 wpt_uint32 headPduIdx:16;
1008
1009 /** It is initially filled by DXE then if encryption is on, then DPU will
1010 overwrite these fields.In case PDUs are linked to the BD, this field
1011 indicates the index of the last PDU. When PDU count is zero, this field
1012 has an undefined value. */
1013 wpt_uint32 tailPduIdx:16;
1014#else
1015 wpt_uint32 tailPduIdx:16;
1016 wpt_uint32 headPduIdx:16;
1017#endif
1018
1019 /* 0x0c */
1020#ifdef WPT_BIG_BYTE_ENDIAN
1021 /** This is filled by Host in Virgo 1.0 but it gets changed by ADU in
1022 Virgo2.0/Libra. The length (in number of bytes) of the MPDU header.
1023 Limitation: The MPDU header offset + MPDU header length can never go beyond
1024 the end of the first PDU */
1025 wpt_uint32 mpduHeaderLength:8;
1026
1027 /** This is filled by Host in Virgo 1.0 but it gets changed by ADU in
1028 Virgo2.0/Libra. The start byte number of the MPDU header. The byte numbering
1029 is done in the BE format. Word 0x0, bits [31:24] has byte index 0. */
1030 wpt_uint32 mpduHeaderOffset:8;
1031
1032 /** This is filled by Host in Virgo 1.0 but it gets changed by ADU in
1033 Virgo2.0/Libra. The start byte number of the MPDU data. The byte numbering
1034 is done in the BE format. Word 0x0, bits [31:24] has byte index 0.
1035 Note that this offset can point all the way into the first linked PDU.
1036 Limitation: MPDU DATA OFFSET can not point into the 2nd linked PDU */
1037 wpt_uint32 mpduDataOffset:9;
1038
1039 /** It is initially filled by DXE then if encryption is on, then DPU will
1040 overwrite these fields. The number of PDUs linked to the BD. This field
1041 should always indicate the correct amount. */
1042 wpt_uint32 pduCount:7;
1043#else
1044 wpt_uint32 pduCount:7;
1045 wpt_uint32 mpduDataOffset:9;
1046 wpt_uint32 mpduHeaderOffset:8;
1047 wpt_uint32 mpduHeaderLength:8;
1048#endif
1049
1050 /* 0x10 */
1051#ifdef WPT_BIG_BYTE_ENDIAN
1052 /** This is filled by Host in Virgo 1.0 but it gets changed by ADU in
1053 Virgo2.0/LibraMPDU length.This covers MPDU header length + MPDU data length.
1054 This does not include FCS. For single frame transmission, PSDU size is
1055 mpduLength + 4.*/
1056 wpt_uint32 mpduLength:16;
1057
1058 wpt_uint32 reserved3:2;
1059 /** Sequence number insertion by DPU
1060 00: Leave sequence number as is, as filled by host
1061 01: DPU to insert non TID based sequence number (If it is not TID based,
1062 then how does DPU know what seq to fill? Is this the non-Qos/Mgmt sequence
1063 number?
1064 10: DPU to insert a sequence number based on TID.
1065 11: Reserved */
1066 wpt_uint32 bd_ssn:2;
1067
1068 /** Traffic Identifier
1069 Indicates the traffic class the frame belongs to. For non QoS frames, this
1070 field is set to zero. */
1071 wpt_uint32 tid:4;
1072
1073 wpt_uint32 reserved4:8;
1074
1075#else
1076 wpt_uint32 reserved4:8;
1077 wpt_uint32 tid:4;
1078 wpt_uint32 bd_ssn:2;
1079 wpt_uint32 reserved3:2;
1080 wpt_uint32 mpduLength:16;
1081#endif
1082
1083 /* 0x14 */
1084#ifdef WPT_BIG_BYTE_ENDIAN
1085 /** (Only used by the DPU)
1086 This is filled by Host in Virgo 1.0 but it gets filled by ADU in
1087 Virgo2.0/Libra. The DPU descriptor index is used to calculate where in
1088 memory the DPU can find the DPU descriptor related to this frame. The DPU
1089 calculates the address by multiplying this index with the DPU descriptor
1090 size and adding the DPU descriptors base address. The DPU descriptor
1091 contains information specifying the encryption and compression type and
1092 contains references to where encryption keys can be found. */
1093 wpt_uint32 dpuDescIdx:8;
1094
1095 /** This is filled by Host in Virgo 1.0 but it gets filled by ADU in
1096 Virgo2.0/Libra. The STAid of the RA address */
1097 wpt_uint32 staIndex:8;
1098
1099 /** A field passed on to TPE which influences the ACK policy to be used for
1100 this frame
1101 00 - Iack
1102 01,10,11 - No Ack */
1103 wpt_uint32 ap:2;
1104
1105 /** Overwrite option for the transmit rate
1106 00: Use rate programmed in the TPE STA descriptor
1107 01: Use TPE BD rate 1
1108 10: Use TPE BD rate 2
1109 11: Delayed Use TPE BD rate 3 */
1110 wpt_uint32 bdRate:2;
1111
1112 /**
1113 This is filled by Host in Virgo 1.0 but it gets filled by ADU in
1114 Virgo2.0/Libra. Queue ID */
1115 wpt_uint32 queueId:5;
1116
1117 wpt_uint32 reserved5:7;
1118#else
1119 wpt_uint32 reserved5:7;
1120 wpt_uint32 queueId:5;
1121 wpt_uint32 bdRate:2;
1122 wpt_uint32 ap:2;
1123 wpt_uint32 staIndex:8;
1124 wpt_uint32 dpuDescIdx:8;
1125#endif
1126
1127 wpt_uint32 txBdSignature;
1128
1129 /* 0x1C */
1130 wpt_uint32 reserved6;
1131 /* 0x20 */
1132 /* Timestamp filled by DXE. Timestamp for current transfer */
1133 wpt_uint32 dxeH2BStartTimestamp;
1134
1135 /* 0x24 */
1136 /* Timestamp filled by DXE. Timestamp for previous transfer */
1137 wpt_uint32 dxeH2BEndTimestamp;
1138
Jeff Johnsone7245742012-09-05 17:12:55 -07001139#ifdef WCN_PRONTO
1140#ifdef WPT_BIG_BYTE_ENDIAN
1141 /** 10 bit value to indicate the start of TCP UDP frame relative to
1142 * the first IP frame header */
1143 wpt_uint32 csuTcpUdpStartOffset:10;
1144
1145 /** 16 bit pseudo header for TCP UDP used by CSU to generate TCP/UDP
1146 * frame checksum */
1147 wpt_uint32 csuPseudoHeaderCksum:16;
1148
1149 wpt_uint32 reserved7:6;
1150#else
1151 wpt_uint32 reserved7:6;
1152 wpt_uint32 csuPseudoHeaderCksum:16;
1153 wpt_uint32 csuTcpUdpStartOffset:10;
1154#endif
1155#endif /*WCN_PRONTO*/
Ganesh Kondabattini10e67352015-03-16 17:41:57 +05301156 wpt_uint32 txBdToken;
Jeff Johnsone7245742012-09-05 17:12:55 -07001157
Jeff Johnson295189b2012-06-20 16:38:30 -07001158} WDI_TxBdType;
1159
1160/*---------------------------------------------------------------------------
1161 WDI_RxDeFragBdType - The format of the RX BD Defragmented
1162---------------------------------------------------------------------------*/
1163typedef struct
1164{
1165 /* 0x00 */
1166#ifdef WPT_BIG_BYTE_ENDIAN
1167 wpt_uint32 reserved1:30;
1168 wpt_uint32 bdt:2;
1169#else
1170 wpt_uint32 bdt:2;
1171 wpt_uint32 reserved1:30;
1172#endif
1173
1174#ifdef WPT_BIG_BYTE_ENDIAN
1175 wpt_uint32 reserved2:24;
1176 wpt_uint32 dpuFeedBack:8;
1177#else
1178 wpt_uint32 dpuFeedBack:8;
1179 wpt_uint32 reserved2:24;
1180#endif
1181
1182#ifdef WPT_BIG_BYTE_ENDIAN
1183 wpt_uint32 reserved3:16;
1184 wpt_uint32 frag0BdIdx:16;
1185#else
1186 wpt_uint32 frag0BdIdx:16;
1187 wpt_uint32 reserved3:16;
1188#endif
1189
1190#ifdef WPT_BIG_BYTE_ENDIAN
1191 wpt_uint32 reserved4:16;
1192 wpt_uint32 frag1BdIdx:16;
1193#else
1194 wpt_uint32 frag1BdIdx:16;
1195 wpt_uint32 reserved4:16;
1196#endif
1197
1198#ifdef WPT_BIG_BYTE_ENDIAN
1199 wpt_uint32 frag2BdIdx:16;
1200 wpt_uint32 reserved5:16;
1201#else
1202 wpt_uint32 frag2BdIdx:16;
1203 wpt_uint32 reserved5:16;
1204#endif
1205
1206#ifdef WPT_BIG_BYTE_ENDIAN
1207 wpt_uint32 reserved6:16;
1208 wpt_uint32 frag3BdIdx:16;
1209#else
1210 wpt_uint32 frag3BdIdx:16;
1211 wpt_uint32 reserved6:16;
1212#endif
1213
1214#ifdef WPT_BIG_BYTE_ENDIAN
1215 wpt_uint32 reserved7:16;
1216 wpt_uint32 frag4BdIdx:16;
1217#else
1218 wpt_uint32 frag4BdIdx:16;
1219 wpt_uint32 reserved7:16;
1220#endif
1221
1222#ifdef WPT_BIG_BYTE_ENDIAN
1223 wpt_uint32 reserved8:16;
1224 wpt_uint32 frag5BdIdx:16;
1225#else
1226 wpt_uint32 frag5BdIdx:16;
1227 wpt_uint32 reserved8:16;
1228#endif
1229
1230#ifdef WPT_BIG_BYTE_ENDIAN
1231 wpt_uint32 reserved9:16;
1232 wpt_uint32 frag6BdIdx:16;
1233#else
1234 wpt_uint32 frag6BdIdx:16;
1235 wpt_uint32 reserved9:16;
1236#endif
1237
1238#ifdef WPT_BIG_BYTE_ENDIAN
1239 wpt_uint32 reserved10:16;
1240 wpt_uint32 frag7BdIdx:16;
1241#else
1242 wpt_uint32 frag7BdIdx:16;
1243 wpt_uint32 reserved10:16;
1244#endif
1245
1246#ifdef WPT_BIG_BYTE_ENDIAN
1247 wpt_uint32 reserved11:16;
1248 wpt_uint32 frag8BdIdx:16;
1249#else
1250 wpt_uint32 frag8BdIdx:16;
1251 wpt_uint32 reserved11:16;
1252#endif
1253
1254#ifdef WPT_BIG_BYTE_ENDIAN
1255 wpt_uint32 reserved12:16;
1256 wpt_uint32 frag9BdIdx:16;
1257#else
1258 wpt_uint32 frag9BdIdx:16;
1259 wpt_uint32 reserved12:16;
1260#endif
1261
1262#ifdef WPT_BIG_BYTE_ENDIAN
1263 wpt_uint32 reserved13:16;
1264 wpt_uint32 frag10BdIdx:16;
1265#else
1266 wpt_uint32 frag10BdIdx:16;
1267 wpt_uint32 reserved13:16;
1268#endif
1269
1270#ifdef WPT_BIG_BYTE_ENDIAN
1271 wpt_uint32 reserved14:16;
1272 wpt_uint32 frag11BdIdx:16;
1273#else
1274 wpt_uint32 frag11BdIdx:16;
1275 wpt_uint32 reserved14:16;
1276#endif
1277
1278#ifdef WPT_BIG_BYTE_ENDIAN
1279 wpt_uint32 reserved15:16;
1280 wpt_uint32 frag12BdIdx:16;
1281#else
1282 wpt_uint32 frag12BdIdx:16;
1283 wpt_uint32 reserved15:16;
1284#endif
1285
1286#ifdef WPT_BIG_BYTE_ENDIAN
1287 wpt_uint32 reserved16:16;
1288 wpt_uint32 frag13BdIdx:16;
1289#else
1290 wpt_uint32 frag13BdIdx:16;
1291 wpt_uint32 reserved16:16;
1292#endif
1293
1294#ifdef WPT_BIG_BYTE_ENDIAN
1295 wpt_uint32 frag14BdIdx:16;
1296 wpt_uint32 reserved17:16;
1297#else
1298 wpt_uint32 frag14BdIdx:16;
1299 wpt_uint32 reserved17:16;
1300#endif
1301
1302#ifdef WPT_BIG_BYTE_ENDIAN
1303 wpt_uint32 frag15BdIdx:16;
1304 wpt_uint32 reserved18:16;
1305#else
1306 wpt_uint32 frag15BdIdx:16;
1307 wpt_uint32 reserved18:16;
1308#endif
1309
1310} WDI_RxDeFragBdType;
1311
1312#endif /*WLAN_QCT_WDI_BD_H*/