response_start_status.h 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
  2. *
  3. * Permission to use, copy, modify, and/or distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies.
  6. *
  7. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. #ifndef _RESPONSE_START_STATUS_H_
  16. #define _RESPONSE_START_STATUS_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #define NUM_OF_DWORDS_RESPONSE_START_STATUS 2
  20. #define NUM_OF_QWORDS_RESPONSE_START_STATUS 1
  21. struct response_start_status {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t generated_response : 3, // [2:0]
  24. ftm_tm : 2, // [4:3]
  25. trig_response_related : 1, // [5:5]
  26. response_sta_count : 7, // [12:6]
  27. reserved : 19; // [31:13]
  28. uint32_t phy_ppdu_id : 16, // [15:0]
  29. sw_peer_id : 16; // [31:16]
  30. #else
  31. uint32_t reserved : 19, // [31:13]
  32. response_sta_count : 7, // [12:6]
  33. trig_response_related : 1, // [5:5]
  34. ftm_tm : 2, // [4:3]
  35. generated_response : 3; // [2:0]
  36. uint32_t sw_peer_id : 16, // [31:16]
  37. phy_ppdu_id : 16; // [15:0]
  38. #endif
  39. };
  40. /* Description GENERATED_RESPONSE
  41. The generated response frame
  42. <enum 0 selfgen_ACK> TXPCU generated an ACK response. Note
  43. that this can be part of a trigger response. In that case
  44. bit trig_response_related will be set as well.
  45. <enum 1 selfgen_CTS> TXPCU generated an CTS response. Note
  46. that this can be part of a trigger response. In that case
  47. bit trig_response_related will be set as well.
  48. <enum 2 selfgen_BA> TXPCU generated a BA response. Note
  49. that this can be part of a trigger response. In that case
  50. bit trig_response_related will be set as well.
  51. <enum 3 selfgen_MBA> TXPCU generated an M BA response. Note
  52. that this can be part of a trigger response. In that case
  53. bit trig_response_related will be set as well.
  54. <enum 4 selfgen_CBF> TXPCU generated a CBF response. Note
  55. that this can be part of a trigger response. In that case
  56. bit trig_response_related will be set as well.
  57. <enum 5 selfgen_other_trig_response>
  58. TXPCU generated a trigger related response of a type not
  59. specified above. Note that in this case bit trig_response_related
  60. will be set as well.
  61. This e-num will also be used when TXPCU has been programmed
  62. to overwrite it's own self gen response generation, and
  63. wait for the response to come from SCH..
  64. Also applicable for basic trigger response.
  65. <enum 6 selfgen_NDP_LMR> TXPCU generated a self-gen NDP
  66. followed by a self-gen LMR for the ranging NDPA followed
  67. by NDP received by RXPCU.
  68. <legal 0-6>
  69. */
  70. #define RESPONSE_START_STATUS_GENERATED_RESPONSE_OFFSET 0x0000000000000000
  71. #define RESPONSE_START_STATUS_GENERATED_RESPONSE_LSB 0
  72. #define RESPONSE_START_STATUS_GENERATED_RESPONSE_MSB 2
  73. #define RESPONSE_START_STATUS_GENERATED_RESPONSE_MASK 0x0000000000000007
  74. /* Description FTM_TM
  75. This field Indicates if the response is related to receiving
  76. a TM or FTM frame
  77. 0: no TM and no FTM frame => there is NO measurement done
  78. 1: FTM frame
  79. 2: TM frame
  80. 3: reserved
  81. */
  82. #define RESPONSE_START_STATUS_FTM_TM_OFFSET 0x0000000000000000
  83. #define RESPONSE_START_STATUS_FTM_TM_LSB 3
  84. #define RESPONSE_START_STATUS_FTM_TM_MSB 4
  85. #define RESPONSE_START_STATUS_FTM_TM_MASK 0x0000000000000018
  86. /* Description TRIG_RESPONSE_RELATED
  87. When set, this TLV is generated by TXPCU in the context
  88. of a response transmission to a received trigger frame.
  89. <legal all>
  90. */
  91. #define RESPONSE_START_STATUS_TRIG_RESPONSE_RELATED_OFFSET 0x0000000000000000
  92. #define RESPONSE_START_STATUS_TRIG_RESPONSE_RELATED_LSB 5
  93. #define RESPONSE_START_STATUS_TRIG_RESPONSE_RELATED_MSB 5
  94. #define RESPONSE_START_STATUS_TRIG_RESPONSE_RELATED_MASK 0x0000000000000020
  95. /* Description RESPONSE_STA_COUNT
  96. The number of STAs to which the responses need to be sent.
  97. In case of multiple ACKs/BAs to be send, TXPCU uses this
  98. field to determine what address formatting to use for the
  99. response frame: This could be broadcast or unicast.
  100. <legal all>
  101. */
  102. #define RESPONSE_START_STATUS_RESPONSE_STA_COUNT_OFFSET 0x0000000000000000
  103. #define RESPONSE_START_STATUS_RESPONSE_STA_COUNT_LSB 6
  104. #define RESPONSE_START_STATUS_RESPONSE_STA_COUNT_MSB 12
  105. #define RESPONSE_START_STATUS_RESPONSE_STA_COUNT_MASK 0x0000000000001fc0
  106. /* Description RESERVED
  107. <legal 0>
  108. */
  109. #define RESPONSE_START_STATUS_RESERVED_OFFSET 0x0000000000000000
  110. #define RESPONSE_START_STATUS_RESERVED_LSB 13
  111. #define RESPONSE_START_STATUS_RESERVED_MSB 31
  112. #define RESPONSE_START_STATUS_RESERVED_MASK 0x00000000ffffe000
  113. /* Description PHY_PPDU_ID
  114. The PHY_PPDU_ID of the received PPDU for which this response
  115. is generated.
  116. */
  117. #define RESPONSE_START_STATUS_PHY_PPDU_ID_OFFSET 0x0000000000000000
  118. #define RESPONSE_START_STATUS_PHY_PPDU_ID_LSB 32
  119. #define RESPONSE_START_STATUS_PHY_PPDU_ID_MSB 47
  120. #define RESPONSE_START_STATUS_PHY_PPDU_ID_MASK 0x0000ffff00000000
  121. /* Description SW_PEER_ID
  122. This field is only valid when Response_STA_count is set
  123. to 1
  124. An identifier indicating for which device this response
  125. is needed.
  126. <legal all>
  127. */
  128. #define RESPONSE_START_STATUS_SW_PEER_ID_OFFSET 0x0000000000000000
  129. #define RESPONSE_START_STATUS_SW_PEER_ID_LSB 48
  130. #define RESPONSE_START_STATUS_SW_PEER_ID_MSB 63
  131. #define RESPONSE_START_STATUS_SW_PEER_ID_MASK 0xffff000000000000
  132. #endif // RESPONSE_START_STATUS