txpcu_buffer_basics.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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. #ifndef _TXPCU_BUFFER_BASICS_H_
  17. #define _TXPCU_BUFFER_BASICS_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_TXPCU_BUFFER_BASICS 1
  21. struct txpcu_buffer_basics {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t available_memory : 8, // [7:0]
  24. partial_tx_data_tlv_count : 8, // [15:8]
  25. tx_data_tlv_count : 16; // [31:16]
  26. #else
  27. uint32_t tx_data_tlv_count : 16, // [31:16]
  28. partial_tx_data_tlv_count : 8, // [15:8]
  29. available_memory : 8; // [7:0]
  30. #endif
  31. };
  32. /* Description AVAILABLE_MEMORY
  33. The amount of TX_FIFO memory in 128 byte units that is available.
  34. TXPCU gets this from the Avail_fifo_mem signal from SFM.
  35. When SFM is indicating a larger available amount, that value
  36. shall be saturated to 0xFF in this field.
  37. <legal all>
  38. */
  39. #define TXPCU_BUFFER_BASICS_AVAILABLE_MEMORY_OFFSET 0x00000000
  40. #define TXPCU_BUFFER_BASICS_AVAILABLE_MEMORY_LSB 0
  41. #define TXPCU_BUFFER_BASICS_AVAILABLE_MEMORY_MSB 7
  42. #define TXPCU_BUFFER_BASICS_AVAILABLE_MEMORY_MASK 0x000000ff
  43. /* Description PARTIAL_TX_DATA_TLV_COUNT
  44. The number of 16 bytes units received of the TX_DATA TLV
  45. that is currently under reception by TXPCU.
  46. Value saturates at 255 in case TX_DATA TLV length is larger
  47. then 4080 bytes. This is unlikely as TX_DATA will generally
  48. not be larger then then the Max MSDU size.
  49. <legal all>
  50. */
  51. #define TXPCU_BUFFER_BASICS_PARTIAL_TX_DATA_TLV_COUNT_OFFSET 0x00000000
  52. #define TXPCU_BUFFER_BASICS_PARTIAL_TX_DATA_TLV_COUNT_LSB 8
  53. #define TXPCU_BUFFER_BASICS_PARTIAL_TX_DATA_TLV_COUNT_MSB 15
  54. #define TXPCU_BUFFER_BASICS_PARTIAL_TX_DATA_TLV_COUNT_MASK 0x0000ff00
  55. /* Description TX_DATA_TLV_COUNT
  56. The number of completely received TX_DATA TLVs (of all the
  57. users together) received by TXPCU
  58. <legal all>
  59. */
  60. #define TXPCU_BUFFER_BASICS_TX_DATA_TLV_COUNT_OFFSET 0x00000000
  61. #define TXPCU_BUFFER_BASICS_TX_DATA_TLV_COUNT_LSB 16
  62. #define TXPCU_BUFFER_BASICS_TX_DATA_TLV_COUNT_MSB 31
  63. #define TXPCU_BUFFER_BASICS_TX_DATA_TLV_COUNT_MASK 0xffff0000
  64. #endif // TXPCU_BUFFER_BASICS