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