phyrx_abort_request_info.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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 _PHYRX_ABORT_REQUEST_INFO_H_
  17. #define _PHYRX_ABORT_REQUEST_INFO_H_
  18. #if !defined(__ASSEMBLER__)
  19. #endif
  20. #define NUM_OF_DWORDS_PHYRX_ABORT_REQUEST_INFO 1
  21. struct phyrx_abort_request_info {
  22. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  23. uint32_t phyrx_abort_reason : 8, // [7:0]
  24. phy_enters_nap_state : 1, // [8:8]
  25. phy_enters_defer_state : 1, // [9:9]
  26. reserved_0 : 6, // [15:10]
  27. receive_duration : 16; // [31:16]
  28. #else
  29. uint32_t receive_duration : 16, // [31:16]
  30. reserved_0 : 6, // [15:10]
  31. phy_enters_defer_state : 1, // [9:9]
  32. phy_enters_nap_state : 1, // [8:8]
  33. phyrx_abort_reason : 8; // [7:0]
  34. #endif
  35. };
  36. /* Description PHYRX_ABORT_REASON
  37. <enum 0 phyrx_err_phy_off> Reception aborted due to receiving
  38. a PHY_OFF TLV
  39. <enum 1 phyrx_err_synth_off>
  40. <enum 2 phyrx_err_ofdma_timing>
  41. <enum 3 phyrx_err_ofdma_signal_parity>
  42. <enum 4 phyrx_err_ofdma_rate_illegal>
  43. <enum 5 phyrx_err_ofdma_length_illegal>
  44. <enum 6 phyrx_err_ofdma_restart>
  45. <enum 7 phyrx_err_ofdma_service>
  46. <enum 8 phyrx_err_ppdu_ofdma_power_drop>
  47. <enum 9 phyrx_err_cck_blokker>
  48. <enum 10 phyrx_err_cck_timing>
  49. <enum 11 phyrx_err_cck_header_crc>
  50. <enum 12 phyrx_err_cck_rate_illegal>
  51. <enum 13 phyrx_err_cck_length_illegal>
  52. <enum 14 phyrx_err_cck_restart>
  53. <enum 15 phyrx_err_cck_service>
  54. <enum 16 phyrx_err_cck_power_drop>
  55. <enum 17 phyrx_err_ht_crc_err>
  56. <enum 18 phyrx_err_ht_length_illegal>
  57. <enum 19 phyrx_err_ht_rate_illegal>
  58. <enum 20 phyrx_err_ht_zlf>
  59. <enum 21 phyrx_err_false_radar_ext>
  60. <enum 22 phyrx_err_green_field>
  61. <enum 60 phyrx_err_ht_nsym_lt_zero>
  62. <enum 23 phyrx_err_bw_gt_dyn_bw>
  63. <enum 24 phyrx_err_leg_ht_mismatch>
  64. <enum 25 phyrx_err_vht_crc_error>
  65. <enum 26 phyrx_err_vht_siga_unsupported>
  66. <enum 27 phyrx_err_vht_lsig_len_invalid>
  67. <enum 28 phyrx_err_vht_ndp_or_zlf>
  68. <enum 29 phyrx_err_vht_nsym_lt_zero>
  69. <enum 30 phyrx_err_vht_rx_extra_symbol_mismatch>
  70. <enum 31 phyrx_err_vht_rx_skip_group_id0>
  71. <enum 32 phyrx_err_vht_rx_skip_group_id1to62>
  72. <enum 33 phyrx_err_vht_rx_skip_group_id63>
  73. <enum 34 phyrx_err_ofdm_ldpc_decoder_disabled>
  74. <enum 35 phyrx_err_defer_nap>
  75. <enum 61 phyrx_err_vht_lsig_rate_mismatch>
  76. <enum 62 phyrx_err_vht_paid_gid_mismatch>
  77. <enum 63 phyrx_err_vht_unsupported_bw>
  78. <enum 64 phyrx_err_vht_gi_disam_mismatch>
  79. <enum 36 phyrx_err_fdomain_timeout>
  80. <enum 37 phyrx_err_lsig_rel_check>
  81. <enum 38 phyrx_err_bt_collision>
  82. <enum 39 phyrx_err_unsupported_mu_feedback>
  83. <enum 40 phyrx_err_ppdu_tx_interrupt_rx>
  84. <enum 41 phyrx_err_unsupported_cbf>
  85. <enum 42 phyrx_err_other> Should not really be used. If
  86. needed, ask for documentation update
  87. <enum 43 phyrx_err_he_siga_unsupported > <enum 44 phyrx_err_he_crc_error
  88. > <enum 45 phyrx_err_he_sigb_unsupported > <enum 46 phyrx_err_he_mu_mode_unsupported
  89. > <enum 47 phyrx_err_he_ndp_or_zlf > <enum 48 phyrx_err_he_nsym_lt_zero
  90. > <enum 49 phyrx_err_he_ru_params_unsupported > <enum 50
  91. phyrx_err_he_num_users_unsupported ><enum 51 phyrx_err_he_sounding_params_unsupported
  92. >
  93. <enum 54 phyrx_err_he_sigb_crc_error>
  94. <enum 55 phyrx_err_he_ext_su_unsupported>
  95. <enum 56 phyrx_err_he_trig_unsupported>
  96. <enum 57 phyrx_err_he_lsig_len_invalid>
  97. <enum 58 phyrx_err_he_lsig_rate_mismatch>
  98. <enum 59 phyrx_err_ofdma_signal_reliability>
  99. <enum 77 phyrx_err_wur_detection>
  100. <enum 72 phyrx_err_u_sig_crc_error>
  101. <enum 73 phyrx_err_u_sig_unsupported_mode>
  102. <enum 74 phyrx_err_u_sig_rsvd_err>
  103. <enum 75 phyrx_err_u_sig_mcs_error>
  104. <enum 76 phyrx_err_u_sig_bw_error>
  105. <enum 79 phyrx_err_u_sig_320_channel_mismatch>
  106. <enum 71 phyrx_err_eht_sig_crc_error>
  107. <enum 78 phyrx_err_eht_sig_unsupported_mode>
  108. <enum 80 phyrx_err_ehtplus_er_detection>
  109. <enum 52 phyrx_err_MU_UL_no_power_detected>
  110. <enum 53 phyrx_err_MU_UL_not_for_me>
  111. <enum 65 phyrx_err_rx_wdg_timeout>
  112. <enum 66 phyrx_err_sizing_evt_unexpected>
  113. <enum 67 phyrx_err_spectralscan>
  114. <enum 68 phyrx_err_radar_misdetected_as_ofdm>
  115. <enum 69 phyrx_err_rx_stuck>
  116. <enum 70 phyrx_err_invalid_11b_state>
  117. <legal 0 - 80>
  118. */
  119. #define PHYRX_ABORT_REQUEST_INFO_PHYRX_ABORT_REASON_OFFSET 0x00000000
  120. #define PHYRX_ABORT_REQUEST_INFO_PHYRX_ABORT_REASON_LSB 0
  121. #define PHYRX_ABORT_REQUEST_INFO_PHYRX_ABORT_REASON_MSB 7
  122. #define PHYRX_ABORT_REQUEST_INFO_PHYRX_ABORT_REASON_MASK 0x000000ff
  123. /* Description PHY_ENTERS_NAP_STATE
  124. When set, PHY enters PHY NAP state after sending this abort
  125. Note that nap and defer state are mutually exclusive.
  126. Field put pro-actively in place....usage still to be agreed
  127. upon.
  128. <legal all>
  129. */
  130. #define PHYRX_ABORT_REQUEST_INFO_PHY_ENTERS_NAP_STATE_OFFSET 0x00000000
  131. #define PHYRX_ABORT_REQUEST_INFO_PHY_ENTERS_NAP_STATE_LSB 8
  132. #define PHYRX_ABORT_REQUEST_INFO_PHY_ENTERS_NAP_STATE_MSB 8
  133. #define PHYRX_ABORT_REQUEST_INFO_PHY_ENTERS_NAP_STATE_MASK 0x00000100
  134. /* Description PHY_ENTERS_DEFER_STATE
  135. When set, PHY enters PHY defer state after sending this
  136. abort
  137. Note that nap and defer state are mutually exclusive.
  138. Field put pro-actively in place....usage still to be agreed
  139. upon.
  140. <legal all>
  141. */
  142. #define PHYRX_ABORT_REQUEST_INFO_PHY_ENTERS_DEFER_STATE_OFFSET 0x00000000
  143. #define PHYRX_ABORT_REQUEST_INFO_PHY_ENTERS_DEFER_STATE_LSB 9
  144. #define PHYRX_ABORT_REQUEST_INFO_PHY_ENTERS_DEFER_STATE_MSB 9
  145. #define PHYRX_ABORT_REQUEST_INFO_PHY_ENTERS_DEFER_STATE_MASK 0x00000200
  146. /* Description RESERVED_0
  147. <legal 0>
  148. */
  149. #define PHYRX_ABORT_REQUEST_INFO_RESERVED_0_OFFSET 0x00000000
  150. #define PHYRX_ABORT_REQUEST_INFO_RESERVED_0_LSB 10
  151. #define PHYRX_ABORT_REQUEST_INFO_RESERVED_0_MSB 15
  152. #define PHYRX_ABORT_REQUEST_INFO_RESERVED_0_MASK 0x0000fc00
  153. /* Description RECEIVE_DURATION
  154. The remaining receive duration of this PPDU in the medium
  155. (in us). When PHY does not know this duration when this
  156. TLV is generated, the field will be set to 0.
  157. The timing reference point is the reception by the MAC of
  158. this TLV. The value shall be accurate to within 2us.
  159. In case Phy_enters_nap_state and/or Phy_enters_defer_state
  160. is set, there is a possibility that MAC PMM can also decide
  161. to go into a low(er) power state.
  162. <legal all>
  163. */
  164. #define PHYRX_ABORT_REQUEST_INFO_RECEIVE_DURATION_OFFSET 0x00000000
  165. #define PHYRX_ABORT_REQUEST_INFO_RECEIVE_DURATION_LSB 16
  166. #define PHYRX_ABORT_REQUEST_INFO_RECEIVE_DURATION_MSB 31
  167. #define PHYRX_ABORT_REQUEST_INFO_RECEIVE_DURATION_MASK 0xffff0000
  168. #endif // PHYRX_ABORT_REQUEST_INFO