1 /*
2  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef _HAL_BE_HW_INTERNAL_H_
21 #define _HAL_BE_HW_INTERNAL_H_
22 
23 #include "wcss_seq_hwioreg_umac.h"
24 #include "phyrx_location.h"
25 #include "receive_rssi_info.h"
26 #include "buffer_addr_info.h"
27 
28 #include "wbm2sw_completion_ring_tx.h"
29 #include "wbm2sw_completion_ring_rx.h"
30 
31 #if defined(QCA_WIFI_KIWI)
32 #include "msmhwioreg.h"
33 #endif
34 #include "phyrx_common_user_info.h"
35 
36 /* TX MONITOR */
37 #if  defined(WLAN_PKT_CAPTURE_TX_2_0) || \
38 defined(WLAN_PKT_CAPTURE_RX_2_0)
39 #include "mon_buffer_addr.h"
40 /* FES WINDOW OPEN */
41 #include "tx_fes_setup.h"
42 #include "rx_response_required_info.h"
43 
44 /* FES WINDOW CLOSE */
45 #include "tx_fes_status_end.h"
46 #include "response_end_status.h"
47 /* WIFITX_FLUSH_E */
48 #include "pcu_ppdu_setup_init.h"
49 #include "tx_peer_entry.h"
50 #include "tx_queue_extension.h"
51 #include "tx_mpdu_start.h"
52 #include "tx_msdu_start.h"
53 /* WIFITX_DATA_E */
54 #include "mon_buffer_addr.h"
55 /* WIFITX_MPDU_END_E */
56 /* WIFITX_MSDU_END_E */
57 /* WIFITX_LAST_MPDU_FETCHED_E */
58 /* WIFITX_LAST_MPDU_END_E */
59 #include "coex_tx_req.h"
60 #include "tx_raw_or_native_frame_setup.h"
61 /* WIFINDP_PREAMBLE_DONE_E */
62 /* WIFISCH_CRITICAL_TLV_REFERENCE_E */
63 /* WIFITX_LOOPBACK_SETUP_E */
64 /* WIFITX_FES_SETUP_COMPLETE_E */
65 /* WIFITQM_MPDU_GLOBAL_START_E */
66 /* WIFITX_WUR_DATA_E */
67 /* WIFISCHEDULER_END_E */
68 #include "pdg_tx_req.h"
69 #include "tx_fes_status_start.h"
70 #include "tx_fes_status_prot.h"
71 #include "tx_fes_status_start_prot.h"
72 /* WIFIPROT_TX_END_E */
73 #include "tx_fes_status_start_ppdu.h"
74 #include "tx_fes_status_user_ppdu.h"
75 /* WIFIPPDU_TX_END_E */
76 #include "tx_fes_status_user_response.h"
77 #include "tx_fes_status_ack_or_ba.h"
78 #include "tx_fes_status_1k_ba.h"
79 #include "received_response_user_7_0.h"
80 #include "received_response_user_15_8.h"
81 #include "received_response_user_23_16.h"
82 #include "received_response_user_31_24.h"
83 #include "received_response_user_36_32.h"
84 #include "txpcu_buffer_status.h"
85 #include "txpcu_user_buffer_status.h"
86 /* WIFITXDMA_STOP_REQUEST_E */
87 #include "tx_cbf_info.h"
88 /* WIFITX_MPDU_COUNT_TRANSFER_END_E */
89 #include "pdg_response.h"
90 /* WIFIPDG_TRIG_RESPONSE_E */
91 #include "received_trigger_info.h"
92 #include "ofdma_trigger_details.h"
93 #include "rx_frame_bitmap_ack.h"
94 #include "rx_frame_1k_bitmap_ack.h"
95 #include "response_start_status.h"
96 #include "rx_start_param.h"
97 #include "rxpcu_early_rx_indication.h"
98 /* WIFIRX_PM_INFO_E */
99 #include "tx_flush_req.h"
100 #include "coex_tx_status.h"
101 /* WIFIR2R_STATUS_END_E */
102 #include "rx_preamble.h"
103 #include "mactx_u_sig_eht_su_mu.h"
104 #include "mactx_u_sig_eht_tb.h"
105 #include "mactx_eht_sig_usr_ofdma.h"
106 #include "mactx_eht_sig_usr_mu_mimo.h"
107 #include "mactx_eht_sig_usr_su.h"
108 #include "mactx_he_sig_a_su.h"
109 #include "mactx_he_sig_a_mu_dl.h"
110 #include "mactx_he_sig_a_mu_ul.h"
111 #include "mactx_he_sig_b1_mu.h"
112 #include "mactx_he_sig_b2_mu.h"
113 #include "mactx_he_sig_b2_ofdma.h"
114 #include "mactx_l_sig_a.h"
115 #include "mactx_l_sig_b.h"
116 #include "mactx_ht_sig.h"
117 #include "mactx_vht_sig_a.h"
118 #include "mactx_vht_sig_b_mu160.h"
119 #include "mactx_vht_sig_b_mu80.h"
120 #include "mactx_vht_sig_b_mu40.h"
121 #include "mactx_vht_sig_b_mu20.h"
122 #include "mactx_vht_sig_b_su160.h"
123 #include "mactx_vht_sig_b_su80.h"
124 #include "mactx_vht_sig_b_su40.h"
125 #include "mactx_vht_sig_b_su20.h"
126 #include "phytx_ppdu_header_info_request.h"
127 #include "mactx_user_desc_per_user.h"
128 #include "mactx_user_desc_common.h"
129 #include "mactx_phy_desc.h"
130 #include "coex_rx_status.h"
131 #include "rx_ppdu_ack_report.h"
132 #include "rx_ppdu_no_ack_report.h"
133 /* WIFITXPCU_PHYTX_OTHER_TRANSMIT_INFO32_E */
134 /* WIFITXPCU_PHYTX_DEBUG32_E */
135 /* WIFITXPCU_PREAMBLE_DONE_E */
136 /* WIFIRX_PHY_SLEEP_E */
137 #include "rx_frame_bitmap_req.h"
138 /* WIFIRXPCU_TX_SETUP_CLEAR_E */
139 #include "rx_trig_info.h"
140 #include "expected_response.h"
141 /* WIFITRIGGER_RESPONSE_TX_DONE_E */
142 #endif /* WLAN_PKT_CAPTURE_TX_2_0 */
143 
144 #include <reo_descriptor_threshold_reached_status.h>
145 #include <reo_flush_queue.h>
146 #ifdef REO_SHARED_QREF_TABLE_EN
147 #include "rx_reo_queue_reference.h"
148 #endif
149 #define HAL_DESC_64_SET_FIELD(_desc, _word, _fld, _value) do { \
150 	((uint64_t *)(_desc))[(_word ## _ ## _fld ## _OFFSET) >> 3] &= \
151 		~(_word ## _ ## _fld ## _MASK); \
152 	((uint64_t *)(_desc))[(_word ## _ ## _fld ## _OFFSET) >> 3] |= \
153 		(((uint64_t)(_value)) << _word ## _ ## _fld ## _LSB); \
154 } while (0)
155 
156 #endif /* _HAL_BE_HW_INTERNAL_H_ */
157