1 /* 2 * Copyright (c) 2019, The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 #ifndef _WBM_RELEASE_RING_H_ 18 #define _WBM_RELEASE_RING_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #include "buffer_addr_info.h" 23 #include "tx_rate_stats_info.h" 24 25 // ################ START SUMMARY ################# 26 // 27 // Dword Fields 28 // 0-1 struct buffer_addr_info released_buff_or_desc_addr_info; 29 // 2 release_source_module[2:0], bm_action[5:3], buffer_or_desc_type[8:6], first_msdu_index[12:9], tqm_release_reason[16:13], rxdma_push_reason[18:17], rxdma_error_code[23:19], reo_push_reason[25:24], reo_error_code[30:26], wbm_internal_error[31] 30 // 3 tqm_status_number[23:0], transmit_count[30:24], msdu_continuation[31] 31 // 4 ack_frame_rssi[7:0], sw_release_details_valid[8], first_msdu[9], last_msdu[10], msdu_part_of_amsdu[11], fw_tx_notify_frame[12], buffer_timestamp[31:13] 32 // 5-6 struct tx_rate_stats_info tx_rate_stats; 33 // 7 sw_peer_id[15:0], tid[19:16], ring_id[27:20], looping_count[31:28] 34 // 35 // ################ END SUMMARY ################# 36 37 #define NUM_OF_DWORDS_WBM_RELEASE_RING 8 38 39 struct wbm_release_ring { 40 struct buffer_addr_info released_buff_or_desc_addr_info; 41 uint32_t release_source_module : 3, //[2:0] 42 bm_action : 3, //[5:3] 43 buffer_or_desc_type : 3, //[8:6] 44 first_msdu_index : 4, //[12:9] 45 tqm_release_reason : 4, //[16:13] 46 rxdma_push_reason : 2, //[18:17] 47 rxdma_error_code : 5, //[23:19] 48 reo_push_reason : 2, //[25:24] 49 reo_error_code : 5, //[30:26] 50 wbm_internal_error : 1; //[31] 51 uint32_t tqm_status_number : 24, //[23:0] 52 transmit_count : 7, //[30:24] 53 msdu_continuation : 1; //[31] 54 uint32_t ack_frame_rssi : 8, //[7:0] 55 sw_release_details_valid : 1, //[8] 56 first_msdu : 1, //[9] 57 last_msdu : 1, //[10] 58 msdu_part_of_amsdu : 1, //[11] 59 fw_tx_notify_frame : 1, //[12] 60 buffer_timestamp : 19; //[31:13] 61 struct tx_rate_stats_info tx_rate_stats; 62 uint32_t sw_peer_id : 16, //[15:0] 63 tid : 4, //[19:16] 64 ring_id : 8, //[27:20] 65 looping_count : 4; //[31:28] 66 }; 67 68 /* 69 70 struct buffer_addr_info released_buff_or_desc_addr_info 71 72 Consumer: WBM/SW/FW 73 74 Producer: SW/TQM/RXDMA/REO/SWITCH 75 76 77 78 Details of the physical address of the buffer or link 79 descriptor that is being released. Note that within this 80 descriptor, WBM will look at the 'owner' of the released 81 buffer/descriptor and forward it to SW/FW is WBM is not the 82 owner. 83 84 85 86 In case of TQM releasing Tx MSDU link descriptors with 87 Tqm_release_reason set to 'tqm_fw_reason3,' HastingsPrime 88 WBM can optionally release the MSDU buffers pointed to by 89 the MSDU link descriptors to FW and override the 90 tx_rate_stats field, for FW reinjection of these MSDUs. 91 This is not supported in Pine. 92 93 release_source_module 94 95 Indicates which module initiated the release of this 96 buffer or descriptor 97 98 99 100 <enum 0 release_source_TQM> TQM released this buffer or 101 descriptor 102 103 <enum 1 release_source_RXDMA> RXDMA released this buffer 104 or descriptor 105 106 <enum 2 release_source_REO> REO released this buffer or 107 descriptor 108 109 <enum 3 release_source_FW> FW released this buffer or 110 descriptor 111 112 <enum 4 release_source_SW> SW released this buffer or 113 descriptor 114 115 <legal 0-4> 116 117 bm_action 118 119 Consumer: WBM/SW/FW 120 121 Producer: SW/TQM/RXDMA/REO/SWITCH 122 123 124 125 Field only valid when the field return_buffer_manager in 126 the Released_buff_or_desc_addr_info indicates: 127 128 WBM_IDLE_BUF_LIST or 129 130 WBM_IDLE_DESC_LIST 131 132 133 134 An MSDU extension descriptor shall never be marked as 135 136 137 138 <enum 0 Put_in_idle_list> Put the buffer or descriptor 139 back in the idle list. In case of MSDU or MDPU link 140 descriptor, BM does not need to check to release any 141 individual MSDU buffers 142 143 144 145 <enum 1 release_msdu_list > This BM action can only be 146 used in combination with buffer_or_desc_type being 147 msdu_link_descriptor. Field first_msdu_index points out 148 which MSDU pointer in the MSDU link descriptor is the first 149 of an MPDU that is released. 150 151 BM shall release all the MSDU buffers linked to this 152 first MSDU buffer pointer. All related MSDU buffer pointer 153 entries shall be set to value 0, which represents the 'NULL 154 pointer. When all MSDU buffer pointers in the MSDU link 155 descriptor are 'NULL', the MSDU link descriptor itself shall 156 also be released. 157 158 159 160 <enum 2 Put_in_idle_list_expanded> CURRENTLY NOT 161 IMPLEMENTED.... 162 163 Put the buffer or descriptor back in the idle list. Only 164 valid in combination with buffer_or_desc_type indicating 165 MDPU_link_descriptor. 166 167 BM shall release the MPDU link descriptor as well as all 168 MSDUs that are linked to the MPDUs in this descriptor. 169 170 171 172 <legal 0-2> 173 174 buffer_or_desc_type 175 176 Consumer: WBM/SW/FW 177 178 Producer: SW/TQM/RXDMA/REO/SWITCH 179 180 181 182 Field only valid when WBM is marked as the 183 return_buffer_manager in the Released_Buffer_address_info 184 185 186 187 Indicates that type of buffer or descriptor is being 188 released 189 190 191 192 <enum 0 MSDU_rel_buffer> The address points to an MSDU 193 buffer 194 195 <enum 1 msdu_link_descriptor> The address points to an 196 TX MSDU link descriptor 197 198 <enum 2 mpdu_link_descriptor> The address points to an 199 MPDU link descriptor 200 201 <enum 3 msdu_ext_descriptor > The address points to an 202 MSDU extension descriptor. 203 204 In case BM finds this one in a release ring, it passes 205 it on to FW... 206 207 <enum 4 queue_ext_descriptor> The address points to an 208 TQM queue extension descriptor. WBM should treat this is the 209 same way as a link descriptor. That is, put the 128 byte 210 buffer back in the link buffer idle list. 211 212 213 214 <legal 0-4> 215 216 first_msdu_index 217 218 Consumer: WBM/SW/FW 219 220 Producer: SW/TQM/RXDMA/REO/SWITCH 221 222 223 224 Field only valid for the bm_action release_msdu_list. 225 226 227 228 The index of the first MSDU in an MSDU link descriptor 229 all belonging to the same MPDU. 230 231 232 233 <legal 0-6> 234 235 tqm_release_reason 236 237 Consumer: WBM/SW/FW 238 239 Producer: TQM 240 241 242 243 Field only valid when Release_source_module is set to 244 release_source_TQM 245 246 247 248 (rr = Release Reason) 249 250 <enum 0 tqm_rr_frame_acked> frame is removed because an 251 ACK of BA for it was received 252 253 <enum 1 tqm_rr_rem_cmd_rem> frame is removed because a 254 remove command of type Remove_mpdus initiated by SW 255 256 <enum 2 tqm_rr_rem_cmd_tx> frame is removed because a 257 remove command of type Remove_transmitted_mpdus initiated by 258 SW 259 260 <enum 3 tqm_rr_rem_cmd_notx> frame is removed because a 261 remove command of type Remove_untransmitted_mpdus initiated 262 by SW 263 264 <enum 4 tqm_rr_rem_cmd_aged> frame is removed because a 265 remove command of type Remove_aged_mpdus or 266 Remove_aged_msdus initiated by SW 267 268 <enum 5 tqm_fw_reason1> frame is removed because a 269 remove command where fw indicated that remove reason is 270 fw_reason1 271 272 <enum 6 tqm_fw_reason2> frame is removed because a 273 remove command where fw indicated that remove reason is 274 fw_reason1 275 276 <enum 7 tqm_fw_reason3> frame is removed because a 277 remove command where fw indicated that remove reason is 278 fw_reason1 279 280 <enum 8 tqm_rr_rem_cmd_disable_queue> frame is removed 281 because a remove command of type 282 remove_mpdus_and_disable_queue or 283 remove_msdus_and_disable_flow initiated by SW 284 285 286 287 <legal 0-8> 288 289 290 291 In case of TQM releasing Tx MSDU link descriptors with 292 Tqm_release_reason set to 'tqm_fw_reason3,' HastingsPrime 293 WBM can optionally release the MSDU buffers pointed to by 294 the MSDU link descriptors to FW and override the 295 tx_rate_stats field, for FW reinjection of these MSDUs. 296 This is not supported in Pine. 297 298 rxdma_push_reason 299 300 Field only valid when Release_source_module is set to 301 release_source_RXDMA 302 303 304 305 Indicates why rxdma pushed the frame to this ring 306 307 308 309 <enum 0 rxdma_error_detected> RXDMA detected an error an 310 pushed this frame to this queue 311 312 <enum 1 rxdma_routing_instruction> RXDMA pushed the 313 frame to this queue per received routing instructions. No 314 error within RXDMA was detected 315 316 <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a 317 result the MSDU link descriptor might not have the 318 last_msdu_in_mpdu_flag set, but instead WBM might just see a 319 NULL pointer in the MSDU link descriptor. This is to be 320 considered a normal condition for this scenario. 321 322 323 324 <legal 0 - 2> 325 326 rxdma_error_code 327 328 Field only valid when 'rxdma_push_reason' set to 329 'rxdma_error_detected'. 330 331 332 333 <enum 0 rxdma_overflow_err>MPDU frame is not complete 334 due to a FIFO overflow error in RXPCU. 335 336 <enum 1 rxdma_mpdu_length_err>MPDU frame is not complete 337 due to receiving incomplete MPDU from the PHY 338 339 340 <enum 3 rxdma_decrypt_err>CRYPTO reported a decryption 341 error or CRYPTO received an encrypted frame, but did not get 342 a valid corresponding key id in the peer entry. 343 344 <enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC 345 error 346 347 <enum 5 rxdma_unecrypted_err>CRYPTO reported an 348 unencrypted frame error when encrypted was expected 349 350 <enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU 351 length error 352 353 <enum 7 rxdma_msdu_limit_err>RX OLE reported that max 354 number of MSDUs allowed in an MPDU got exceeded 355 356 <enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing 357 error 358 359 <enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU 360 parsing error 361 362 <enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout 363 during SA search 364 365 <enum 11 rxdma_da_timeout_err>RX OLE reported a timeout 366 during DA search 367 368 <enum 12 rxdma_flow_timeout_err>RX OLE reported a 369 timeout during flow search 370 371 <enum 13 rxdma_flush_request>RXDMA received a flush 372 request 373 374 <enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU 375 present as well as a fragmented MPDU. A-MSDU defragmentation 376 is not supported in Lithium SW so this is treated as an 377 error. 378 379 reo_push_reason 380 381 Field only valid when Release_source_module is set to 382 release_source_REO 383 384 385 386 Indicates why REO pushed the frame to this release ring 387 388 389 390 <enum 0 reo_error_detected> Reo detected an error an 391 pushed this frame to this queue 392 393 <enum 1 reo_routing_instruction> Reo pushed the frame to 394 this queue per received routing instructions. No error 395 within REO was detected 396 397 398 399 <legal 0 - 1> 400 401 reo_error_code 402 403 Field only valid when 'Reo_push_reason' set to 404 'reo_error_detected'. 405 406 407 408 <enum 0 reo_queue_desc_addr_zero> Reo queue descriptor 409 provided in the REO_ENTRANCE ring is set to 0 410 411 <enum 1 reo_queue_desc_not_valid> Reo queue descriptor 412 valid bit is NOT set 413 414 <enum 2 ampdu_in_non_ba> AMPDU frame received without BA 415 session having been setup. 416 417 <enum 3 non_ba_duplicate> Non-BA session, SN equal to 418 SSN, Retry bit set: duplicate frame 419 420 <enum 4 ba_duplicate> BA session, duplicate frame 421 422 <enum 5 regular_frame_2k_jump> A normal (management/data 423 frame) received with 2K jump in SN 424 425 <enum 6 bar_frame_2k_jump> A bar received with 2K jump 426 in SSN 427 428 <enum 7 regular_frame_OOR> A normal (management/data 429 frame) received with SN falling within the OOR window 430 431 <enum 8 bar_frame_OOR> A bar received with SSN falling 432 within the OOR window 433 434 <enum 9 bar_frame_no_ba_session> A bar received without 435 a BA session 436 437 <enum 10 bar_frame_sn_equals_ssn> A bar received with 438 SSN equal to SN 439 440 <enum 11 pn_check_failed> PN Check Failed packet. 441 442 <enum 12 2k_error_handling_flag_set> Frame is forwarded 443 as a result of the 'Seq_2k_error_detected_flag' been set in 444 the REO Queue descriptor 445 446 <enum 13 pn_error_handling_flag_set> Frame is forwarded 447 as a result of the 'pn_error_detected_flag' been set in the 448 REO Queue descriptor 449 450 <enum 14 queue_descriptor_blocked_set> Frame is 451 forwarded as a result of the queue descriptor(address) being 452 blocked as SW/FW seems to be currently in the process of 453 making updates to this descriptor... 454 455 456 457 <legal 0-14> 458 459 wbm_internal_error 460 461 Can only be set by WBM. 462 463 464 465 Is set when WBM got a buffer pointer but the action was 466 to push it to the idle link descriptor ring or do link 467 related activity 468 469 OR 470 471 Is set when WBM got a link buffer pointer but the action 472 was to push it to the buffer descriptor ring 473 474 475 476 <legal all> 477 478 tqm_status_number 479 480 Field only valid when Release_source_module is set to 481 release_source_TQM 482 483 484 485 The value in this field is equal to value of the 486 'TQM_CMD_Number' field the TQM command or the 487 'TQM_add_cmd_Number' field from the TQM entrance ring 488 descriptor 489 490 491 492 This field helps to correlate the statuses with the TQM 493 commands. 494 495 496 497 NOTE that SW could program this number to be equal to 498 the PPDU_ID number in case direct correlation with the PPDU 499 ID is desired 500 501 502 503 <legal all> 504 505 transmit_count 506 507 Field only valid when Release_source_module is set to 508 release_source_TQM 509 510 511 512 The number of times this frame has been transmitted 513 514 msdu_continuation 515 516 requests MSDU_continuation reporting for Rx 517 MSDUs in Pine and HastingsPrime for which 518 SW_release_details_valid may not be set. 519 520 <legal all> 521 522 ack_frame_rssi 523 524 This field is only valid when the source is TQM. 525 526 527 528 If this frame is removed as the result of the reception 529 of an ACK or BA, this field indicates the RSSI of the 530 received ACK or BA frame. 531 532 533 534 When the frame is removed as result of a direct remove 535 command from the SW, this field is set to 0x0 (which is 536 never a valid value when real RSSI is available) 537 538 539 540 <legal all> 541 542 sw_release_details_valid 543 544 Consumer: SW 545 546 Producer: WBM 547 548 549 550 When set, some WBM specific release info for SW is 551 valid. 552 553 This is set when WMB got a 'release_msdu_list' command 554 from TQM and the return buffer manager is not WMB. WBM will 555 then de-aggregate all the MSDUs and pass them one at a time 556 on to the 'buffer owner' 557 558 559 560 <legal all> 561 562 first_msdu 563 564 Field only valid when SW_release_details_valid is set. 565 566 567 568 Consumer: SW 569 570 Producer: WBM 571 572 573 574 When set, this MSDU is the first MSDU pointed to in the 575 'release_msdu_list' command. 576 577 578 579 extends this to Rx MSDUs in Pine and 580 HastingsPrime for which SW_release_details_valid may not be 581 set. 582 583 <legal all> 584 585 last_msdu 586 587 Field only valid when SW_release_details_valid is set. 588 589 590 591 Consumer: SW 592 593 Producer: WBM 594 595 596 597 When set, this MSDU is the last MSDU pointed to in the 598 'release_msdu_list' command. 599 600 601 602 extends this to Rx MSDUs in Pine and 603 HastingsPrime for which SW_release_details_valid may not be 604 set. 605 606 <legal all> 607 608 msdu_part_of_amsdu 609 610 Field only valid when SW_release_details_valid is set. 611 612 613 614 Consumer: SW 615 616 Producer: WBM 617 618 619 620 When set, this MSDU was part of an A-MSDU in MPDU 621 622 <legal all> 623 624 fw_tx_notify_frame 625 626 Field only valid when SW_release_details_valid is set. 627 628 629 630 Consumer: SW 631 632 Producer: WBM 633 634 635 636 This is the FW_tx_notify_frame field from the 637 638 <legal all> 639 640 buffer_timestamp 641 642 Field only valid when SW_release_details_valid is set. 643 644 645 646 Consumer: SW 647 648 Producer: WBM 649 650 651 652 This is the Buffer_timestamp field from the 653 TX_MSDU_DETAILS for this frame from the MSDU link 654 descriptor. 655 656 657 658 Timestamp in units of 1024 µs 659 660 <legal all> 661 662 struct tx_rate_stats_info tx_rate_stats 663 664 Consumer: TQM 665 666 Producer: SW/SCH(from TXPCU, PDG) 667 668 669 670 Details for command execution tracking purposes. 671 672 673 674 In case of TQM releasing Tx MSDU link descriptors with 675 Tqm_release_reason set to 'tqm_fw_reason3,' HastingsPrime 676 WBM can optionally release the MSDU buffers pointed to by 677 the MSDU link descriptors to FW and override the 678 tx_rate_stats field with words 2 and 3 of the 679 'TX_MSDU_DETAILS' structure, for FW reinjection of these 680 MSDUs. This is not supported in Pine. 681 682 sw_peer_id 683 684 Field only valid when Release_source_module is set to 685 release_source_TQM 686 687 688 689 1) Release of msdu buffer due to drop_frame = 1. Flow is 690 not fetched and hence sw_peer_id and tid = 0 691 692 buffer_or_desc_type = e_num 0 693 MSDU_rel_buffertqm_release_reason = e_num 1 694 tqm_rr_rem_cmd_rem 695 696 697 698 699 700 2) Release of msdu buffer due to Flow is not fetched and 701 hence sw_peer_id and tid = 0 702 703 buffer_or_desc_type = e_num 0 704 MSDU_rel_buffertqm_release_reason = e_num 1 705 tqm_rr_rem_cmd_rem 706 707 708 709 710 711 3) Release of msdu link due to remove_mpdu or acked_mpdu 712 command. 713 714 buffer_or_desc_type = e_num1 715 msdu_link_descriptortqm_release_reason can be:e_num 1 716 tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx 717 718 e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged 719 720 721 722 Sw_peer_id from the TX_MSDU_FLOW descriptor or 723 TX_MPDU_QUEUE descriptor 724 725 <legal all> 726 727 tid 728 729 Field only valid when Release_source_module is set to 730 release_source_TQM 731 732 733 734 1) Release of msdu buffer due to drop_frame = 1. Flow is 735 not fetched and hence sw_peer_id and tid = 0 736 737 buffer_or_desc_type = e_num 0 738 MSDU_rel_buffertqm_release_reason = e_num 1 739 tqm_rr_rem_cmd_rem 740 741 742 743 744 745 2) Release of msdu buffer due to Flow is not fetched and 746 hence sw_peer_id and tid = 0 747 748 buffer_or_desc_type = e_num 0 749 MSDU_rel_buffertqm_release_reason = e_num 1 750 tqm_rr_rem_cmd_rem 751 752 753 754 755 756 3) Release of msdu link due to remove_mpdu or acked_mpdu 757 command. 758 759 buffer_or_desc_type = e_num1 760 msdu_link_descriptortqm_release_reason can be:e_num 1 761 tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx 762 763 e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged 764 765 766 767 768 769 This field represents the TID from the TX_MSDU_FLOW 770 descriptor or TX_MPDU_QUEUE descriptor 771 772 773 774 <legal all> 775 776 ring_id 777 778 Consumer: TQM/REO/RXDMA/SW 779 780 Producer: SRNG (of RXDMA) 781 782 783 784 For debugging. 785 786 This field is filled in by the SRNG module. 787 788 It help to identify the ring that is being looked <legal 789 all> 790 791 looping_count 792 793 Consumer: WBM/SW/FW 794 795 Producer: SW/TQM/RXDMA/REO/SWITCH 796 797 798 799 A count value that indicates the number of times the 800 producer of entries into the Buffer Manager Ring has looped 801 around the ring. 802 803 At initialization time, this value is set to 0. On the 804 first loop, this value is set to 1. After the max value is 805 reached allowed by the number of bits for this field, the 806 count value continues with 0 again. 807 808 809 810 In case SW is the consumer of the ring entries, it can 811 use this field to figure out up to where the producer of 812 entries has created new entries. This eliminates the need to 813 check where the head pointer' of the ring is located once 814 the SW starts processing an interrupt indicating that new 815 entries have been put into this ring... 816 817 818 819 Also note that SW if it wants only needs to look at the 820 LSB bit of this count value. 821 822 <legal all> 823 */ 824 825 826 /* EXTERNAL REFERENCE : struct buffer_addr_info released_buff_or_desc_addr_info */ 827 828 829 /* Description WBM_RELEASE_RING_0_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0 830 831 Address (lower 32 bits) of the MSDU buffer OR 832 MSDU_EXTENSION descriptor OR Link Descriptor 833 834 835 836 In case of 'NULL' pointer, this field is set to 0 837 838 <legal all> 839 */ 840 #define WBM_RELEASE_RING_0_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_OFFSET 0x00000000 841 #define WBM_RELEASE_RING_0_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_LSB 0 842 #define WBM_RELEASE_RING_0_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_31_0_MASK 0xffffffff 843 844 /* Description WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32 845 846 Address (upper 8 bits) of the MSDU buffer OR 847 MSDU_EXTENSION descriptor OR Link Descriptor 848 849 850 851 In case of 'NULL' pointer, this field is set to 0 852 853 <legal all> 854 */ 855 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_OFFSET 0x00000004 856 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_LSB 0 857 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_BUFFER_ADDR_39_32_MASK 0x000000ff 858 859 /* Description WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER 860 861 Consumer: WBM 862 863 Producer: SW/FW 864 865 866 867 In case of 'NULL' pointer, this field is set to 0 868 869 870 871 Indicates to which buffer manager the buffer OR 872 MSDU_EXTENSION descriptor OR link descriptor that is being 873 pointed to shall be returned after the frame has been 874 processed. It is used by WBM for routing purposes. 875 876 877 878 <enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned 879 to the WMB buffer idle list 880 881 <enum 1 WBM_IDLE_DESC_LIST> This buffer shall be 882 returned to the WMB idle link descriptor idle list 883 884 <enum 2 FW_BM> This buffer shall be returned to the FW 885 886 <enum 3 SW0_BM> This buffer shall be returned to the SW, 887 ring 0 888 889 <enum 4 SW1_BM> This buffer shall be returned to the SW, 890 ring 1 891 892 <enum 5 SW2_BM> This buffer shall be returned to the SW, 893 ring 2 894 895 <enum 6 SW3_BM> This buffer shall be returned to the SW, 896 ring 3 897 898 <enum 7 SW4_BM> This buffer shall be returned to the SW, 899 ring 4 900 901 902 903 <legal all> 904 */ 905 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_OFFSET 0x00000004 906 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_LSB 8 907 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_RETURN_BUFFER_MANAGER_MASK 0x00000700 908 909 /* Description WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE 910 911 Cookie field exclusively used by SW. 912 913 914 915 In case of 'NULL' pointer, this field is set to 0 916 917 918 919 HW ignores the contents, accept that it passes the 920 programmed value on to other descriptors together with the 921 physical address 922 923 924 925 Field can be used by SW to for example associate the 926 buffers physical address with the virtual address 927 928 The bit definitions as used by SW are within SW HLD 929 specification 930 931 932 933 NOTE: 934 935 The three most significant bits can have a special 936 meaning in case this struct is embedded in a TX_MPDU_DETAILS 937 STRUCT, and field transmit_bw_restriction is set 938 939 940 941 In case of NON punctured transmission: 942 943 Sw_buffer_cookie[20:19] = 2'b00: 20 MHz TX only 944 945 Sw_buffer_cookie[20:19] = 2'b01: 40 MHz TX only 946 947 Sw_buffer_cookie[20:19] = 2'b10: 80 MHz TX only 948 949 Sw_buffer_cookie[20:19] = 2'b11: 160 MHz TX only 950 951 952 953 In case of punctured transmission: 954 955 Sw_buffer_cookie[20:18] = 3'b000: pattern 0 only 956 957 Sw_buffer_cookie[20:18] = 3'b001: pattern 1 only 958 959 Sw_buffer_cookie[20:18] = 3'b010: pattern 2 only 960 961 Sw_buffer_cookie[20:18] = 3'b011: pattern 3 only 962 963 Sw_buffer_cookie[20:18] = 3'b100: pattern 4 only 964 965 Sw_buffer_cookie[20:18] = 3'b101: pattern 5 only 966 967 Sw_buffer_cookie[20:18] = 3'b110: pattern 6 only 968 969 Sw_buffer_cookie[20:18] = 3'b111: pattern 7 only 970 971 972 973 Note: a punctured transmission is indicated by the 974 presence of TLV TX_PUNCTURE_SETUP embedded in the scheduler 975 TLV 976 977 978 979 <legal all> 980 */ 981 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_OFFSET 0x00000004 982 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_LSB 11 983 #define WBM_RELEASE_RING_1_RELEASED_BUFF_OR_DESC_ADDR_INFO_SW_BUFFER_COOKIE_MASK 0xfffff800 984 985 /* Description WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE 986 987 Indicates which module initiated the release of this 988 buffer or descriptor 989 990 991 992 <enum 0 release_source_TQM> TQM released this buffer or 993 descriptor 994 995 <enum 1 release_source_RXDMA> RXDMA released this buffer 996 or descriptor 997 998 <enum 2 release_source_REO> REO released this buffer or 999 descriptor 1000 1001 <enum 3 release_source_FW> FW released this buffer or 1002 descriptor 1003 1004 <enum 4 release_source_SW> SW released this buffer or 1005 descriptor 1006 1007 <legal 0-4> 1008 */ 1009 #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_OFFSET 0x00000008 1010 #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_LSB 0 1011 #define WBM_RELEASE_RING_2_RELEASE_SOURCE_MODULE_MASK 0x00000007 1012 1013 /* Description WBM_RELEASE_RING_2_BM_ACTION 1014 1015 Consumer: WBM/SW/FW 1016 1017 Producer: SW/TQM/RXDMA/REO/SWITCH 1018 1019 1020 1021 Field only valid when the field return_buffer_manager in 1022 the Released_buff_or_desc_addr_info indicates: 1023 1024 WBM_IDLE_BUF_LIST or 1025 1026 WBM_IDLE_DESC_LIST 1027 1028 1029 1030 An MSDU extension descriptor shall never be marked as 1031 1032 1033 1034 <enum 0 Put_in_idle_list> Put the buffer or descriptor 1035 back in the idle list. In case of MSDU or MDPU link 1036 descriptor, BM does not need to check to release any 1037 individual MSDU buffers 1038 1039 1040 1041 <enum 1 release_msdu_list > This BM action can only be 1042 used in combination with buffer_or_desc_type being 1043 msdu_link_descriptor. Field first_msdu_index points out 1044 which MSDU pointer in the MSDU link descriptor is the first 1045 of an MPDU that is released. 1046 1047 BM shall release all the MSDU buffers linked to this 1048 first MSDU buffer pointer. All related MSDU buffer pointer 1049 entries shall be set to value 0, which represents the 'NULL 1050 pointer. When all MSDU buffer pointers in the MSDU link 1051 descriptor are 'NULL', the MSDU link descriptor itself shall 1052 also be released. 1053 1054 1055 1056 <enum 2 Put_in_idle_list_expanded> CURRENTLY NOT 1057 IMPLEMENTED.... 1058 1059 Put the buffer or descriptor back in the idle list. Only 1060 valid in combination with buffer_or_desc_type indicating 1061 MDPU_link_descriptor. 1062 1063 BM shall release the MPDU link descriptor as well as all 1064 MSDUs that are linked to the MPDUs in this descriptor. 1065 1066 1067 1068 <legal 0-2> 1069 */ 1070 #define WBM_RELEASE_RING_2_BM_ACTION_OFFSET 0x00000008 1071 #define WBM_RELEASE_RING_2_BM_ACTION_LSB 3 1072 #define WBM_RELEASE_RING_2_BM_ACTION_MASK 0x00000038 1073 1074 /* Description WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE 1075 1076 Consumer: WBM/SW/FW 1077 1078 Producer: SW/TQM/RXDMA/REO/SWITCH 1079 1080 1081 1082 Field only valid when WBM is marked as the 1083 return_buffer_manager in the Released_Buffer_address_info 1084 1085 1086 1087 Indicates that type of buffer or descriptor is being 1088 released 1089 1090 1091 1092 <enum 0 MSDU_rel_buffer> The address points to an MSDU 1093 buffer 1094 1095 <enum 1 msdu_link_descriptor> The address points to an 1096 TX MSDU link descriptor 1097 1098 <enum 2 mpdu_link_descriptor> The address points to an 1099 MPDU link descriptor 1100 1101 <enum 3 msdu_ext_descriptor > The address points to an 1102 MSDU extension descriptor. 1103 1104 In case BM finds this one in a release ring, it passes 1105 it on to FW... 1106 1107 <enum 4 queue_ext_descriptor> The address points to an 1108 TQM queue extension descriptor. WBM should treat this is the 1109 same way as a link descriptor. That is, put the 128 byte 1110 buffer back in the link buffer idle list. 1111 1112 1113 1114 <legal 0-4> 1115 */ 1116 #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_OFFSET 0x00000008 1117 #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_LSB 6 1118 #define WBM_RELEASE_RING_2_BUFFER_OR_DESC_TYPE_MASK 0x000001c0 1119 1120 /* Description WBM_RELEASE_RING_2_FIRST_MSDU_INDEX 1121 1122 Consumer: WBM/SW/FW 1123 1124 Producer: SW/TQM/RXDMA/REO/SWITCH 1125 1126 1127 1128 Field only valid for the bm_action release_msdu_list. 1129 1130 1131 1132 The index of the first MSDU in an MSDU link descriptor 1133 all belonging to the same MPDU. 1134 1135 1136 1137 <legal 0-6> 1138 */ 1139 #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_OFFSET 0x00000008 1140 #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_LSB 9 1141 #define WBM_RELEASE_RING_2_FIRST_MSDU_INDEX_MASK 0x00001e00 1142 1143 /* Description WBM_RELEASE_RING_2_TQM_RELEASE_REASON 1144 1145 Consumer: WBM/SW/FW 1146 1147 Producer: TQM 1148 1149 1150 1151 Field only valid when Release_source_module is set to 1152 release_source_TQM 1153 1154 1155 1156 (rr = Release Reason) 1157 1158 <enum 0 tqm_rr_frame_acked> frame is removed because an 1159 ACK of BA for it was received 1160 1161 <enum 1 tqm_rr_rem_cmd_rem> frame is removed because a 1162 remove command of type Remove_mpdus initiated by SW 1163 1164 <enum 2 tqm_rr_rem_cmd_tx> frame is removed because a 1165 remove command of type Remove_transmitted_mpdus initiated by 1166 SW 1167 1168 <enum 3 tqm_rr_rem_cmd_notx> frame is removed because a 1169 remove command of type Remove_untransmitted_mpdus initiated 1170 by SW 1171 1172 <enum 4 tqm_rr_rem_cmd_aged> frame is removed because a 1173 remove command of type Remove_aged_mpdus or 1174 Remove_aged_msdus initiated by SW 1175 1176 <enum 5 tqm_fw_reason1> frame is removed because a 1177 remove command where fw indicated that remove reason is 1178 fw_reason1 1179 1180 <enum 6 tqm_fw_reason2> frame is removed because a 1181 remove command where fw indicated that remove reason is 1182 fw_reason1 1183 1184 <enum 7 tqm_fw_reason3> frame is removed because a 1185 remove command where fw indicated that remove reason is 1186 fw_reason1 1187 1188 <enum 8 tqm_rr_rem_cmd_disable_queue> frame is removed 1189 because a remove command of type 1190 remove_mpdus_and_disable_queue or 1191 remove_msdus_and_disable_flow initiated by SW 1192 1193 1194 1195 <legal 0-8> 1196 1197 1198 1199 In case of TQM releasing Tx MSDU link descriptors with 1200 Tqm_release_reason set to 'tqm_fw_reason3,' HastingsPrime 1201 WBM can optionally release the MSDU buffers pointed to by 1202 the MSDU link descriptors to FW and override the 1203 tx_rate_stats field, for FW reinjection of these MSDUs. 1204 This is not supported in Pine. 1205 */ 1206 #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_OFFSET 0x00000008 1207 #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_LSB 13 1208 #define WBM_RELEASE_RING_2_TQM_RELEASE_REASON_MASK 0x0001e000 1209 1210 /* Description WBM_RELEASE_RING_2_RXDMA_PUSH_REASON 1211 1212 Field only valid when Release_source_module is set to 1213 release_source_RXDMA 1214 1215 1216 1217 Indicates why rxdma pushed the frame to this ring 1218 1219 1220 1221 <enum 0 rxdma_error_detected> RXDMA detected an error an 1222 pushed this frame to this queue 1223 1224 <enum 1 rxdma_routing_instruction> RXDMA pushed the 1225 frame to this queue per received routing instructions. No 1226 error within RXDMA was detected 1227 1228 <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a 1229 result the MSDU link descriptor might not have the 1230 last_msdu_in_mpdu_flag set, but instead WBM might just see a 1231 NULL pointer in the MSDU link descriptor. This is to be 1232 considered a normal condition for this scenario. 1233 1234 1235 1236 <legal 0 - 2> 1237 */ 1238 #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_OFFSET 0x00000008 1239 #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_LSB 17 1240 #define WBM_RELEASE_RING_2_RXDMA_PUSH_REASON_MASK 0x00060000 1241 1242 /* Description WBM_RELEASE_RING_2_RXDMA_ERROR_CODE 1243 1244 Field only valid when 'rxdma_push_reason' set to 1245 'rxdma_error_detected'. 1246 1247 1248 1249 <enum 0 rxdma_overflow_err>MPDU frame is not complete 1250 due to a FIFO overflow error in RXPCU. 1251 1252 <enum 1 rxdma_mpdu_length_err>MPDU frame is not complete 1253 due to receiving incomplete MPDU from the PHY 1254 1255 1256 <enum 3 rxdma_decrypt_err>CRYPTO reported a decryption 1257 error or CRYPTO received an encrypted frame, but did not get 1258 a valid corresponding key id in the peer entry. 1259 1260 <enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC 1261 error 1262 1263 <enum 5 rxdma_unecrypted_err>CRYPTO reported an 1264 unencrypted frame error when encrypted was expected 1265 1266 <enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU 1267 length error 1268 1269 <enum 7 rxdma_msdu_limit_err>RX OLE reported that max 1270 number of MSDUs allowed in an MPDU got exceeded 1271 1272 <enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing 1273 error 1274 1275 <enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU 1276 parsing error 1277 1278 <enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout 1279 during SA search 1280 1281 <enum 11 rxdma_da_timeout_err>RX OLE reported a timeout 1282 during DA search 1283 1284 <enum 12 rxdma_flow_timeout_err>RX OLE reported a 1285 timeout during flow search 1286 1287 <enum 13 rxdma_flush_request>RXDMA received a flush 1288 request 1289 1290 <enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU 1291 present as well as a fragmented MPDU. A-MSDU defragmentation 1292 is not supported in Lithium SW so this is treated as an 1293 error. 1294 */ 1295 #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_OFFSET 0x00000008 1296 #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_LSB 19 1297 #define WBM_RELEASE_RING_2_RXDMA_ERROR_CODE_MASK 0x00f80000 1298 1299 /* Description WBM_RELEASE_RING_2_REO_PUSH_REASON 1300 1301 Field only valid when Release_source_module is set to 1302 release_source_REO 1303 1304 1305 1306 Indicates why REO pushed the frame to this release ring 1307 1308 1309 1310 <enum 0 reo_error_detected> Reo detected an error an 1311 pushed this frame to this queue 1312 1313 <enum 1 reo_routing_instruction> Reo pushed the frame to 1314 this queue per received routing instructions. No error 1315 within REO was detected 1316 1317 1318 1319 <legal 0 - 1> 1320 */ 1321 #define WBM_RELEASE_RING_2_REO_PUSH_REASON_OFFSET 0x00000008 1322 #define WBM_RELEASE_RING_2_REO_PUSH_REASON_LSB 24 1323 #define WBM_RELEASE_RING_2_REO_PUSH_REASON_MASK 0x03000000 1324 1325 /* Description WBM_RELEASE_RING_2_REO_ERROR_CODE 1326 1327 Field only valid when 'Reo_push_reason' set to 1328 'reo_error_detected'. 1329 1330 1331 1332 <enum 0 reo_queue_desc_addr_zero> Reo queue descriptor 1333 provided in the REO_ENTRANCE ring is set to 0 1334 1335 <enum 1 reo_queue_desc_not_valid> Reo queue descriptor 1336 valid bit is NOT set 1337 1338 <enum 2 ampdu_in_non_ba> AMPDU frame received without BA 1339 session having been setup. 1340 1341 <enum 3 non_ba_duplicate> Non-BA session, SN equal to 1342 SSN, Retry bit set: duplicate frame 1343 1344 <enum 4 ba_duplicate> BA session, duplicate frame 1345 1346 <enum 5 regular_frame_2k_jump> A normal (management/data 1347 frame) received with 2K jump in SN 1348 1349 <enum 6 bar_frame_2k_jump> A bar received with 2K jump 1350 in SSN 1351 1352 <enum 7 regular_frame_OOR> A normal (management/data 1353 frame) received with SN falling within the OOR window 1354 1355 <enum 8 bar_frame_OOR> A bar received with SSN falling 1356 within the OOR window 1357 1358 <enum 9 bar_frame_no_ba_session> A bar received without 1359 a BA session 1360 1361 <enum 10 bar_frame_sn_equals_ssn> A bar received with 1362 SSN equal to SN 1363 1364 <enum 11 pn_check_failed> PN Check Failed packet. 1365 1366 <enum 12 2k_error_handling_flag_set> Frame is forwarded 1367 as a result of the 'Seq_2k_error_detected_flag' been set in 1368 the REO Queue descriptor 1369 1370 <enum 13 pn_error_handling_flag_set> Frame is forwarded 1371 as a result of the 'pn_error_detected_flag' been set in the 1372 REO Queue descriptor 1373 1374 <enum 14 queue_descriptor_blocked_set> Frame is 1375 forwarded as a result of the queue descriptor(address) being 1376 blocked as SW/FW seems to be currently in the process of 1377 making updates to this descriptor... 1378 1379 1380 1381 <legal 0-14> 1382 */ 1383 #define WBM_RELEASE_RING_2_REO_ERROR_CODE_OFFSET 0x00000008 1384 #define WBM_RELEASE_RING_2_REO_ERROR_CODE_LSB 26 1385 #define WBM_RELEASE_RING_2_REO_ERROR_CODE_MASK 0x7c000000 1386 1387 /* Description WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR 1388 1389 Can only be set by WBM. 1390 1391 1392 1393 Is set when WBM got a buffer pointer but the action was 1394 to push it to the idle link descriptor ring or do link 1395 related activity 1396 1397 OR 1398 1399 Is set when WBM got a link buffer pointer but the action 1400 was to push it to the buffer descriptor ring 1401 1402 1403 1404 <legal all> 1405 */ 1406 #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_OFFSET 0x00000008 1407 #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_LSB 31 1408 #define WBM_RELEASE_RING_2_WBM_INTERNAL_ERROR_MASK 0x80000000 1409 1410 /* Description WBM_RELEASE_RING_3_TQM_STATUS_NUMBER 1411 1412 Field only valid when Release_source_module is set to 1413 release_source_TQM 1414 1415 1416 1417 The value in this field is equal to value of the 1418 'TQM_CMD_Number' field the TQM command or the 1419 'TQM_add_cmd_Number' field from the TQM entrance ring 1420 descriptor 1421 1422 1423 1424 This field helps to correlate the statuses with the TQM 1425 commands. 1426 1427 1428 1429 NOTE that SW could program this number to be equal to 1430 the PPDU_ID number in case direct correlation with the PPDU 1431 ID is desired 1432 1433 1434 1435 <legal all> 1436 */ 1437 #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_OFFSET 0x0000000c 1438 #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_LSB 0 1439 #define WBM_RELEASE_RING_3_TQM_STATUS_NUMBER_MASK 0x00ffffff 1440 1441 /* Description WBM_RELEASE_RING_3_TRANSMIT_COUNT 1442 1443 Field only valid when Release_source_module is set to 1444 release_source_TQM 1445 1446 1447 1448 The number of times this frame has been transmitted 1449 */ 1450 #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_OFFSET 0x0000000c 1451 #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_LSB 24 1452 #define WBM_RELEASE_RING_3_TRANSMIT_COUNT_MASK 0x7f000000 1453 1454 /* Description WBM_RELEASE_RING_3_MSDU_CONTINUATION 1455 1456 requests MSDU_continuation reporting for Rx 1457 MSDUs in Pine and HastingsPrime for which 1458 SW_release_details_valid may not be set. 1459 1460 <legal all> 1461 */ 1462 #define WBM_RELEASE_RING_3_MSDU_CONTINUATION_OFFSET 0x0000000c 1463 #define WBM_RELEASE_RING_3_MSDU_CONTINUATION_LSB 31 1464 #define WBM_RELEASE_RING_3_MSDU_CONTINUATION_MASK 0x80000000 1465 1466 /* Description WBM_RELEASE_RING_4_ACK_FRAME_RSSI 1467 1468 This field is only valid when the source is TQM. 1469 1470 1471 1472 If this frame is removed as the result of the reception 1473 of an ACK or BA, this field indicates the RSSI of the 1474 received ACK or BA frame. 1475 1476 1477 1478 When the frame is removed as result of a direct remove 1479 command from the SW, this field is set to 0x0 (which is 1480 never a valid value when real RSSI is available) 1481 1482 1483 1484 <legal all> 1485 */ 1486 #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_OFFSET 0x00000010 1487 #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_LSB 0 1488 #define WBM_RELEASE_RING_4_ACK_FRAME_RSSI_MASK 0x000000ff 1489 1490 /* Description WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID 1491 1492 Consumer: SW 1493 1494 Producer: WBM 1495 1496 1497 1498 When set, some WBM specific release info for SW is 1499 valid. 1500 1501 This is set when WMB got a 'release_msdu_list' command 1502 from TQM and the return buffer manager is not WMB. WBM will 1503 then de-aggregate all the MSDUs and pass them one at a time 1504 on to the 'buffer owner' 1505 1506 1507 1508 <legal all> 1509 */ 1510 #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_OFFSET 0x00000010 1511 #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_LSB 8 1512 #define WBM_RELEASE_RING_4_SW_RELEASE_DETAILS_VALID_MASK 0x00000100 1513 1514 /* Description WBM_RELEASE_RING_4_FIRST_MSDU 1515 1516 Field only valid when SW_release_details_valid is set. 1517 1518 1519 1520 Consumer: SW 1521 1522 Producer: WBM 1523 1524 1525 1526 When set, this MSDU is the first MSDU pointed to in the 1527 'release_msdu_list' command. 1528 1529 1530 1531 extends this to Rx MSDUs in Pine and 1532 HastingsPrime for which SW_release_details_valid may not be 1533 set. 1534 1535 <legal all> 1536 */ 1537 #define WBM_RELEASE_RING_4_FIRST_MSDU_OFFSET 0x00000010 1538 #define WBM_RELEASE_RING_4_FIRST_MSDU_LSB 9 1539 #define WBM_RELEASE_RING_4_FIRST_MSDU_MASK 0x00000200 1540 1541 /* Description WBM_RELEASE_RING_4_LAST_MSDU 1542 1543 Field only valid when SW_release_details_valid is set. 1544 1545 1546 1547 Consumer: SW 1548 1549 Producer: WBM 1550 1551 1552 1553 When set, this MSDU is the last MSDU pointed to in the 1554 'release_msdu_list' command. 1555 1556 1557 1558 extends this to Rx MSDUs in Pine and 1559 HastingsPrime for which SW_release_details_valid may not be 1560 set. 1561 1562 <legal all> 1563 */ 1564 #define WBM_RELEASE_RING_4_LAST_MSDU_OFFSET 0x00000010 1565 #define WBM_RELEASE_RING_4_LAST_MSDU_LSB 10 1566 #define WBM_RELEASE_RING_4_LAST_MSDU_MASK 0x00000400 1567 1568 /* Description WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU 1569 1570 Field only valid when SW_release_details_valid is set. 1571 1572 1573 1574 Consumer: SW 1575 1576 Producer: WBM 1577 1578 1579 1580 When set, this MSDU was part of an A-MSDU in MPDU 1581 1582 <legal all> 1583 */ 1584 #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_OFFSET 0x00000010 1585 #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_LSB 11 1586 #define WBM_RELEASE_RING_4_MSDU_PART_OF_AMSDU_MASK 0x00000800 1587 1588 /* Description WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME 1589 1590 Field only valid when SW_release_details_valid is set. 1591 1592 1593 1594 Consumer: SW 1595 1596 Producer: WBM 1597 1598 1599 1600 This is the FW_tx_notify_frame field from the 1601 1602 <legal all> 1603 */ 1604 #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_OFFSET 0x00000010 1605 #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_LSB 12 1606 #define WBM_RELEASE_RING_4_FW_TX_NOTIFY_FRAME_MASK 0x00001000 1607 1608 /* Description WBM_RELEASE_RING_4_BUFFER_TIMESTAMP 1609 1610 Field only valid when SW_release_details_valid is set. 1611 1612 1613 1614 Consumer: SW 1615 1616 Producer: WBM 1617 1618 1619 1620 This is the Buffer_timestamp field from the 1621 TX_MSDU_DETAILS for this frame from the MSDU link 1622 descriptor. 1623 1624 1625 1626 Timestamp in units of 1024 µs 1627 1628 <legal all> 1629 */ 1630 #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_OFFSET 0x00000010 1631 #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_LSB 13 1632 #define WBM_RELEASE_RING_4_BUFFER_TIMESTAMP_MASK 0xffffe000 1633 1634 /* EXTERNAL REFERENCE : struct tx_rate_stats_info tx_rate_stats */ 1635 1636 1637 /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID 1638 1639 When set all other fields in this STRUCT contain valid 1640 info. 1641 1642 1643 1644 1645 <legal all> 1646 */ 1647 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_OFFSET 0x00000014 1648 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_LSB 0 1649 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TX_RATE_STATS_INFO_VALID_MASK 0x00000001 1650 1651 /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_BW 1652 1653 Field only valid when Tx_rate_stats_info_valid is set 1654 1655 1656 1657 Indicates the BW of the upcoming transmission that shall 1658 likely start in about 3 -4 us on the medium 1659 1660 1661 1662 <enum 0 transmit_bw_20_MHz> 1663 1664 <enum 1 transmit_bw_40_MHz> 1665 1666 <enum 2 transmit_bw_80_MHz> 1667 1668 <enum 3 transmit_bw_160_MHz> 1669 1670 1671 1672 <legal all> 1673 */ 1674 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_BW_OFFSET 0x00000014 1675 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_BW_LSB 1 1676 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_BW_MASK 0x00000006 1677 1678 /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_PKT_TYPE 1679 1680 Field only valid when Tx_rate_stats_info_valid is set 1681 1682 1683 1684 Field filled in by PDG. 1685 1686 Not valid when in SW transmit mode 1687 1688 1689 1690 The packet type 1691 1692 <enum 0 dot11a>802.11a PPDU type 1693 1694 <enum 1 dot11b>802.11b PPDU type 1695 1696 <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type 1697 1698 <enum 3 dot11ac>802.11ac PPDU type 1699 1700 <enum 4 dot11ax>802.11ax PPDU type 1701 1702 <enum 5 dot11ba>802.11ba (WUR) PPDU type 1703 */ 1704 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_PKT_TYPE_OFFSET 0x00000014 1705 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_PKT_TYPE_LSB 3 1706 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_PKT_TYPE_MASK 0x00000078 1707 1708 /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_STBC 1709 1710 Field only valid when Tx_rate_stats_info_valid is set 1711 1712 1713 1714 Field filled in by PDG. 1715 1716 Not valid when in SW transmit mode 1717 1718 1719 1720 When set, STBC transmission rate was used. 1721 */ 1722 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_STBC_OFFSET 0x00000014 1723 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_STBC_LSB 7 1724 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_STBC_MASK 0x00000080 1725 1726 /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_LDPC 1727 1728 Field only valid when Tx_rate_stats_info_valid is set 1729 1730 1731 1732 Field filled in by PDG. 1733 1734 Not valid when in SW transmit mode 1735 1736 1737 1738 When set, use LDPC transmission rates 1739 */ 1740 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_LDPC_OFFSET 0x00000014 1741 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_LDPC_LSB 8 1742 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_LDPC_MASK 0x00000100 1743 1744 /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_SGI 1745 1746 Field only valid when Tx_rate_stats_info_valid is set 1747 1748 1749 1750 Field filled in by PDG. 1751 1752 Not valid when in SW transmit mode 1753 1754 1755 1756 <enum 0 0_8_us_sgi > Legacy normal GI. Can also be 1757 used for HE 1758 1759 <enum 1 0_4_us_sgi > Legacy short GI. Can also be 1760 used for HE 1761 1762 <enum 2 1_6_us_sgi > HE related GI 1763 1764 <enum 3 3_2_us_sgi > HE related GI 1765 1766 <legal 0 - 3> 1767 */ 1768 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_SGI_OFFSET 0x00000014 1769 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_SGI_LSB 9 1770 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_SGI_MASK 0x00000600 1771 1772 /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_MCS 1773 1774 Field only valid when Tx_rate_stats_info_valid is set 1775 1776 1777 1778 Field filled in by PDG. 1779 1780 Not valid when in SW transmit mode 1781 1782 1783 1784 For details, refer to MCS_TYPE description 1785 1786 <legal all> 1787 */ 1788 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_MCS_OFFSET 0x00000014 1789 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_MCS_LSB 11 1790 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TRANSMIT_MCS_MASK 0x00007800 1791 1792 /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_OFDMA_TRANSMISSION 1793 1794 Field only valid when Tx_rate_stats_info_valid is set 1795 1796 1797 1798 Field filled in by PDG. 1799 1800 1801 1802 Set when the transmission was an OFDMA transmission (DL 1803 or UL). 1804 1805 <legal all> 1806 */ 1807 #define WBM_RELEASE_RING_5_TX_RATE_STATS_OFDMA_TRANSMISSION_OFFSET 0x00000014 1808 #define WBM_RELEASE_RING_5_TX_RATE_STATS_OFDMA_TRANSMISSION_LSB 15 1809 #define WBM_RELEASE_RING_5_TX_RATE_STATS_OFDMA_TRANSMISSION_MASK 0x00008000 1810 1811 /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_TONES_IN_RU 1812 1813 Field only valid when Tx_rate_stats_info_valid is set 1814 1815 1816 1817 Field filled in by PDG. 1818 1819 Not valid when in SW transmit mode 1820 1821 1822 1823 The number of tones in the RU used. 1824 1825 <legal all> 1826 */ 1827 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TONES_IN_RU_OFFSET 0x00000014 1828 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TONES_IN_RU_LSB 16 1829 #define WBM_RELEASE_RING_5_TX_RATE_STATS_TONES_IN_RU_MASK 0x0fff0000 1830 1831 /* Description WBM_RELEASE_RING_5_TX_RATE_STATS_RESERVED_0A 1832 1833 <legal 0> 1834 */ 1835 #define WBM_RELEASE_RING_5_TX_RATE_STATS_RESERVED_0A_OFFSET 0x00000014 1836 #define WBM_RELEASE_RING_5_TX_RATE_STATS_RESERVED_0A_LSB 28 1837 #define WBM_RELEASE_RING_5_TX_RATE_STATS_RESERVED_0A_MASK 0xf0000000 1838 1839 /* Description WBM_RELEASE_RING_6_TX_RATE_STATS_PPDU_TRANSMISSION_TSF 1840 1841 Field only valid when Tx_rate_stats_info_valid is set 1842 1843 1844 1845 Based on a HWSCH configuration register setting, this 1846 field either contains: 1847 1848 1849 1850 Lower 32 bits of the TSF, snapshot of this value when 1851 transmission of the PPDU containing the frame finished. 1852 1853 OR 1854 1855 Lower 32 bits of the TSF, snapshot of this value when 1856 transmission of the PPDU containing the frame started 1857 1858 1859 1860 <legal all> 1861 */ 1862 #define WBM_RELEASE_RING_6_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_OFFSET 0x00000018 1863 #define WBM_RELEASE_RING_6_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_LSB 0 1864 #define WBM_RELEASE_RING_6_TX_RATE_STATS_PPDU_TRANSMISSION_TSF_MASK 0xffffffff 1865 1866 /* Description WBM_RELEASE_RING_7_SW_PEER_ID 1867 1868 Field only valid when Release_source_module is set to 1869 release_source_TQM 1870 1871 1872 1873 1) Release of msdu buffer due to drop_frame = 1. Flow is 1874 not fetched and hence sw_peer_id and tid = 0 1875 1876 buffer_or_desc_type = e_num 0 1877 MSDU_rel_buffertqm_release_reason = e_num 1 1878 tqm_rr_rem_cmd_rem 1879 1880 1881 1882 1883 1884 2) Release of msdu buffer due to Flow is not fetched and 1885 hence sw_peer_id and tid = 0 1886 1887 buffer_or_desc_type = e_num 0 1888 MSDU_rel_buffertqm_release_reason = e_num 1 1889 tqm_rr_rem_cmd_rem 1890 1891 1892 1893 1894 1895 3) Release of msdu link due to remove_mpdu or acked_mpdu 1896 command. 1897 1898 buffer_or_desc_type = e_num1 1899 msdu_link_descriptortqm_release_reason can be:e_num 1 1900 tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx 1901 1902 e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged 1903 1904 1905 1906 Sw_peer_id from the TX_MSDU_FLOW descriptor or 1907 TX_MPDU_QUEUE descriptor 1908 1909 <legal all> 1910 */ 1911 #define WBM_RELEASE_RING_7_SW_PEER_ID_OFFSET 0x0000001c 1912 #define WBM_RELEASE_RING_7_SW_PEER_ID_LSB 0 1913 #define WBM_RELEASE_RING_7_SW_PEER_ID_MASK 0x0000ffff 1914 1915 /* Description WBM_RELEASE_RING_7_TID 1916 1917 Field only valid when Release_source_module is set to 1918 release_source_TQM 1919 1920 1921 1922 1) Release of msdu buffer due to drop_frame = 1. Flow is 1923 not fetched and hence sw_peer_id and tid = 0 1924 1925 buffer_or_desc_type = e_num 0 1926 MSDU_rel_buffertqm_release_reason = e_num 1 1927 tqm_rr_rem_cmd_rem 1928 1929 1930 1931 1932 1933 2) Release of msdu buffer due to Flow is not fetched and 1934 hence sw_peer_id and tid = 0 1935 1936 buffer_or_desc_type = e_num 0 1937 MSDU_rel_buffertqm_release_reason = e_num 1 1938 tqm_rr_rem_cmd_rem 1939 1940 1941 1942 1943 1944 3) Release of msdu link due to remove_mpdu or acked_mpdu 1945 command. 1946 1947 buffer_or_desc_type = e_num1 1948 msdu_link_descriptortqm_release_reason can be:e_num 1 1949 tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx 1950 1951 e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged 1952 1953 1954 1955 1956 1957 This field represents the TID from the TX_MSDU_FLOW 1958 descriptor or TX_MPDU_QUEUE descriptor 1959 1960 1961 1962 <legal all> 1963 */ 1964 #define WBM_RELEASE_RING_7_TID_OFFSET 0x0000001c 1965 #define WBM_RELEASE_RING_7_TID_LSB 16 1966 #define WBM_RELEASE_RING_7_TID_MASK 0x000f0000 1967 1968 /* Description WBM_RELEASE_RING_7_RING_ID 1969 1970 Consumer: TQM/REO/RXDMA/SW 1971 1972 Producer: SRNG (of RXDMA) 1973 1974 1975 1976 For debugging. 1977 1978 This field is filled in by the SRNG module. 1979 1980 It help to identify the ring that is being looked <legal 1981 all> 1982 */ 1983 #define WBM_RELEASE_RING_7_RING_ID_OFFSET 0x0000001c 1984 #define WBM_RELEASE_RING_7_RING_ID_LSB 20 1985 #define WBM_RELEASE_RING_7_RING_ID_MASK 0x0ff00000 1986 1987 /* Description WBM_RELEASE_RING_7_LOOPING_COUNT 1988 1989 Consumer: WBM/SW/FW 1990 1991 Producer: SW/TQM/RXDMA/REO/SWITCH 1992 1993 1994 1995 A count value that indicates the number of times the 1996 producer of entries into the Buffer Manager Ring has looped 1997 around the ring. 1998 1999 At initialization time, this value is set to 0. On the 2000 first loop, this value is set to 1. After the max value is 2001 reached allowed by the number of bits for this field, the 2002 count value continues with 0 again. 2003 2004 2005 2006 In case SW is the consumer of the ring entries, it can 2007 use this field to figure out up to where the producer of 2008 entries has created new entries. This eliminates the need to 2009 check where the head pointer' of the ring is located once 2010 the SW starts processing an interrupt indicating that new 2011 entries have been put into this ring... 2012 2013 2014 2015 Also note that SW if it wants only needs to look at the 2016 LSB bit of this count value. 2017 2018 <legal all> 2019 */ 2020 #define WBM_RELEASE_RING_7_LOOPING_COUNT_OFFSET 0x0000001c 2021 #define WBM_RELEASE_RING_7_LOOPING_COUNT_LSB 28 2022 #define WBM_RELEASE_RING_7_LOOPING_COUNT_MASK 0xf0000000 2023 2024 2025 #endif // _WBM_RELEASE_RING_H_ 2026