phyrx_abort_request_info.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. /*
  2. * Copyright (c) 2019, The Linux Foundation. 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. // ################ START SUMMARY #################
  21. //
  22. // Dword Fields
  23. // 0 phyrx_abort_reason[7:0], phy_enters_nap_state[8], phy_enters_defer_state[9], reserved_0[15:10], receive_duration[31:16]
  24. //
  25. // ################ END SUMMARY #################
  26. #define NUM_OF_DWORDS_PHYRX_ABORT_REQUEST_INFO 1
  27. struct phyrx_abort_request_info {
  28. uint32_t phyrx_abort_reason : 8, //[7:0]
  29. phy_enters_nap_state : 1, //[8]
  30. phy_enters_defer_state : 1, //[9]
  31. reserved_0 : 6, //[15:10]
  32. receive_duration : 16; //[31:16]
  33. };
  34. /*
  35. phyrx_abort_reason
  36. <enum 0 phyrx_err_phy_off> Reception aborted due to
  37. receiving a PHY_OFF TLV
  38. <enum 1 phyrx_err_synth_off>
  39. <enum 2 phyrx_err_ofdma_timing>
  40. <enum 3 phyrx_err_ofdma_signal_parity>
  41. <enum 4 phyrx_err_ofdma_rate_illegal>
  42. <enum 5 phyrx_err_ofdma_length_illegal>
  43. <enum 6 phyrx_err_ofdma_restart>
  44. <enum 7 phyrx_err_ofdma_service>
  45. <enum 8 phyrx_err_ppdu_ofdma_power_drop>
  46. <enum 9 phyrx_err_cck_blokker>
  47. <enum 10 phyrx_err_cck_timing>
  48. <enum 11 phyrx_err_cck_header_crc>
  49. <enum 12 phyrx_err_cck_rate_illegal>
  50. <enum 13 phyrx_err_cck_length_illegal>
  51. <enum 14 phyrx_err_cck_restart>
  52. <enum 15 phyrx_err_cck_service>
  53. <enum 16 phyrx_err_cck_power_drop>
  54. <enum 17 phyrx_err_ht_crc_err>
  55. <enum 18 phyrx_err_ht_length_illegal>
  56. <enum 19 phyrx_err_ht_rate_illegal>
  57. <enum 20 phyrx_err_ht_zlf>
  58. <enum 21 phyrx_err_false_radar_ext>
  59. <enum 22 phyrx_err_green_field>
  60. <enum 23 phyrx_err_bw_gt_dyn_bw>
  61. <enum 24 phyrx_err_leg_ht_mismatch>
  62. <enum 25 phyrx_err_vht_crc_error>
  63. <enum 26 phyrx_err_vht_siga_unsupported>
  64. <enum 27 phyrx_err_vht_lsig_len_invalid>
  65. <enum 28 phyrx_err_vht_ndp_or_zlf>
  66. <enum 29 phyrx_err_vht_nsym_lt_zero>
  67. <enum 30 phyrx_err_vht_rx_extra_symbol_mismatch>
  68. <enum 31 phyrx_err_vht_rx_skip_group_id0>
  69. <enum 32 phyrx_err_vht_rx_skip_group_id1to62>
  70. <enum 33 phyrx_err_vht_rx_skip_group_id63>
  71. <enum 34 phyrx_err_ofdm_ldpc_decoder_disabled>
  72. <enum 35 phyrx_err_defer_nap>
  73. <enum 36 phyrx_err_fdomain_timeout>
  74. <enum 37 phyrx_err_lsig_rel_check>
  75. <enum 38 phyrx_err_bt_collision>
  76. <enum 39 phyrx_err_unsupported_mu_feedback>
  77. <enum 40 phyrx_err_ppdu_tx_interrupt_rx>
  78. <enum 41 phyrx_err_unsupported_cbf>
  79. <enum 42 phyrx_err_other> Should not really be used. If
  80. needed, ask for documentation update
  81. <enum 43 phyrx_err_he_siga_unsupported > <enum 44
  82. phyrx_err_he_crc_error > <enum 45
  83. phyrx_err_he_sigb_unsupported > <enum 46
  84. phyrx_err_he_mu_mode_unsupported > <enum 47
  85. phyrx_err_he_ndp_or_zlf > <enum 48 phyrx_err_he_nsym_lt_zero
  86. > <enum 49 phyrx_err_he_ru_params_unsupported > <enum 50
  87. phyrx_err_he_num_users_unsupported ><enum 51
  88. phyrx_err_he_sounding_params_unsupported >
  89. <enum 52 phyrx_err_MU_UL_no_power_detected>
  90. <enum 53 phyrx_err_MU_UL_not_for_me>
  91. <legal 0 - 53>
  92. phy_enters_nap_state
  93. When set, PHY enters PHY NAP state after sending this
  94. abort
  95. Note that nap and defer state are mutually exclusive.
  96. Field put pro-actively in place....usage still to be
  97. agreed upon.
  98. <legal all>
  99. phy_enters_defer_state
  100. When set, PHY enters PHY defer state after sending this
  101. abort
  102. Note that nap and defer state are mutually exclusive.
  103. Field put pro-actively in place....usage still to be
  104. agreed upon.
  105. <legal all>
  106. reserved_0
  107. <legal 0>
  108. receive_duration
  109. The remaining receive duration of this PPDU in the
  110. medium (in us). When PHY does not know this duration when
  111. this TLV is generated, the field will be set to 0.
  112. The timing reference point is the reception by the MAC
  113. of this TLV. The value shall be accurate to within 2us.
  114. In case Phy_enters_nap_state and/or
  115. Phy_enters_defer_state is set, there is a possibility that
  116. MAC PMM can also decide to go into a low(er) power state.
  117. <legal all>
  118. */
  119. /* Description PHYRX_ABORT_REQUEST_INFO_0_PHYRX_ABORT_REASON
  120. <enum 0 phyrx_err_phy_off> Reception aborted due to
  121. receiving a PHY_OFF TLV
  122. <enum 1 phyrx_err_synth_off>
  123. <enum 2 phyrx_err_ofdma_timing>
  124. <enum 3 phyrx_err_ofdma_signal_parity>
  125. <enum 4 phyrx_err_ofdma_rate_illegal>
  126. <enum 5 phyrx_err_ofdma_length_illegal>
  127. <enum 6 phyrx_err_ofdma_restart>
  128. <enum 7 phyrx_err_ofdma_service>
  129. <enum 8 phyrx_err_ppdu_ofdma_power_drop>
  130. <enum 9 phyrx_err_cck_blokker>
  131. <enum 10 phyrx_err_cck_timing>
  132. <enum 11 phyrx_err_cck_header_crc>
  133. <enum 12 phyrx_err_cck_rate_illegal>
  134. <enum 13 phyrx_err_cck_length_illegal>
  135. <enum 14 phyrx_err_cck_restart>
  136. <enum 15 phyrx_err_cck_service>
  137. <enum 16 phyrx_err_cck_power_drop>
  138. <enum 17 phyrx_err_ht_crc_err>
  139. <enum 18 phyrx_err_ht_length_illegal>
  140. <enum 19 phyrx_err_ht_rate_illegal>
  141. <enum 20 phyrx_err_ht_zlf>
  142. <enum 21 phyrx_err_false_radar_ext>
  143. <enum 22 phyrx_err_green_field>
  144. <enum 23 phyrx_err_bw_gt_dyn_bw>
  145. <enum 24 phyrx_err_leg_ht_mismatch>
  146. <enum 25 phyrx_err_vht_crc_error>
  147. <enum 26 phyrx_err_vht_siga_unsupported>
  148. <enum 27 phyrx_err_vht_lsig_len_invalid>
  149. <enum 28 phyrx_err_vht_ndp_or_zlf>
  150. <enum 29 phyrx_err_vht_nsym_lt_zero>
  151. <enum 30 phyrx_err_vht_rx_extra_symbol_mismatch>
  152. <enum 31 phyrx_err_vht_rx_skip_group_id0>
  153. <enum 32 phyrx_err_vht_rx_skip_group_id1to62>
  154. <enum 33 phyrx_err_vht_rx_skip_group_id63>
  155. <enum 34 phyrx_err_ofdm_ldpc_decoder_disabled>
  156. <enum 35 phyrx_err_defer_nap>
  157. <enum 36 phyrx_err_fdomain_timeout>
  158. <enum 37 phyrx_err_lsig_rel_check>
  159. <enum 38 phyrx_err_bt_collision>
  160. <enum 39 phyrx_err_unsupported_mu_feedback>
  161. <enum 40 phyrx_err_ppdu_tx_interrupt_rx>
  162. <enum 41 phyrx_err_unsupported_cbf>
  163. <enum 42 phyrx_err_other> Should not really be used. If
  164. needed, ask for documentation update
  165. <enum 43 phyrx_err_he_siga_unsupported > <enum 44
  166. phyrx_err_he_crc_error > <enum 45
  167. phyrx_err_he_sigb_unsupported > <enum 46
  168. phyrx_err_he_mu_mode_unsupported > <enum 47
  169. phyrx_err_he_ndp_or_zlf > <enum 48 phyrx_err_he_nsym_lt_zero
  170. > <enum 49 phyrx_err_he_ru_params_unsupported > <enum 50
  171. phyrx_err_he_num_users_unsupported ><enum 51
  172. phyrx_err_he_sounding_params_unsupported >
  173. <enum 52 phyrx_err_MU_UL_no_power_detected>
  174. <enum 53 phyrx_err_MU_UL_not_for_me>
  175. <legal 0 - 53>
  176. */
  177. #define PHYRX_ABORT_REQUEST_INFO_0_PHYRX_ABORT_REASON_OFFSET 0x00000000
  178. #define PHYRX_ABORT_REQUEST_INFO_0_PHYRX_ABORT_REASON_LSB 0
  179. #define PHYRX_ABORT_REQUEST_INFO_0_PHYRX_ABORT_REASON_MASK 0x000000ff
  180. /* Description PHYRX_ABORT_REQUEST_INFO_0_PHY_ENTERS_NAP_STATE
  181. When set, PHY enters PHY NAP state after sending this
  182. abort
  183. Note that nap and defer state are mutually exclusive.
  184. Field put pro-actively in place....usage still to be
  185. agreed upon.
  186. <legal all>
  187. */
  188. #define PHYRX_ABORT_REQUEST_INFO_0_PHY_ENTERS_NAP_STATE_OFFSET 0x00000000
  189. #define PHYRX_ABORT_REQUEST_INFO_0_PHY_ENTERS_NAP_STATE_LSB 8
  190. #define PHYRX_ABORT_REQUEST_INFO_0_PHY_ENTERS_NAP_STATE_MASK 0x00000100
  191. /* Description PHYRX_ABORT_REQUEST_INFO_0_PHY_ENTERS_DEFER_STATE
  192. When set, PHY enters PHY defer state after sending this
  193. abort
  194. Note that nap and defer state are mutually exclusive.
  195. Field put pro-actively in place....usage still to be
  196. agreed upon.
  197. <legal all>
  198. */
  199. #define PHYRX_ABORT_REQUEST_INFO_0_PHY_ENTERS_DEFER_STATE_OFFSET 0x00000000
  200. #define PHYRX_ABORT_REQUEST_INFO_0_PHY_ENTERS_DEFER_STATE_LSB 9
  201. #define PHYRX_ABORT_REQUEST_INFO_0_PHY_ENTERS_DEFER_STATE_MASK 0x00000200
  202. /* Description PHYRX_ABORT_REQUEST_INFO_0_RESERVED_0
  203. <legal 0>
  204. */
  205. #define PHYRX_ABORT_REQUEST_INFO_0_RESERVED_0_OFFSET 0x00000000
  206. #define PHYRX_ABORT_REQUEST_INFO_0_RESERVED_0_LSB 10
  207. #define PHYRX_ABORT_REQUEST_INFO_0_RESERVED_0_MASK 0x0000fc00
  208. /* Description PHYRX_ABORT_REQUEST_INFO_0_RECEIVE_DURATION
  209. The remaining receive duration of this PPDU in the
  210. medium (in us). When PHY does not know this duration when
  211. this TLV is generated, the field will be set to 0.
  212. The timing reference point is the reception by the MAC
  213. of this TLV. The value shall be accurate to within 2us.
  214. In case Phy_enters_nap_state and/or
  215. Phy_enters_defer_state is set, there is a possibility that
  216. MAC PMM can also decide to go into a low(er) power state.
  217. <legal all>
  218. */
  219. #define PHYRX_ABORT_REQUEST_INFO_0_RECEIVE_DURATION_OFFSET 0x00000000
  220. #define PHYRX_ABORT_REQUEST_INFO_0_RECEIVE_DURATION_LSB 16
  221. #define PHYRX_ABORT_REQUEST_INFO_0_RECEIVE_DURATION_MASK 0xffff0000
  222. #endif // _PHYRX_ABORT_REQUEST_INFO_H_