ack_report.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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 _ACK_REPORT_H_
  16. #define _ACK_REPORT_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #define NUM_OF_DWORDS_ACK_REPORT 1
  20. struct ack_report {
  21. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  22. uint32_t selfgen_response_reason : 4, // [3:0]
  23. ax_trigger_type : 4, // [7:4]
  24. sr_ppdu : 1, // [8:8]
  25. reserved : 7, // [15:9]
  26. frame_control : 16; // [31:16]
  27. #else
  28. uint32_t frame_control : 16, // [31:16]
  29. reserved : 7, // [15:9]
  30. sr_ppdu : 1, // [8:8]
  31. ax_trigger_type : 4, // [7:4]
  32. selfgen_response_reason : 4; // [3:0]
  33. #endif
  34. };
  35. /* Description SELFGEN_RESPONSE_REASON
  36. Field that indicates why the received frame needs a response
  37. in SIFS time. The possible responses are listed in order.
  38. <enum 0 CTS_frame>
  39. <enum 1 ACK_frame>
  40. <enum 2 BA_frame >
  41. <enum 3 Qboost_trigger> Qboost trigger received
  42. <enum 4 PSPOLL_trigger> PSPOLL trigger received
  43. <enum 5 UAPSD_trigger > Unscheduled APSD trigger received
  44. <enum 6 CBF_frame> the CBF frame needs to be send as
  45. a result of NDP or BRPOLL
  46. <enum 7 ax_su_trigger> 11ax trigger received for this
  47. device
  48. <enum 8 ax_wildcard_trigger> 11ax wildcardtrigger has
  49. been received
  50. <enum 9 ax_unassoc_wildcard_trigger> 11ax wildcard trigger
  51. for unassociated STAs has been received
  52. <enum 12 eht_su_trigger> EHT R1 trigger received for
  53. this device
  54. <enum 10 MU_UL_response_to_response>
  55. <enum 11 Ranging_NDP_LMR_frames> Ranging NDP + LMR need
  56. to be sent in response to ranging NDPA + NDP
  57. <legal 0-12>
  58. */
  59. #define ACK_REPORT_SELFGEN_RESPONSE_REASON_OFFSET 0x00000000
  60. #define ACK_REPORT_SELFGEN_RESPONSE_REASON_LSB 0
  61. #define ACK_REPORT_SELFGEN_RESPONSE_REASON_MSB 3
  62. #define ACK_REPORT_SELFGEN_RESPONSE_REASON_MASK 0x0000000f
  63. /* Description AX_TRIGGER_TYPE
  64. Field Only valid when selfgen_response_reason is an 11ax
  65. related trigger
  66. The 11AX trigger type/ trigger number:
  67. It identifies which trigger was received.
  68. <enum 0 ax_trigger_basic>
  69. <enum 1 ax_trigger_brpoll>
  70. <enum 2 ax_trigger_mu_bar>
  71. <enum 3 ax_trigger_mu_rts>
  72. <enum 4 ax_trigger_buffer_size>
  73. <enum 5 ax_trigger_gcr_mu_bar>
  74. <enum 6 ax_trigger_BQRP>
  75. <enum 7 ax_trigger_NDP_fb_report_poll>
  76. <enum 8 ax_tb_ranging_trigger>
  77. <enum 9 ax_trigger_reserved_9>
  78. <enum 10 ax_trigger_reserved_10>
  79. <enum 11 ax_trigger_reserved_11>
  80. <enum 12 ax_trigger_reserved_12>
  81. <enum 13 ax_trigger_reserved_13>
  82. <enum 14 ax_trigger_reserved_14>
  83. <enum 15 ax_trigger_reserved_15>
  84. <legal all>
  85. */
  86. #define ACK_REPORT_AX_TRIGGER_TYPE_OFFSET 0x00000000
  87. #define ACK_REPORT_AX_TRIGGER_TYPE_LSB 4
  88. #define ACK_REPORT_AX_TRIGGER_TYPE_MSB 7
  89. #define ACK_REPORT_AX_TRIGGER_TYPE_MASK 0x000000f0
  90. /* Description SR_PPDU
  91. Field only valid with SRP Responder support (not PoR in
  92. Moselle/Maple/Spruce)
  93. Indicates if the received frame was sent using SRP as indicated
  94. by the 'SR PPDU' bit in the 'CAS Control' in the 'HE A-Control'
  95. in one of the MPDUs received
  96. <legal all>
  97. */
  98. #define ACK_REPORT_SR_PPDU_OFFSET 0x00000000
  99. #define ACK_REPORT_SR_PPDU_LSB 8
  100. #define ACK_REPORT_SR_PPDU_MSB 8
  101. #define ACK_REPORT_SR_PPDU_MASK 0x00000100
  102. /* Description RESERVED
  103. <legal 0>
  104. */
  105. #define ACK_REPORT_RESERVED_OFFSET 0x00000000
  106. #define ACK_REPORT_RESERVED_LSB 9
  107. #define ACK_REPORT_RESERVED_MSB 15
  108. #define ACK_REPORT_RESERVED_MASK 0x0000fe00
  109. /* Description FRAME_CONTROL
  110. Field not valid when selfgen_response_reason is MU_UL_response_to_response
  111. For SU receptions:
  112. frame control field of the received frame
  113. In 11ah Mode of Operation, for non-NDP frames the BW information
  114. is extracted from Frame Control fields [11:8].
  115. Decode is as follows
  116. Bits[11] - Dynamic/Static
  117. Bits[10:8] - Channel BW
  118. */
  119. #define ACK_REPORT_FRAME_CONTROL_OFFSET 0x00000000
  120. #define ACK_REPORT_FRAME_CONTROL_LSB 16
  121. #define ACK_REPORT_FRAME_CONTROL_MSB 31
  122. #define ACK_REPORT_FRAME_CONTROL_MASK 0xffff0000
  123. #endif // ACK_REPORT