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 _COEX_TX_REQ_H_
27 #define _COEX_TX_REQ_H_
28 #if !defined(__ASSEMBLER__)
29 #endif
30 
31 #define NUM_OF_DWORDS_COEX_TX_REQ 4
32 
33 #define NUM_OF_QWORDS_COEX_TX_REQ 2
34 
35 
36 struct coex_tx_req {
37 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
38              uint32_t tx_pwr                                                  :  8,
39                       min_tx_pwr                                              :  8,
40                       nss                                                     :  3,
41                       tx_chain_mask                                           :  8,
42                       bw                                                      :  3,
43                       reserved_0                                              :  2;
44              uint32_t alt_tx_pwr                                              :  8,
45                       alt_min_tx_pwr                                          :  8,
46                       alt_nss                                                 :  3,
47                       alt_tx_chain_mask                                       :  8,
48                       alt_bw                                                  :  3,
49                       reserved_1                                              :  2;
50              uint32_t tx_pwr_1                                                :  8,
51                       alt_tx_pwr_1                                            :  8,
52                       wlan_request_duration                                   : 16;
53              uint32_t wlan_pkt_type                                           :  4,
54                       coex_tx_reason                                          :  2,
55                       response_frame_type                                     :  5,
56                       wlan_low_priority_slicing_allowed                       :  1,
57                       wlan_high_priority_slicing_allowed                      :  1,
58                       sch_tx_burst_ongoing                                    :  1,
59                       coex_tx_priority                                        :  4,
60                       reserved_3a                                             : 14;
61 #else
62              uint32_t reserved_0                                              :  2,
63                       bw                                                      :  3,
64                       tx_chain_mask                                           :  8,
65                       nss                                                     :  3,
66                       min_tx_pwr                                              :  8,
67                       tx_pwr                                                  :  8;
68              uint32_t reserved_1                                              :  2,
69                       alt_bw                                                  :  3,
70                       alt_tx_chain_mask                                       :  8,
71                       alt_nss                                                 :  3,
72                       alt_min_tx_pwr                                          :  8,
73                       alt_tx_pwr                                              :  8;
74              uint32_t wlan_request_duration                                   : 16,
75                       alt_tx_pwr_1                                            :  8,
76                       tx_pwr_1                                                :  8;
77              uint32_t reserved_3a                                             : 14,
78                       coex_tx_priority                                        :  4,
79                       sch_tx_burst_ongoing                                    :  1,
80                       wlan_high_priority_slicing_allowed                      :  1,
81                       wlan_low_priority_slicing_allowed                       :  1,
82                       response_frame_type                                     :  5,
83                       coex_tx_reason                                          :  2,
84                       wlan_pkt_type                                           :  4;
85 #endif
86 };
87 
88 
89 
90 
91 #define COEX_TX_REQ_TX_PWR_OFFSET                                                   0x0000000000000000
92 #define COEX_TX_REQ_TX_PWR_LSB                                                      0
93 #define COEX_TX_REQ_TX_PWR_MSB                                                      7
94 #define COEX_TX_REQ_TX_PWR_MASK                                                     0x00000000000000ff
95 
96 
97 
98 
99 #define COEX_TX_REQ_MIN_TX_PWR_OFFSET                                               0x0000000000000000
100 #define COEX_TX_REQ_MIN_TX_PWR_LSB                                                  8
101 #define COEX_TX_REQ_MIN_TX_PWR_MSB                                                  15
102 #define COEX_TX_REQ_MIN_TX_PWR_MASK                                                 0x000000000000ff00
103 
104 
105 
106 
107 #define COEX_TX_REQ_NSS_OFFSET                                                      0x0000000000000000
108 #define COEX_TX_REQ_NSS_LSB                                                         16
109 #define COEX_TX_REQ_NSS_MSB                                                         18
110 #define COEX_TX_REQ_NSS_MASK                                                        0x0000000000070000
111 
112 
113 
114 
115 #define COEX_TX_REQ_TX_CHAIN_MASK_OFFSET                                            0x0000000000000000
116 #define COEX_TX_REQ_TX_CHAIN_MASK_LSB                                               19
117 #define COEX_TX_REQ_TX_CHAIN_MASK_MSB                                               26
118 #define COEX_TX_REQ_TX_CHAIN_MASK_MASK                                              0x0000000007f80000
119 
120 
121 
122 
123 #define COEX_TX_REQ_BW_OFFSET                                                       0x0000000000000000
124 #define COEX_TX_REQ_BW_LSB                                                          27
125 #define COEX_TX_REQ_BW_MSB                                                          29
126 #define COEX_TX_REQ_BW_MASK                                                         0x0000000038000000
127 
128 
129 
130 
131 #define COEX_TX_REQ_RESERVED_0_OFFSET                                               0x0000000000000000
132 #define COEX_TX_REQ_RESERVED_0_LSB                                                  30
133 #define COEX_TX_REQ_RESERVED_0_MSB                                                  31
134 #define COEX_TX_REQ_RESERVED_0_MASK                                                 0x00000000c0000000
135 
136 
137 
138 
139 #define COEX_TX_REQ_ALT_TX_PWR_OFFSET                                               0x0000000000000000
140 #define COEX_TX_REQ_ALT_TX_PWR_LSB                                                  32
141 #define COEX_TX_REQ_ALT_TX_PWR_MSB                                                  39
142 #define COEX_TX_REQ_ALT_TX_PWR_MASK                                                 0x000000ff00000000
143 
144 
145 
146 
147 #define COEX_TX_REQ_ALT_MIN_TX_PWR_OFFSET                                           0x0000000000000000
148 #define COEX_TX_REQ_ALT_MIN_TX_PWR_LSB                                              40
149 #define COEX_TX_REQ_ALT_MIN_TX_PWR_MSB                                              47
150 #define COEX_TX_REQ_ALT_MIN_TX_PWR_MASK                                             0x0000ff0000000000
151 
152 
153 
154 
155 #define COEX_TX_REQ_ALT_NSS_OFFSET                                                  0x0000000000000000
156 #define COEX_TX_REQ_ALT_NSS_LSB                                                     48
157 #define COEX_TX_REQ_ALT_NSS_MSB                                                     50
158 #define COEX_TX_REQ_ALT_NSS_MASK                                                    0x0007000000000000
159 
160 
161 
162 
163 #define COEX_TX_REQ_ALT_TX_CHAIN_MASK_OFFSET                                        0x0000000000000000
164 #define COEX_TX_REQ_ALT_TX_CHAIN_MASK_LSB                                           51
165 #define COEX_TX_REQ_ALT_TX_CHAIN_MASK_MSB                                           58
166 #define COEX_TX_REQ_ALT_TX_CHAIN_MASK_MASK                                          0x07f8000000000000
167 
168 
169 
170 
171 #define COEX_TX_REQ_ALT_BW_OFFSET                                                   0x0000000000000000
172 #define COEX_TX_REQ_ALT_BW_LSB                                                      59
173 #define COEX_TX_REQ_ALT_BW_MSB                                                      61
174 #define COEX_TX_REQ_ALT_BW_MASK                                                     0x3800000000000000
175 
176 
177 
178 
179 #define COEX_TX_REQ_RESERVED_1_OFFSET                                               0x0000000000000000
180 #define COEX_TX_REQ_RESERVED_1_LSB                                                  62
181 #define COEX_TX_REQ_RESERVED_1_MSB                                                  63
182 #define COEX_TX_REQ_RESERVED_1_MASK                                                 0xc000000000000000
183 
184 
185 
186 
187 #define COEX_TX_REQ_TX_PWR_1_OFFSET                                                 0x0000000000000008
188 #define COEX_TX_REQ_TX_PWR_1_LSB                                                    0
189 #define COEX_TX_REQ_TX_PWR_1_MSB                                                    7
190 #define COEX_TX_REQ_TX_PWR_1_MASK                                                   0x00000000000000ff
191 
192 
193 
194 
195 #define COEX_TX_REQ_ALT_TX_PWR_1_OFFSET                                             0x0000000000000008
196 #define COEX_TX_REQ_ALT_TX_PWR_1_LSB                                                8
197 #define COEX_TX_REQ_ALT_TX_PWR_1_MSB                                                15
198 #define COEX_TX_REQ_ALT_TX_PWR_1_MASK                                               0x000000000000ff00
199 
200 
201 
202 
203 #define COEX_TX_REQ_WLAN_REQUEST_DURATION_OFFSET                                    0x0000000000000008
204 #define COEX_TX_REQ_WLAN_REQUEST_DURATION_LSB                                       16
205 #define COEX_TX_REQ_WLAN_REQUEST_DURATION_MSB                                       31
206 #define COEX_TX_REQ_WLAN_REQUEST_DURATION_MASK                                      0x00000000ffff0000
207 
208 
209 
210 
211 #define COEX_TX_REQ_WLAN_PKT_TYPE_OFFSET                                            0x0000000000000008
212 #define COEX_TX_REQ_WLAN_PKT_TYPE_LSB                                               32
213 #define COEX_TX_REQ_WLAN_PKT_TYPE_MSB                                               35
214 #define COEX_TX_REQ_WLAN_PKT_TYPE_MASK                                              0x0000000f00000000
215 
216 
217 
218 
219 #define COEX_TX_REQ_COEX_TX_REASON_OFFSET                                           0x0000000000000008
220 #define COEX_TX_REQ_COEX_TX_REASON_LSB                                              36
221 #define COEX_TX_REQ_COEX_TX_REASON_MSB                                              37
222 #define COEX_TX_REQ_COEX_TX_REASON_MASK                                             0x0000003000000000
223 
224 
225 
226 
227 #define COEX_TX_REQ_RESPONSE_FRAME_TYPE_OFFSET                                      0x0000000000000008
228 #define COEX_TX_REQ_RESPONSE_FRAME_TYPE_LSB                                         38
229 #define COEX_TX_REQ_RESPONSE_FRAME_TYPE_MSB                                         42
230 #define COEX_TX_REQ_RESPONSE_FRAME_TYPE_MASK                                        0x000007c000000000
231 
232 
233 
234 
235 #define COEX_TX_REQ_WLAN_LOW_PRIORITY_SLICING_ALLOWED_OFFSET                        0x0000000000000008
236 #define COEX_TX_REQ_WLAN_LOW_PRIORITY_SLICING_ALLOWED_LSB                           43
237 #define COEX_TX_REQ_WLAN_LOW_PRIORITY_SLICING_ALLOWED_MSB                           43
238 #define COEX_TX_REQ_WLAN_LOW_PRIORITY_SLICING_ALLOWED_MASK                          0x0000080000000000
239 
240 
241 
242 
243 #define COEX_TX_REQ_WLAN_HIGH_PRIORITY_SLICING_ALLOWED_OFFSET                       0x0000000000000008
244 #define COEX_TX_REQ_WLAN_HIGH_PRIORITY_SLICING_ALLOWED_LSB                          44
245 #define COEX_TX_REQ_WLAN_HIGH_PRIORITY_SLICING_ALLOWED_MSB                          44
246 #define COEX_TX_REQ_WLAN_HIGH_PRIORITY_SLICING_ALLOWED_MASK                         0x0000100000000000
247 
248 
249 
250 
251 #define COEX_TX_REQ_SCH_TX_BURST_ONGOING_OFFSET                                     0x0000000000000008
252 #define COEX_TX_REQ_SCH_TX_BURST_ONGOING_LSB                                        45
253 #define COEX_TX_REQ_SCH_TX_BURST_ONGOING_MSB                                        45
254 #define COEX_TX_REQ_SCH_TX_BURST_ONGOING_MASK                                       0x0000200000000000
255 
256 
257 
258 
259 #define COEX_TX_REQ_COEX_TX_PRIORITY_OFFSET                                         0x0000000000000008
260 #define COEX_TX_REQ_COEX_TX_PRIORITY_LSB                                            46
261 #define COEX_TX_REQ_COEX_TX_PRIORITY_MSB                                            49
262 #define COEX_TX_REQ_COEX_TX_PRIORITY_MASK                                           0x0003c00000000000
263 
264 
265 
266 
267 #define COEX_TX_REQ_RESERVED_3A_OFFSET                                              0x0000000000000008
268 #define COEX_TX_REQ_RESERVED_3A_LSB                                                 50
269 #define COEX_TX_REQ_RESERVED_3A_MSB                                                 63
270 #define COEX_TX_REQ_RESERVED_3A_MASK                                                0xfffc000000000000
271 
272 
273 
274 #endif
275