1 /* 2 * Copyright (c) 2016 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 // $ATH_LICENSE_HW_HDR_C$ 20 // 21 // DO NOT EDIT! This file is automatically generated 22 // These definitions are tied to a particular hardware layout 23 24 25 #ifndef _RX_MPDU_DESC_INFO_H_ 26 #define _RX_MPDU_DESC_INFO_H_ 27 #if !defined(__ASSEMBLER__) 28 #endif 29 30 31 // ################ START SUMMARY ################# 32 // 33 // Dword Fields 34 // 0 msdu_count[7:0], mpdu_sequence_number[19:8], fragment_flag[20], mpdu_retry_bit[21], ampdu_flag[22], bar_frame[23], pn_fields_contain_valid_info[24], sa_is_valid[25], sa_idx_timeout[26], da_is_valid[27], da_is_mcbc[28], da_idx_timeout[29], raw_mpdu[30], reserved[31] 35 // 1 peer_meta_data[31:0] 36 // 37 // ################ END SUMMARY ################# 38 39 #define NUM_OF_DWORDS_RX_MPDU_DESC_INFO 2 40 41 struct rx_mpdu_desc_info { 42 uint32_t msdu_count : 8, //[7:0] 43 mpdu_sequence_number : 12, //[19:8] 44 fragment_flag : 1, //[20] 45 mpdu_retry_bit : 1, //[21] 46 ampdu_flag : 1, //[22] 47 bar_frame : 1, //[23] 48 pn_fields_contain_valid_info : 1, //[24] 49 sa_is_valid : 1, //[25] 50 sa_idx_timeout : 1, //[26] 51 da_is_valid : 1, //[27] 52 da_is_mcbc : 1, //[28] 53 da_idx_timeout : 1, //[29] 54 raw_mpdu : 1, //[30] 55 reserved : 1; //[31] 56 uint32_t peer_meta_data : 32; //[31:0] 57 }; 58 59 /* 60 61 msdu_count 62 63 Consumer: REO/SW/FW 64 65 Producer: RXDMA 66 67 68 69 The number of MSDUs within the MPDU 70 71 <legal all> 72 73 mpdu_sequence_number 74 75 Consumer: REO/SW/FW 76 77 Producer: RXDMA 78 79 80 81 The field can have two different meanings based on the 82 setting of field 'BAR_frame': 83 84 85 86 'BAR_frame' is NOT set: 87 88 The MPDU sequence number of the received frame. 89 90 91 92 'BAR_frame' is set. 93 94 The MPDU Start sequence number from the BAR frame 95 96 <legal all> 97 98 fragment_flag 99 100 Consumer: REO/SW/FW 101 102 Producer: RXDMA 103 104 105 106 When set, this MPDU is a fragment and REO should forward 107 this fragment MPDU to the REO destination ring without any 108 reorder checks, pn checks or bitmap update. This implies 109 that REO is forwarding the pointer to the MSDU link 110 descriptor. The destination ring is coming from a 111 programmable register setting in REO 112 113 114 115 <legal all> 116 117 mpdu_retry_bit 118 119 Consumer: REO/SW/FW 120 121 Producer: RXDMA 122 123 124 125 The retry bit setting from the MPDU header of the 126 received frame 127 128 <legal all> 129 130 ampdu_flag 131 132 Consumer: REO/SW/FW 133 134 Producer: RXDMA 135 136 137 138 When set, the MPDU was received as part of an A-MPDU. 139 140 <legal all> 141 142 bar_frame 143 144 Consumer: REO/SW/FW 145 146 Producer: RXDMA 147 148 149 150 When set, the received frame is a BAR frame. After 151 processing, this frame shall be pushed to SW or deleted. 152 153 <legal all> 154 155 pn_fields_contain_valid_info 156 157 Consumer: REO/SW/FW 158 159 Producer: RXDMA 160 161 162 163 Copied here by RXDMA from RX_MPDU_END 164 165 When not set, REO will Not perform a PN sequence number 166 check 167 168 sa_is_valid 169 170 When set, OLE found a valid SA entry for all MSDUs in 171 this MPDU 172 173 <legal all> 174 175 sa_idx_timeout 176 177 When set, at least 1 MSDU within the MPDU has an 178 unsuccessful MAC source address search due to the expiration 179 of the search timer. 180 181 <legal all> 182 183 da_is_valid 184 185 When set, OLE found a valid DA entry for all MSDUs in 186 this MPDU 187 188 <legal all> 189 190 da_is_mcbc 191 192 Field Only valid if da_is_valid is set 193 194 195 196 When set, at least one of the DA addresses is a 197 Multicast or Broadcast address. 198 199 <legal all> 200 201 da_idx_timeout 202 203 When set, at least 1 MSDU within the MPDU has an 204 unsuccessful MAC destination address search due to the 205 expiration of the search timer. 206 207 <legal all> 208 209 raw_mpdu 210 211 Field only valid when first_msdu_in_mpdu_flag is set. 212 213 214 215 When set, the contents in the MSDU buffer contains a 216 'RAW' MPDU. This 'RAW' MPDU might be spread out over 217 multiple MSDU buffers. 218 219 <legal all> 220 221 reserved 222 223 <legal 0> 224 225 peer_meta_data 226 227 Meta data that SW has programmed in the Peer table entry 228 of the transmitting STA. 229 230 <legal all> 231 */ 232 233 234 /* Description RX_MPDU_DESC_INFO_0_MSDU_COUNT 235 236 Consumer: REO/SW/FW 237 238 Producer: RXDMA 239 240 241 242 The number of MSDUs within the MPDU 243 244 <legal all> 245 */ 246 #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_OFFSET 0x00000000 247 #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_LSB 0 248 #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_MASK 0x000000ff 249 250 /* Description RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER 251 252 Consumer: REO/SW/FW 253 254 Producer: RXDMA 255 256 257 258 The field can have two different meanings based on the 259 setting of field 'BAR_frame': 260 261 262 263 'BAR_frame' is NOT set: 264 265 The MPDU sequence number of the received frame. 266 267 268 269 'BAR_frame' is set. 270 271 The MPDU Start sequence number from the BAR frame 272 273 <legal all> 274 */ 275 #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_OFFSET 0x00000000 276 #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_LSB 8 277 #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_MASK 0x000fff00 278 279 /* Description RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG 280 281 Consumer: REO/SW/FW 282 283 Producer: RXDMA 284 285 286 287 When set, this MPDU is a fragment and REO should forward 288 this fragment MPDU to the REO destination ring without any 289 reorder checks, pn checks or bitmap update. This implies 290 that REO is forwarding the pointer to the MSDU link 291 descriptor. The destination ring is coming from a 292 programmable register setting in REO 293 294 295 296 <legal all> 297 */ 298 #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_OFFSET 0x00000000 299 #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_LSB 20 300 #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_MASK 0x00100000 301 302 /* Description RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT 303 304 Consumer: REO/SW/FW 305 306 Producer: RXDMA 307 308 309 310 The retry bit setting from the MPDU header of the 311 received frame 312 313 <legal all> 314 */ 315 #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_OFFSET 0x00000000 316 #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_LSB 21 317 #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_MASK 0x00200000 318 319 /* Description RX_MPDU_DESC_INFO_0_AMPDU_FLAG 320 321 Consumer: REO/SW/FW 322 323 Producer: RXDMA 324 325 326 327 When set, the MPDU was received as part of an A-MPDU. 328 329 <legal all> 330 */ 331 #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_OFFSET 0x00000000 332 #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_LSB 22 333 #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_MASK 0x00400000 334 335 /* Description RX_MPDU_DESC_INFO_0_BAR_FRAME 336 337 Consumer: REO/SW/FW 338 339 Producer: RXDMA 340 341 342 343 When set, the received frame is a BAR frame. After 344 processing, this frame shall be pushed to SW or deleted. 345 346 <legal all> 347 */ 348 #define RX_MPDU_DESC_INFO_0_BAR_FRAME_OFFSET 0x00000000 349 #define RX_MPDU_DESC_INFO_0_BAR_FRAME_LSB 23 350 #define RX_MPDU_DESC_INFO_0_BAR_FRAME_MASK 0x00800000 351 352 /* Description RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO 353 354 Consumer: REO/SW/FW 355 356 Producer: RXDMA 357 358 359 360 Copied here by RXDMA from RX_MPDU_END 361 362 When not set, REO will Not perform a PN sequence number 363 check 364 */ 365 #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET 0x00000000 366 #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_LSB 24 367 #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_MASK 0x01000000 368 369 /* Description RX_MPDU_DESC_INFO_0_SA_IS_VALID 370 371 When set, OLE found a valid SA entry for all MSDUs in 372 this MPDU 373 374 <legal all> 375 */ 376 #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_OFFSET 0x00000000 377 #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_LSB 25 378 #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_MASK 0x02000000 379 380 /* Description RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT 381 382 When set, at least 1 MSDU within the MPDU has an 383 unsuccessful MAC source address search due to the expiration 384 of the search timer. 385 386 <legal all> 387 */ 388 #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_OFFSET 0x00000000 389 #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_LSB 26 390 #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_MASK 0x04000000 391 392 /* Description RX_MPDU_DESC_INFO_0_DA_IS_VALID 393 394 When set, OLE found a valid DA entry for all MSDUs in 395 this MPDU 396 397 <legal all> 398 */ 399 #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_OFFSET 0x00000000 400 #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_LSB 27 401 #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_MASK 0x08000000 402 403 /* Description RX_MPDU_DESC_INFO_0_DA_IS_MCBC 404 405 Field Only valid if da_is_valid is set 406 407 408 409 When set, at least one of the DA addresses is a 410 Multicast or Broadcast address. 411 412 <legal all> 413 */ 414 #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_OFFSET 0x00000000 415 #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_LSB 28 416 #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_MASK 0x10000000 417 418 /* Description RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT 419 420 When set, at least 1 MSDU within the MPDU has an 421 unsuccessful MAC destination address search due to the 422 expiration of the search timer. 423 424 <legal all> 425 */ 426 #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_OFFSET 0x00000000 427 #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_LSB 29 428 #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_MASK 0x20000000 429 430 /* Description RX_MPDU_DESC_INFO_0_RAW_MPDU 431 432 Field only valid when first_msdu_in_mpdu_flag is set. 433 434 435 436 When set, the contents in the MSDU buffer contains a 437 'RAW' MPDU. This 'RAW' MPDU might be spread out over 438 multiple MSDU buffers. 439 440 <legal all> 441 */ 442 #define RX_MPDU_DESC_INFO_0_RAW_MPDU_OFFSET 0x00000000 443 #define RX_MPDU_DESC_INFO_0_RAW_MPDU_LSB 30 444 #define RX_MPDU_DESC_INFO_0_RAW_MPDU_MASK 0x40000000 445 446 /* Description RX_MPDU_DESC_INFO_0_RESERVED 447 448 <legal 0> 449 */ 450 #define RX_MPDU_DESC_INFO_0_RESERVED_OFFSET 0x00000000 451 #define RX_MPDU_DESC_INFO_0_RESERVED_LSB 31 452 #define RX_MPDU_DESC_INFO_0_RESERVED_MASK 0x80000000 453 454 /* Description RX_MPDU_DESC_INFO_1_PEER_META_DATA 455 456 Meta data that SW has programmed in the Peer table entry 457 of the transmitting STA. 458 459 <legal all> 460 */ 461 #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_OFFSET 0x00000004 462 #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_LSB 0 463 #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_MASK 0xffffffff 464 465 466 #endif // _RX_MPDU_DESC_INFO_H_ 467