xref: /wlan-driver/fw-api/hw/qca5332/phytx_abort_request_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 
2 /* Copyright (c) 2022, 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 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 #ifndef _PHYTX_ABORT_REQUEST_INFO_H_
27 #define _PHYTX_ABORT_REQUEST_INFO_H_
28 #if !defined(__ASSEMBLER__)
29 #endif
30 
31 #define NUM_OF_WORDS_PHYTX_ABORT_REQUEST_INFO 1
32 
33 
34 struct phytx_abort_request_info {
35 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
36              uint16_t phytx_abort_reason                                      :  8, // [7:0]
37                       user_number                                             :  6, // [13:8]
38                       reserved                                                :  2; // [15:14]
39 #else
40              uint16_t reserved                                                :  2, // [15:14]
41                       user_number                                             :  6, // [13:8]
42                       phytx_abort_reason                                      :  8; // [7:0]
43 #endif
44 };
45 
46 
47 /* Description		PHYTX_ABORT_REASON
48 
49 			Reason for early termination of TX packet by the PHY
50 
51 			<enum 0 no_phytx_error_reported>This value is the default
52 			 value the MAC will fill in the status TLV (when not PHY
53 			 abort was received).
54 
55 			Note that when PHY generates the PHYTX_ABORT_REQUEST, this
56 			 value shall never be used.
57 			<enum 1 error_txtd_ifft_underrun>PHY ran out of transmit
58 			 data due to transmit underrun - this field is user-specific
59 			 (see user_number field)
60 			<enum 2 error_tx_invalid_tlv>
61 			<enum 3 error_tx_unexpected_tlv>
62 			<enum 4 error_tx_pkt_end_error>
63 			<enum 5 error_tx_bw_is_gt_dyn_bw>
64 			<enum 6 error_txtd_pkt_start_error>
65 			<enum 7 error_txfd_pre_phy_tlv_ooo>
66 			<enum 8 error_txtd_mu_data_underrun>
67 			<enum 9 error_tx_legacy_rate_illegal>
68 			<enum 10 error_tx_fifo_error>
69 			<enum 11 error_tx_ack_wd_error>
70 			<enum 12 error_tx_tpc_miss>
71 			<enum 13 error_mac_tx_abort>
72 			<enum 14 error_tx_pcss_phy_desc_wdg_timeout>
73 			<enum 15 error_unsupported_cbf>
74 			<enum 16 error_cv_static_bandwidth_mismatch>
75 			<enum 17 error_cv_dynamic_bandwidth_mismatch>
76 			<enum 18 error_cv_unsupported_nss_total>
77 			<enum 19 error_nss_bf_params_mismatch>
78 			<enum 20 error_txbf_fail>
79 			<enum 21 error_txbf_snd_fail>This used to be called 'error_illegal_nss.'
80 
81 			<enum 22 error_otp_txbf>
82 			<enum 23 error_tx_inv_chainmask>
83 			<enum 24 error_cv_index_assign_overload>This error indicates
84 			 that CV prefetch command indicated a CV index that is not
85 			 available.
86 			<enum 25 error_cv_index_delete>This error indicates that
87 			 CV delete command indicated a CV index that did not contain
88 			 any valid info
89 			<enum 26 error_tx_he_rate_illegal>Error found with the HE
90 			 transmission parameters
91 			<enum 27 error_tx_pcss_wdg_timeout>
92 			<enum 28 error_tx_tlv_tag_mismatch>
93 			<enum 29 error_tx_cck_fifo_flush>
94 			<enum 30 error_tx_no_mac_pkt_end>
95 			<enum 31 error_tx_abort_for_mac_war>
96 			<enum 32 error_tx_stuck>
97 			<enum 33 error_tx_invalid_uplink_tlv>
98 			<enum 34 error_txfd_txcck_illegal_tx_rate_error>
99 			<enum 35 error_txfd_txcck_underrun_error>
100 			<enum 36 error_txfd_mpi_req_grant_error>
101 			<enum 37 error_txfd_control_tlv_fifo_ovfl_error>
102 			<enum 38 error_txfd_tlv_fifo_overflow_error>
103 			<enum 39 error_txfd_data_fifo_underflow_error>
104 			<enum 40 error_txfd_data_fifo_overflow_error>
105 			<enum 41 error_txfd_service_fifo_overflow_error>
106 			<enum 42 error_txfd_he_sigb_fifo_overflow_error>
107 			<enum 43 error_txfd_spurious_data_fifo_error>
108 			<enum 44 error_txfd_he_siga_fifo_ovfl_error>
109 			<enum 45 error_txfd_unknown_tlv_error>
110 			<enum 46 error_txfd_mac_response_ordering_error>
111 			<enum 47 error_txfd_unexpected_mac_pkt_end_error>
112 			<enum 48 error_txfd_tlv_fifo_rd_hang_error>All FIFO read
113 			 hang errors use this value.
114 			<enum 49 error_txfd_tlv_fifo_no_rd_error>All FIFO no read
115 			 errors use this value.
116 			<enum 50 error_txfd_ordering_fifo_no_rd_error>
117 			<enum 51 error_txfd_illegal_cf_tlv_error>
118 			<enum 52 error_txfd_user_ru_hang_error>
119 			<enum 53 error_txfd_stream_ru_hang_error>
120 			<enum 54 error_txfd_num_pad_bits_error>
121 			<enum 55 error_txfd_phy_abort_ack_wd_to_error>
122 			<enum 56 error_txfd_pre_pkt_isr_not_done_before_phy_desc_error>
123 
124 			<enum 57 error_txfd_bf_weights_not_ready_error>
125 			<enum 58 error_txfd_req_timer_breach_error>
126 			<enum 59 error_txfd_wd_to_error>
127 			<enum 60 error_txfd_legacy_bf_weights_not_ready_error>
128 			<enum 61 error_txfd_axi_slave_to_error>
129 			<enum 62 error_txfd_hw_acc_error>
130 			<enum 63 error_txfd_txb_req_fifo_underrun_error>
131 			<enum 64 error_txfd_unknown_ru_alloc_error>
132 			<enum 65 error_txfd_more_user_desc_per_user_tlvs_error>
133 			<enum 66 error_txfd_ldpc_param_calc_to_error>
134 			<enum 69 error_txfd_cbf_start_before_expect_cbf_clear_error>
135 
136 			<enum 70 error_txfd_out_of_range_cbf_user_id_error>
137 			<enum 71 error_txfd_less_cbf_data_error>
138 			<enum 72 error_txfd_more_cbf_data_error>
139 			<enum 73 error_txfd_cbf_done_not_received_error>
140 			<enum 74 error_txfd_mpi_cbf_valid_to_error>
141 			<enum 75 error_txfd_cbf_start_missing_error>
142 			<enum 76 error_txfd_mimo_ctrl_error>
143 			<enum 77 error_txfd_cbf_buffer_ovfl_error>
144 			<enum 78 error_txfd_dma0_hang_error>
145 			<enum 79 error_txfd_dma1_hang_error>
146 			<enum 80 error_txfd_b2b_cbf_start_error>
147 			<enum 81 error_txfd_b2b_cbf_done_error>
148 			<enum 82 error_txfd_unsaved_cv_error>
149 			<enum 83 error_txfd_wt_mem_wr_conflict_error>
150 			<enum 84 error_txfd_wt_mem_rd_conflict_error>
151 			<enum 85 error_txfd_qre_intf_to_error>
152 			<enum 86 error_txfd_qre_txbf_stomp_rx_error>
153 			<enum 87 error_txfd_qre_rx_stomp_txbf_error>
154 			<enum 88 error_txfd_precoding_start_before_bf_param_clr_error>
155 
156 			<enum 89 error_txfd_tone_map_lut_rd_conflict_error>
157 			<enum 90 error_txfd_precoding_fifo_ovfl_error>
158 			<enum 91 error_txfd_precoding_fifo_udfl_error>
159 			<enum 92 error_txfd_txbf_axi_slave_to_error>
160 			<enum 93 error_txfd_less_prefetch_tlvs_error>
161 			<enum 94 error_txfd_more_prefetch_tlvs_error>
162 			<enum 95 error_txfd_prefetch_fifo_ovfl_error>
163 			<enum 96 error_txfd_prefetch_fifo_udfl_error>
164 			<enum 97 error_txfd_precoding_error>
165 			<enum 98 error_txfd_cv_ctrl_state_to_error>
166 			<enum 99 error_txfd_txbfp_qre_tone_udfl_error>
167 			<enum 100 error_txfd_less_bf_param_per_user_tlvs_error>
168 			<enum 101 error_txfd_more_bf_param_per_user_tlvs_error>
169 			<enum 102 error_txfd_bf_param_common_unexpected_error>
170 			<enum 103 error_txfd_less_expect_cbf_per_user_tlvs_error>
171 
172 			<enum 104 error_txfd_more_expect_cbf_per_user_tlvs_error>
173 
174 			<enum 105 error_txfd_precoding_stg1_stg2_wait_to_error>
175 			<enum 106 error_txfd_expect_cbf_per_user_before_common_error>
176 
177 			<enum 107 error_txfd_prefetch_per_user_before_common_error>
178 
179 			<enum 108 error_txfd_bf_param_per_user_before_common_error>
180 
181 			<enum 109 error_txfd_ndp_cbf_bw_mismatch_error>
182 			<enum 110 error_txtd_tx_pre_desc_error>
183 			<enum 111 error_txtd_tx_desc_error>
184 			<enum 112 error_txtd_start_error>
185 			<enum 113 error_txtd_sym_error>
186 			<enum 114 error_txtd_multi_sym_error>
187 			<enum 115 error_txtd_pre_data_error>
188 			<enum 116 error_txtd_pkt_data_error>
189 			<enum 117 error_txtd_pkt_end_error>
190 			<enum 118 error_txtd_tx_frame_unexp>
191 			<enum 119 error_txtd_start_unexp>
192 			<enum 120 error_txtd_fft_error_1>
193 			<enum 121 error_txtd_fft_error_2>
194 			<enum 122 error_txtd_uld_sym_cp_len_zero>
195 			<enum 123 error_txtd_start_done>
196 			<enum 124 error_txtd_start_nonidle>
197 			<enum 125 error_txtd_tx_abort_nonidle>
198 			<enum 126 error_txtd_tx_abort_done>
199 			<enum 127 error_txtd_tx_abort_idle>
200 			<enum 128 error_txtd_cck_sample_overflow>
201 			<enum 129 error_txtd_cck_timeout>
202 			<enum 130 error_txtd_ofdm_sym_mismatch>
203 			<enum 131 error_txtd_tx_vld_unalign_error>
204 			<enum 132 error_txtd_fft_cdc_fifo>This is the merged Rx/Tx
205 			 CDC FIFO empty/full error code
206 			<enum 133 error_mac_tb_ppdu_abort>All 'error_txtd_chn' codes
207 			 use this value as well.
208 			<enum 136 error_abort_req_from_macrx_enum_05>This code is
209 			 used to abort the Tx when MAC Rx issues an abort request
210 			 with code 05 "macrx_abort_too_much_bad_data."
211 			<enum 137 error_tx_extra_sym_mismatch>
212 			<enum 138 error_tx_vht_length_not_multiple_of_3>
213 			<enum 139 error_tx_11b_rate_illegal>
214 			<enum 140 error_tx_ht_rate_illegal>
215 			<enum 141 error_tx_vht_rate_illegal>
216 			<enum 142 error_mac_rf_only_abort>
217 			<enum 255 error_tx_invalid_error_code>
218 */
219 
220 #define PHYTX_ABORT_REQUEST_INFO_PHYTX_ABORT_REASON_OFFSET                          0x00000000
221 #define PHYTX_ABORT_REQUEST_INFO_PHYTX_ABORT_REASON_LSB                             0
222 #define PHYTX_ABORT_REQUEST_INFO_PHYTX_ABORT_REASON_MSB                             7
223 #define PHYTX_ABORT_REQUEST_INFO_PHYTX_ABORT_REASON_MASK                            0x000000ff
224 
225 
226 /* Description		USER_NUMBER
227 
228 			For some errors, the user for which this error was detected
229 			 can be indicated in this field.
230 			<legal 0-36>
231 */
232 
233 #define PHYTX_ABORT_REQUEST_INFO_USER_NUMBER_OFFSET                                 0x00000000
234 #define PHYTX_ABORT_REQUEST_INFO_USER_NUMBER_LSB                                    8
235 #define PHYTX_ABORT_REQUEST_INFO_USER_NUMBER_MSB                                    13
236 #define PHYTX_ABORT_REQUEST_INFO_USER_NUMBER_MASK                                   0x00003f00
237 
238 
239 /* Description		RESERVED
240 
241 			<legal 0>
242 */
243 
244 #define PHYTX_ABORT_REQUEST_INFO_RESERVED_OFFSET                                    0x00000000
245 #define PHYTX_ABORT_REQUEST_INFO_RESERVED_LSB                                       14
246 #define PHYTX_ABORT_REQUEST_INFO_RESERVED_MSB                                       15
247 #define PHYTX_ABORT_REQUEST_INFO_RESERVED_MASK                                      0x0000c000
248 
249 
250 
251 #endif   // PHYTX_ABORT_REQUEST_INFO
252