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