no_ack_report.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  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 _NO_ACK_REPORT_H_
  16. #define _NO_ACK_REPORT_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #define NUM_OF_DWORDS_NO_ACK_REPORT 4
  20. struct no_ack_report {
  21. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  22. uint32_t no_ack_transmit_reason : 4, // [3:0]
  23. macrx_abort_reason : 4, // [7:4]
  24. phyrx_abort_reason : 8, // [15:8]
  25. frame_control : 16; // [31:16]
  26. uint32_t rx_ppdu_duration : 24, // [23:0]
  27. sr_ppdu_during_obss : 1, // [24:24]
  28. selfgen_response_reason_to_sr_ppdu : 4, // [28:25]
  29. reserved_1 : 3; // [31:29]
  30. uint32_t pre_bt_broadcast_status_details : 12, // [11:0]
  31. first_bt_broadcast_status_details : 12, // [23:12]
  32. reserved_2 : 8; // [31:24]
  33. uint32_t second_bt_broadcast_status_details : 12, // [11:0]
  34. reserved_3 : 20; // [31:12]
  35. #else
  36. uint32_t frame_control : 16, // [31:16]
  37. phyrx_abort_reason : 8, // [15:8]
  38. macrx_abort_reason : 4, // [7:4]
  39. no_ack_transmit_reason : 4; // [3:0]
  40. uint32_t reserved_1 : 3, // [31:29]
  41. selfgen_response_reason_to_sr_ppdu : 4, // [28:25]
  42. sr_ppdu_during_obss : 1, // [24:24]
  43. rx_ppdu_duration : 24; // [23:0]
  44. uint32_t reserved_2 : 8, // [31:24]
  45. first_bt_broadcast_status_details : 12, // [23:12]
  46. pre_bt_broadcast_status_details : 12; // [11:0]
  47. uint32_t reserved_3 : 20, // [31:12]
  48. second_bt_broadcast_status_details : 12; // [11:0]
  49. #endif
  50. };
  51. /* Description NO_ACK_TRANSMIT_REASON
  52. Field that indicates why the received frame is not needing
  53. any transmit response in SIFS time.
  54. The possible responses are listed in order.
  55. <enum 0 NO_ACK_FCS_errors > All received frames have
  56. FCS errors.
  57. <enum 1 Unicast_no_ack_frame_received > All received
  58. frames did not require a response.
  59. <enum 2 NO_ACK_Broadcast> Broadcast frame received
  60. <enum 3 NO_ACK_Multicast> Multicast frame received
  61. <enum 4 Not_directed> Frames received are not directed
  62. to this device (based on addr1)
  63. <enum 5 AST_no_ack> The AST entry indicated that NO
  64. ACK shall be send
  65. <enum 6 PHY_GID_mismatch> PHY dropped the incoming frame
  66. dur to GID mismatch
  67. <enum 7 PHY_AID_mismatch> PHY dropped the incoming frame
  68. dur to AID mismatch
  69. <enum 8 NO_ACK_PHY_error> PHY reported an error during
  70. reception. For details, see the 'phy_error...' fields
  71. <enum 9 RTS_bw_not_available> The requested BW for the
  72. CTS response frame is not available
  73. <enum 10 NDPA_Frame> An NDPA frame got received
  74. <enum 11 NDP_Frame> An NDP frame got received
  75. <enum 12 Trigger_NAV_blocked> a trigger frame was received,
  76. but due to NAV setting, no response could be generated
  77. <enum 13 Trigger_no_AID> A trigger frame was received,
  78. but this device's AID was not in the list
  79. <enum 14 NO_ACK_MAC_ABORT_REQ > No ACK is needed as
  80. SW asked RXPCU to send a abort_request to the PHYRX
  81. <enum 15 no_response_other> placeholder in case non
  82. of the above properly cover the reasons
  83. Also see the field SR_PPDU_during_OBSS.
  84. <legal 0-15>
  85. */
  86. #define NO_ACK_REPORT_NO_ACK_TRANSMIT_REASON_OFFSET 0x00000000
  87. #define NO_ACK_REPORT_NO_ACK_TRANSMIT_REASON_LSB 0
  88. #define NO_ACK_REPORT_NO_ACK_TRANSMIT_REASON_MSB 3
  89. #define NO_ACK_REPORT_NO_ACK_TRANSMIT_REASON_MASK 0x0000000f
  90. /* Description MACRX_ABORT_REASON
  91. Field only valid when No_ack_transmit_reason is set to NO_ACK_MAC_ABORT_REQ
  92. Error field received from MACRX_ABORT_REQUEST.Macrx_abort_reason[2:0]
  93. <Legal all>
  94. */
  95. #define NO_ACK_REPORT_MACRX_ABORT_REASON_OFFSET 0x00000000
  96. #define NO_ACK_REPORT_MACRX_ABORT_REASON_LSB 4
  97. #define NO_ACK_REPORT_MACRX_ABORT_REASON_MSB 7
  98. #define NO_ACK_REPORT_MACRX_ABORT_REASON_MASK 0x000000f0
  99. /* Description PHYRX_ABORT_REASON
  100. Field only valid when No_ack_transmit_reason is set to NO_ACK_PHY_error
  101. Error field received from PHYRX_ABORT_REQUEST.Phyrx_abort_reason
  102. <Legal all>
  103. */
  104. #define NO_ACK_REPORT_PHYRX_ABORT_REASON_OFFSET 0x00000000
  105. #define NO_ACK_REPORT_PHYRX_ABORT_REASON_LSB 8
  106. #define NO_ACK_REPORT_PHYRX_ABORT_REASON_MSB 15
  107. #define NO_ACK_REPORT_PHYRX_ABORT_REASON_MASK 0x0000ff00
  108. /* Description FRAME_CONTROL
  109. frame control field of the received (first properly received)
  110. frame
  111. <Legal all>
  112. */
  113. #define NO_ACK_REPORT_FRAME_CONTROL_OFFSET 0x00000000
  114. #define NO_ACK_REPORT_FRAME_CONTROL_LSB 16
  115. #define NO_ACK_REPORT_FRAME_CONTROL_MSB 31
  116. #define NO_ACK_REPORT_FRAME_CONTROL_MASK 0xffff0000
  117. /* Description RX_PPDU_DURATION
  118. The length of this PPDU reception in us
  119. <Legal all>
  120. */
  121. #define NO_ACK_REPORT_RX_PPDU_DURATION_OFFSET 0x00000004
  122. #define NO_ACK_REPORT_RX_PPDU_DURATION_LSB 0
  123. #define NO_ACK_REPORT_RX_PPDU_DURATION_MSB 23
  124. #define NO_ACK_REPORT_RX_PPDU_DURATION_MASK 0x00ffffff
  125. /* Description SR_PPDU_DURING_OBSS
  126. Field only valid with SRP Responder support (not PoR in
  127. Moselle/Maple/Spruce)
  128. Indicates that the received frame was sent using SRP as
  129. indicated by the 'SR PPDU' bit in the 'CAS Control' in the
  130. 'HE A-Control' in one of the MPDUs received, and that the
  131. response could not be generated due to OBSS traffic setting
  132. the NAV
  133. <legal all>
  134. */
  135. #define NO_ACK_REPORT_SR_PPDU_DURING_OBSS_OFFSET 0x00000004
  136. #define NO_ACK_REPORT_SR_PPDU_DURING_OBSS_LSB 24
  137. #define NO_ACK_REPORT_SR_PPDU_DURING_OBSS_MSB 24
  138. #define NO_ACK_REPORT_SR_PPDU_DURING_OBSS_MASK 0x01000000
  139. /* Description SELFGEN_RESPONSE_REASON_TO_SR_PPDU
  140. Field only valid with SRP Responder support (not PoR in
  141. Moselle/Maple/Spruce)
  142. This field indicates why the received SR PPDU needs a response
  143. in SIFS time. The e-num used is the same as in the field
  144. selfgen_response_reason in 'ACK_REPORT' structure although
  145. some of these will be unused in case of an SR PPDU.
  146. <enum 0 CTS_frame>
  147. <enum 1 ACK_frame>
  148. <enum 2 BA_frame >
  149. <enum 3 Qboost_trigger> Qboost trigger received
  150. <enum 4 PSPOLL_trigger> PSPOLL trigger received
  151. <enum 5 UAPSD_trigger > Unscheduled APSD trigger received
  152. <enum 6 CBF_frame> the CBF frame needs to be send as
  153. a result of NDP or BRPOLL
  154. <enum 7 ax_su_trigger> 11ax trigger received for this
  155. device
  156. <enum 8 ax_wildcard_trigger> 11ax wildcardtrigger has
  157. been received
  158. <enum 9 ax_unassoc_wildcard_trigger> 11ax wildcard trigger
  159. for unassociated STAs has been received
  160. <enum 12 eht_su_trigger> EHT R1 trigger received for
  161. this device
  162. <enum 10 MU_UL_response_to_response>
  163. <enum 11 Ranging_NDP_LMR_frames> Ranging NDP + LMR need
  164. to be sent in response to ranging NDPA + NDP
  165. <legal 0-12>
  166. */
  167. #define NO_ACK_REPORT_SELFGEN_RESPONSE_REASON_TO_SR_PPDU_OFFSET 0x00000004
  168. #define NO_ACK_REPORT_SELFGEN_RESPONSE_REASON_TO_SR_PPDU_LSB 25
  169. #define NO_ACK_REPORT_SELFGEN_RESPONSE_REASON_TO_SR_PPDU_MSB 28
  170. #define NO_ACK_REPORT_SELFGEN_RESPONSE_REASON_TO_SR_PPDU_MASK 0x1e000000
  171. /* Description RESERVED_1
  172. <legal all>
  173. */
  174. #define NO_ACK_REPORT_RESERVED_1_OFFSET 0x00000004
  175. #define NO_ACK_REPORT_RESERVED_1_LSB 29
  176. #define NO_ACK_REPORT_RESERVED_1_MSB 31
  177. #define NO_ACK_REPORT_RESERVED_1_MASK 0xe0000000
  178. /* Description PRE_BT_BROADCAST_STATUS_DETAILS
  179. Same contents as field "bt_broadcast_status_details" for
  180. the first received COEX_STATUS_BROADCAST tlv during this
  181. PPDU reception.
  182. After power up, this field is all initialized to 0
  183. Bits: [31:28]: always 0
  184. For detailed info see doc: TBD
  185. <legal all>
  186. */
  187. #define NO_ACK_REPORT_PRE_BT_BROADCAST_STATUS_DETAILS_OFFSET 0x00000008
  188. #define NO_ACK_REPORT_PRE_BT_BROADCAST_STATUS_DETAILS_LSB 0
  189. #define NO_ACK_REPORT_PRE_BT_BROADCAST_STATUS_DETAILS_MSB 11
  190. #define NO_ACK_REPORT_PRE_BT_BROADCAST_STATUS_DETAILS_MASK 0x00000fff
  191. /* Description FIRST_BT_BROADCAST_STATUS_DETAILS
  192. Same contents as field "bt_broadcast_status_details" for
  193. the first received COEX_STATUS_BROADCAST tlv during this
  194. PPDU reception.
  195. If no COEX_STATUS_BROADCAST tlv is received during this
  196. PPDU reception, this field will be set to 0
  197. <legal all>
  198. */
  199. #define NO_ACK_REPORT_FIRST_BT_BROADCAST_STATUS_DETAILS_OFFSET 0x00000008
  200. #define NO_ACK_REPORT_FIRST_BT_BROADCAST_STATUS_DETAILS_LSB 12
  201. #define NO_ACK_REPORT_FIRST_BT_BROADCAST_STATUS_DETAILS_MSB 23
  202. #define NO_ACK_REPORT_FIRST_BT_BROADCAST_STATUS_DETAILS_MASK 0x00fff000
  203. /* Description RESERVED_2
  204. <legal 0>
  205. */
  206. #define NO_ACK_REPORT_RESERVED_2_OFFSET 0x00000008
  207. #define NO_ACK_REPORT_RESERVED_2_LSB 24
  208. #define NO_ACK_REPORT_RESERVED_2_MSB 31
  209. #define NO_ACK_REPORT_RESERVED_2_MASK 0xff000000
  210. /* Description SECOND_BT_BROADCAST_STATUS_DETAILS
  211. Same contents as field "bt_broadcast_status_details" for
  212. the second received COEX_STATUS_BROADCAST tlv during this
  213. PPDU reception.
  214. If no second COEX_STATUS_BROADCAST tlv is received during
  215. this PPDU reception, this field will be set to 0
  216. <legal all>
  217. */
  218. #define NO_ACK_REPORT_SECOND_BT_BROADCAST_STATUS_DETAILS_OFFSET 0x0000000c
  219. #define NO_ACK_REPORT_SECOND_BT_BROADCAST_STATUS_DETAILS_LSB 0
  220. #define NO_ACK_REPORT_SECOND_BT_BROADCAST_STATUS_DETAILS_MSB 11
  221. #define NO_ACK_REPORT_SECOND_BT_BROADCAST_STATUS_DETAILS_MASK 0x00000fff
  222. /* Description RESERVED_3
  223. <legal 0>
  224. */
  225. #define NO_ACK_REPORT_RESERVED_3_OFFSET 0x0000000c
  226. #define NO_ACK_REPORT_RESERVED_3_LSB 12
  227. #define NO_ACK_REPORT_RESERVED_3_MSB 31
  228. #define NO_ACK_REPORT_RESERVED_3_MASK 0xfffff000
  229. #endif // NO_ACK_REPORT