xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8821cs/hal/halmac/halmac_tx_desc_ap.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  ******************************************************************************/
15 
16 #ifndef _HALMAC_TX_DESC_AP_H_
17 #define _HALMAC_TX_DESC_AP_H_
18 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
19      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
20      HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
21 
22 /*TXDESC_WORD0*/
23 
24 #define SET_TX_DESC_DISQSELSEQ(txdesc, value)                                  \
25 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
26 				  value, 0x1, 31)
27 #define SET_TX_DESC_DISQSELSEQ_NO_CLR(txdesc, value)                           \
28 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
29 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 31)
30 #define GET_TX_DESC_DISQSELSEQ(txdesc)                                         \
31 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1,  \
32 			      31)
33 
34 #endif
35 
36 #if (HALMAC_8814B_SUPPORT)
37 
38 #define SET_TX_DESC_IE_END_BODY(txdesc, value)                                 \
39 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
40 				  value, 0x1, 31)
41 #define SET_TX_DESC_IE_END_BODY_NO_CLR(txdesc, value)                          \
42 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
43 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 31)
44 #define GET_TX_DESC_IE_END_BODY(txdesc)                                        \
45 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1,  \
46 			      31)
47 
48 #endif
49 
50 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
51      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
52      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
53 
54 #define SET_TX_DESC_GF(txdesc, value)                                          \
55 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
56 				  value, 0x1, 30)
57 #define SET_TX_DESC_GF_NO_CLR(txdesc, value)                                   \
58 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
59 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 30)
60 #define GET_TX_DESC_GF(txdesc)                                                 \
61 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1,  \
62 			      30)
63 
64 #endif
65 
66 #if (HALMAC_8814B_SUPPORT)
67 
68 #define SET_TX_DESC_AGG_EN_V1(txdesc, value)                                   \
69 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
70 				  value, 0x1, 30)
71 #define SET_TX_DESC_AGG_EN_V1_NO_CLR(txdesc, value)                            \
72 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
73 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 30)
74 #define GET_TX_DESC_AGG_EN_V1(txdesc)                                          \
75 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1,  \
76 			      30)
77 
78 #endif
79 
80 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
81      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
82      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
83 
84 #define SET_TX_DESC_NO_ACM(txdesc, value)                                      \
85 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
86 				  value, 0x1, 29)
87 #define SET_TX_DESC_NO_ACM_NO_CLR(txdesc, value)                               \
88 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
89 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 29)
90 #define GET_TX_DESC_NO_ACM(txdesc)                                             \
91 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1,  \
92 			      29)
93 
94 #endif
95 
96 #if (HALMAC_8814B_SUPPORT)
97 
98 #define SET_TX_DESC_BK_V1(txdesc, value)                                       \
99 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
100 				  value, 0x1, 29)
101 #define SET_TX_DESC_BK_V1_NO_CLR(txdesc, value)                                \
102 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
103 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 29)
104 #define GET_TX_DESC_BK_V1(txdesc)                                              \
105 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1,  \
106 			      29)
107 
108 #endif
109 
110 #if (HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8821C_SUPPORT ||   \
111      HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT ||   \
112      HALMAC_8197G_SUPPORT)
113 
114 #define SET_TX_DESC_BCNPKT_TSF_CTRL(txdesc, value)                             \
115 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
116 				  value, 0x1, 28)
117 #define SET_TX_DESC_BCNPKT_TSF_CTRL_NO_CLR(txdesc, value)                      \
118 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
119 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 28)
120 #define GET_TX_DESC_BCNPKT_TSF_CTRL(txdesc)                                    \
121 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1,  \
122 			      28)
123 
124 #endif
125 
126 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
127      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
128      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
129 
130 #define SET_TX_DESC_AMSDU_PAD_EN(txdesc, value)                                \
131 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
132 				  value, 0x1, 27)
133 #define SET_TX_DESC_AMSDU_PAD_EN_NO_CLR(txdesc, value)                         \
134 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
135 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 27)
136 #define GET_TX_DESC_AMSDU_PAD_EN(txdesc)                                       \
137 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1,  \
138 			      27)
139 
140 #endif
141 
142 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
143      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
144      HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
145 
146 #define SET_TX_DESC_LS(txdesc, value)                                          \
147 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
148 				  value, 0x1, 26)
149 #define SET_TX_DESC_LS_NO_CLR(txdesc, value)                                   \
150 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
151 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 26)
152 #define GET_TX_DESC_LS(txdesc)                                                 \
153 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1,  \
154 			      26)
155 
156 #endif
157 
158 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
159      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
160      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
161 
162 #define SET_TX_DESC_HTC(txdesc, value)                                         \
163 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
164 				  value, 0x1, 25)
165 #define SET_TX_DESC_HTC_NO_CLR(txdesc, value)                                  \
166 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
167 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 25)
168 #define GET_TX_DESC_HTC(txdesc)                                                \
169 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1,  \
170 			      25)
171 #define SET_TX_DESC_BMC(txdesc, value)                                         \
172 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
173 				  value, 0x1, 24)
174 #define SET_TX_DESC_BMC_NO_CLR(txdesc, value)                                  \
175 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
176 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 24)
177 #define GET_TX_DESC_BMC(txdesc)                                                \
178 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1,  \
179 			      24)
180 
181 #endif
182 
183 #if (HALMAC_8814B_SUPPORT)
184 
185 #define SET_TX_DESC_PKT_OFFSET_V1(txdesc, value)                               \
186 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
187 				  value, 0x1f, 24)
188 #define SET_TX_DESC_PKT_OFFSET_V1_NO_CLR(txdesc, value)                        \
189 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
190 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1f, 24)
191 #define GET_TX_DESC_PKT_OFFSET_V1(txdesc)                                      \
192 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1f, \
193 			      24)
194 
195 #endif
196 
197 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
198      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
199      HALMAC_8822C_SUPPORT || HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT ||   \
200      HALMAC_8197G_SUPPORT)
201 
202 #define SET_TX_DESC_OFFSET(txdesc, value)                                      \
203 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
204 				  value, 0xff, 16)
205 #define SET_TX_DESC_OFFSET_NO_CLR(txdesc, value)                               \
206 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
207 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0xff, 16)
208 #define GET_TX_DESC_OFFSET(txdesc)                                             \
209 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0xff, \
210 			      16)
211 #define SET_TX_DESC_TXPKTSIZE(txdesc, value)                                   \
212 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0,   \
213 				  value, 0xffff, 0)
214 #define SET_TX_DESC_TXPKTSIZE_NO_CLR(txdesc, value)                            \
215 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
216 		((struct halmac_tx_desc *)txdesc)->dword0, value, 0xffff, 0)
217 #define GET_TX_DESC_TXPKTSIZE(txdesc)                                          \
218 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0,       \
219 			      0xffff, 0)
220 
221 #endif
222 
223 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
224 
225 /*WORD1*/
226 
227 #define SET_TX_DESC_HW_AES_IV_V2(txdesc, value)                                \
228 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
229 				  value, 0x1, 31)
230 #define SET_TX_DESC_HW_AES_IV_V2_NO_CLR(txdesc, value)                         \
231 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
232 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 31)
233 #define GET_TX_DESC_HW_AES_IV_V2(txdesc)                                       \
234 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
235 			      31)
236 
237 #endif
238 
239 #if (HALMAC_8814B_SUPPORT)
240 
241 #define SET_TX_DESC_AMSDU(txdesc, value)                                       \
242 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
243 				  value, 0x1, 30)
244 #define SET_TX_DESC_AMSDU_NO_CLR(txdesc, value)                                \
245 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
246 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 30)
247 #define GET_TX_DESC_AMSDU(txdesc)                                              \
248 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
249 			      30)
250 
251 #endif
252 
253 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
254 
255 #define SET_TX_DESC_FTM_EN_V1(txdesc, value)                                   \
256 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
257 				  value, 0x1, 30)
258 #define SET_TX_DESC_FTM_EN_V1_NO_CLR(txdesc, value)                            \
259 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
260 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 30)
261 #define GET_TX_DESC_FTM_EN_V1(txdesc)                                          \
262 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
263 			      30)
264 
265 #endif
266 
267 #if (HALMAC_8192F_SUPPORT)
268 
269 #define SET_TX_DESC_KEYID_SEL(txdesc, value)                                   \
270 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
271 				  value, 0x1, 30)
272 #define SET_TX_DESC_KEYID_SEL_NO_CLR(txdesc, value)                            \
273 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
274 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 30)
275 #define GET_TX_DESC_KEYID_SEL(txdesc)                                          \
276 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
277 			      30)
278 
279 #endif
280 
281 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
282      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
283      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
284 
285 #define SET_TX_DESC_MOREDATA(txdesc, value)                                    \
286 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
287 				  value, 0x1, 29)
288 #define SET_TX_DESC_MOREDATA_NO_CLR(txdesc, value)                             \
289 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
290 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 29)
291 #define GET_TX_DESC_MOREDATA(txdesc)                                           \
292 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
293 			      29)
294 
295 #endif
296 
297 #if (HALMAC_8814B_SUPPORT)
298 
299 #define SET_TX_DESC_HW_AES_IV_V1(txdesc, value)                                \
300 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
301 				  value, 0x1, 29)
302 #define SET_TX_DESC_HW_AES_IV_V1_NO_CLR(txdesc, value)                         \
303 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
304 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 29)
305 #define GET_TX_DESC_HW_AES_IV_V1(txdesc)                                       \
306 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
307 			      29)
308 #define SET_TX_DESC_MHR_CP(txdesc, value)                                      \
309 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
310 				  value, 0x1, 25)
311 #define SET_TX_DESC_MHR_CP_NO_CLR(txdesc, value)                               \
312 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
313 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 25)
314 #define GET_TX_DESC_MHR_CP(txdesc)                                             \
315 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
316 			      25)
317 
318 #endif
319 
320 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
321      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
322      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
323 
324 #define SET_TX_DESC_PKT_OFFSET(txdesc, value)                                  \
325 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
326 				  value, 0x1f, 24)
327 #define SET_TX_DESC_PKT_OFFSET_NO_CLR(txdesc, value)                           \
328 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
329 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1f, 24)
330 #define GET_TX_DESC_PKT_OFFSET(txdesc)                                         \
331 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1f, \
332 			      24)
333 
334 #endif
335 
336 #if (HALMAC_8814B_SUPPORT)
337 
338 #define SET_TX_DESC_SMH_EN_V1(txdesc, value)                                   \
339 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
340 				  value, 0x1, 24)
341 #define SET_TX_DESC_SMH_EN_V1_NO_CLR(txdesc, value)                            \
342 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
343 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 24)
344 #define GET_TX_DESC_SMH_EN_V1(txdesc)                                          \
345 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
346 			      24)
347 
348 #endif
349 
350 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
351      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
352      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
353 
354 #define SET_TX_DESC_SEC_TYPE(txdesc, value)                                    \
355 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
356 				  value, 0x3, 22)
357 #define SET_TX_DESC_SEC_TYPE_NO_CLR(txdesc, value)                             \
358 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
359 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x3, 22)
360 #define GET_TX_DESC_SEC_TYPE(txdesc)                                           \
361 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x3,  \
362 			      22)
363 #define SET_TX_DESC_EN_DESC_ID(txdesc, value)                                  \
364 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
365 				  value, 0x1, 21)
366 #define SET_TX_DESC_EN_DESC_ID_NO_CLR(txdesc, value)                           \
367 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
368 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 21)
369 #define GET_TX_DESC_EN_DESC_ID(txdesc)                                         \
370 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
371 			      21)
372 #define SET_TX_DESC_RATE_ID(txdesc, value)                                     \
373 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
374 				  value, 0x1f, 16)
375 #define SET_TX_DESC_RATE_ID_NO_CLR(txdesc, value)                              \
376 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
377 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1f, 16)
378 #define GET_TX_DESC_RATE_ID(txdesc)                                            \
379 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1f, \
380 			      16)
381 
382 #endif
383 
384 #if (HALMAC_8814B_SUPPORT)
385 
386 #define SET_TX_DESC_SMH_CAM(txdesc, value)                                     \
387 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
388 				  value, 0xff, 16)
389 #define SET_TX_DESC_SMH_CAM_NO_CLR(txdesc, value)                              \
390 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
391 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0xff, 16)
392 #define GET_TX_DESC_SMH_CAM(txdesc)                                            \
393 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0xff, \
394 			      16)
395 
396 #endif
397 
398 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
399      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
400      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
401 
402 #define SET_TX_DESC_PIFS(txdesc, value)                                        \
403 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
404 				  value, 0x1, 15)
405 #define SET_TX_DESC_PIFS_NO_CLR(txdesc, value)                                 \
406 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
407 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 15)
408 #define GET_TX_DESC_PIFS(txdesc)                                               \
409 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
410 			      15)
411 #define SET_TX_DESC_LSIG_TXOP_EN(txdesc, value)                                \
412 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
413 				  value, 0x1, 14)
414 #define SET_TX_DESC_LSIG_TXOP_EN_NO_CLR(txdesc, value)                         \
415 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
416 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 14)
417 #define GET_TX_DESC_LSIG_TXOP_EN(txdesc)                                       \
418 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
419 			      14)
420 #define SET_TX_DESC_RD_NAV_EXT(txdesc, value)                                  \
421 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
422 				  value, 0x1, 13)
423 #define SET_TX_DESC_RD_NAV_EXT_NO_CLR(txdesc, value)                           \
424 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
425 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 13)
426 #define GET_TX_DESC_RD_NAV_EXT(txdesc)                                         \
427 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
428 			      13)
429 
430 #endif
431 
432 #if (HALMAC_8814B_SUPPORT)
433 
434 #define SET_TX_DESC_EXT_EDCA(txdesc, value)                                    \
435 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
436 				  value, 0x1, 13)
437 #define SET_TX_DESC_EXT_EDCA_NO_CLR(txdesc, value)                             \
438 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
439 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 13)
440 #define GET_TX_DESC_EXT_EDCA(txdesc)                                           \
441 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1,  \
442 			      13)
443 
444 #endif
445 
446 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
447      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
448      HALMAC_8822C_SUPPORT || HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT ||   \
449      HALMAC_8197G_SUPPORT)
450 
451 #define SET_TX_DESC_QSEL(txdesc, value)                                        \
452 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
453 				  value, 0x1f, 8)
454 #define SET_TX_DESC_QSEL_NO_CLR(txdesc, value)                                 \
455 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
456 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1f, 8)
457 #define GET_TX_DESC_QSEL(txdesc)                                               \
458 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1f, \
459 			      8)
460 
461 #endif
462 
463 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
464 
465 #define SET_TX_DESC_SPECIAL_CW(txdesc, value)                                  \
466 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
467 				  value, 0x1, 7)
468 #define SET_TX_DESC_SPECIAL_CW_NO_CLR(txdesc, value)                           \
469 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
470 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 7)
471 #define GET_TX_DESC_SPECIAL_CW(txdesc)                                         \
472 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, 7)
473 
474 #endif
475 
476 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
477      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
478      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
479 
480 #define SET_TX_DESC_MACID(txdesc, value)                                       \
481 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
482 				  value, 0x7f, 0)
483 #define SET_TX_DESC_MACID_NO_CLR(txdesc, value)                                \
484 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
485 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x7f, 0)
486 #define GET_TX_DESC_MACID(txdesc)                                              \
487 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x7f, \
488 			      0)
489 
490 #endif
491 
492 #if (HALMAC_8814B_SUPPORT)
493 
494 #define SET_TX_DESC_MACID_V1(txdesc, value)                                    \
495 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1,   \
496 				  value, 0x7f, 0)
497 #define SET_TX_DESC_MACID_V1_NO_CLR(txdesc, value)                             \
498 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
499 		((struct halmac_tx_desc *)txdesc)->dword1, value, 0x7f, 0)
500 #define GET_TX_DESC_MACID_V1(txdesc)                                           \
501 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x7f, \
502 			      0)
503 
504 #endif
505 
506 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
507      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
508 
509 /*TXDESC_WORD2*/
510 
511 #define SET_TX_DESC_HW_AES_IV(txdesc, value)                                   \
512 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
513 				  value, 0x1, 31)
514 #define SET_TX_DESC_HW_AES_IV_NO_CLR(txdesc, value)                            \
515 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
516 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 31)
517 #define GET_TX_DESC_HW_AES_IV(txdesc)                                          \
518 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
519 			      31)
520 
521 #endif
522 
523 #if (HALMAC_8814B_SUPPORT)
524 
525 #define SET_TX_DESC_CHK_EN_V1(txdesc, value)                                   \
526 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
527 				  value, 0x1, 31)
528 #define SET_TX_DESC_CHK_EN_V1_NO_CLR(txdesc, value)                            \
529 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
530 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 31)
531 #define GET_TX_DESC_CHK_EN_V1(txdesc)                                          \
532 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
533 			      31)
534 
535 #endif
536 
537 #if (HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8821C_SUPPORT ||   \
538      HALMAC_8822C_SUPPORT || HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT)
539 
540 #define SET_TX_DESC_FTM_EN(txdesc, value)                                      \
541 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
542 				  value, 0x1, 30)
543 #define SET_TX_DESC_FTM_EN_NO_CLR(txdesc, value)                               \
544 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
545 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 30)
546 #define GET_TX_DESC_FTM_EN(txdesc)                                             \
547 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
548 			      30)
549 
550 #endif
551 
552 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
553 
554 #define SET_TX_DESC_ANTCEL_D_V1(txdesc, value)                                 \
555 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
556 				  value, 0xf, 28)
557 #define SET_TX_DESC_ANTCEL_D_V1_NO_CLR(txdesc, value)                          \
558 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
559 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0xf, 28)
560 #define GET_TX_DESC_ANTCEL_D_V1(txdesc)                                        \
561 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0xf,  \
562 			      28)
563 
564 #endif
565 
566 #if (HALMAC_8814B_SUPPORT)
567 
568 #define SET_TX_DESC_DMA_PRI(txdesc, value)                                     \
569 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
570 				  value, 0x1, 27)
571 #define SET_TX_DESC_DMA_PRI_NO_CLR(txdesc, value)                              \
572 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
573 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 27)
574 #define GET_TX_DESC_DMA_PRI(txdesc)                                            \
575 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
576 			      27)
577 
578 #endif
579 
580 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
581      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8192F_SUPPORT ||   \
582      HALMAC_8812F_SUPPORT)
583 
584 #define SET_TX_DESC_G_ID(txdesc, value)                                        \
585 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
586 				  value, 0x3f, 24)
587 #define SET_TX_DESC_G_ID_NO_CLR(txdesc, value)                                 \
588 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
589 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x3f, 24)
590 #define GET_TX_DESC_G_ID(txdesc)                                               \
591 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x3f, \
592 			      24)
593 
594 #endif
595 
596 #if (HALMAC_8814B_SUPPORT)
597 
598 #define SET_TX_DESC_MAX_AMSDU_MODE(txdesc, value)                              \
599 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
600 				  value, 0x7, 24)
601 #define SET_TX_DESC_MAX_AMSDU_MODE_NO_CLR(txdesc, value)                       \
602 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
603 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x7, 24)
604 #define GET_TX_DESC_MAX_AMSDU_MODE(txdesc)                                     \
605 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x7,  \
606 			      24)
607 
608 #endif
609 
610 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
611 
612 #define SET_TX_DESC_ANTSEL_C_V1(txdesc, value)                                 \
613 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
614 				  value, 0xf, 24)
615 #define SET_TX_DESC_ANTSEL_C_V1_NO_CLR(txdesc, value)                          \
616 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
617 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0xf, 24)
618 #define GET_TX_DESC_ANTSEL_C_V1(txdesc)                                        \
619 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0xf,  \
620 			      24)
621 
622 #endif
623 
624 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
625      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
626      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
627 
628 #define SET_TX_DESC_BT_NULL(txdesc, value)                                     \
629 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
630 				  value, 0x1, 23)
631 #define SET_TX_DESC_BT_NULL_NO_CLR(txdesc, value)                              \
632 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
633 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 23)
634 #define GET_TX_DESC_BT_NULL(txdesc)                                            \
635 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
636 			      23)
637 #define SET_TX_DESC_AMPDU_DENSITY(txdesc, value)                               \
638 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
639 				  value, 0x7, 20)
640 #define SET_TX_DESC_AMPDU_DENSITY_NO_CLR(txdesc, value)                        \
641 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
642 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x7, 20)
643 #define GET_TX_DESC_AMPDU_DENSITY(txdesc)                                      \
644 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x7,  \
645 			      20)
646 #define SET_TX_DESC_SPE_RPT(txdesc, value)                                     \
647 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
648 				  value, 0x1, 19)
649 #define SET_TX_DESC_SPE_RPT_NO_CLR(txdesc, value)                              \
650 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
651 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 19)
652 #define GET_TX_DESC_SPE_RPT(txdesc)                                            \
653 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
654 			      19)
655 #define SET_TX_DESC_RAW(txdesc, value)                                         \
656 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
657 				  value, 0x1, 18)
658 #define SET_TX_DESC_RAW_NO_CLR(txdesc, value)                                  \
659 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
660 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 18)
661 #define GET_TX_DESC_RAW(txdesc)                                                \
662 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
663 			      18)
664 #define SET_TX_DESC_MOREFRAG(txdesc, value)                                    \
665 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
666 				  value, 0x1, 17)
667 #define SET_TX_DESC_MOREFRAG_NO_CLR(txdesc, value)                             \
668 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
669 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 17)
670 #define GET_TX_DESC_MOREFRAG(txdesc)                                           \
671 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
672 			      17)
673 #define SET_TX_DESC_BK(txdesc, value)                                          \
674 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
675 				  value, 0x1, 16)
676 #define SET_TX_DESC_BK_NO_CLR(txdesc, value)                                   \
677 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
678 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 16)
679 #define GET_TX_DESC_BK(txdesc)                                                 \
680 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
681 			      16)
682 
683 #endif
684 
685 #if (HALMAC_8814B_SUPPORT)
686 
687 #define SET_TX_DESC_DMA_TXAGG_NUM_V1(txdesc, value)                            \
688 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
689 				  value, 0xff, 16)
690 #define SET_TX_DESC_DMA_TXAGG_NUM_V1_NO_CLR(txdesc, value)                     \
691 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
692 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0xff, 16)
693 #define GET_TX_DESC_DMA_TXAGG_NUM_V1(txdesc)                                   \
694 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0xff, \
695 			      16)
696 
697 #endif
698 
699 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
700      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
701      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
702 
703 #define SET_TX_DESC_NULL_1(txdesc, value)                                      \
704 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
705 				  value, 0x1, 15)
706 #define SET_TX_DESC_NULL_1_NO_CLR(txdesc, value)                               \
707 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
708 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 15)
709 #define GET_TX_DESC_NULL_1(txdesc)                                             \
710 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
711 			      15)
712 #define SET_TX_DESC_NULL_0(txdesc, value)                                      \
713 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
714 				  value, 0x1, 14)
715 #define SET_TX_DESC_NULL_0_NO_CLR(txdesc, value)                               \
716 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
717 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 14)
718 #define GET_TX_DESC_NULL_0(txdesc)                                             \
719 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
720 			      14)
721 #define SET_TX_DESC_RDG_EN(txdesc, value)                                      \
722 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
723 				  value, 0x1, 13)
724 #define SET_TX_DESC_RDG_EN_NO_CLR(txdesc, value)                               \
725 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
726 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 13)
727 #define GET_TX_DESC_RDG_EN(txdesc)                                             \
728 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
729 			      13)
730 #define SET_TX_DESC_AGG_EN(txdesc, value)                                      \
731 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
732 				  value, 0x1, 12)
733 #define SET_TX_DESC_AGG_EN_NO_CLR(txdesc, value)                               \
734 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
735 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 12)
736 #define GET_TX_DESC_AGG_EN(txdesc)                                             \
737 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1,  \
738 			      12)
739 #define SET_TX_DESC_CCA_RTS(txdesc, value)                                     \
740 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
741 				  value, 0x3, 10)
742 #define SET_TX_DESC_CCA_RTS_NO_CLR(txdesc, value)                              \
743 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
744 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x3, 10)
745 #define GET_TX_DESC_CCA_RTS(txdesc)                                            \
746 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x3,  \
747 			      10)
748 
749 #endif
750 
751 #if (HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8821C_SUPPORT ||   \
752      HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8192F_SUPPORT ||   \
753      HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
754 
755 #define SET_TX_DESC_TRI_FRAME(txdesc, value)                                   \
756 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
757 				  value, 0x1, 9)
758 #define SET_TX_DESC_TRI_FRAME_NO_CLR(txdesc, value)                            \
759 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
760 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 9)
761 #define GET_TX_DESC_TRI_FRAME(txdesc)                                          \
762 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, 9)
763 
764 #endif
765 
766 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
767      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
768      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
769 
770 #define SET_TX_DESC_P_AID(txdesc, value)                                       \
771 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
772 				  value, 0x1ff, 0)
773 #define SET_TX_DESC_P_AID_NO_CLR(txdesc, value)                                \
774 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
775 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1ff, 0)
776 #define GET_TX_DESC_P_AID(txdesc)                                              \
777 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2,       \
778 			      0x1ff, 0)
779 
780 #endif
781 
782 #if (HALMAC_8814B_SUPPORT)
783 
784 #define SET_TX_DESC_TXDESC_CHECKSUM_V1(txdesc, value)                          \
785 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2,   \
786 				  value, 0xffff, 0)
787 #define SET_TX_DESC_TXDESC_CHECKSUM_V1_NO_CLR(txdesc, value)                   \
788 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
789 		((struct halmac_tx_desc *)txdesc)->dword2, value, 0xffff, 0)
790 #define GET_TX_DESC_TXDESC_CHECKSUM_V1(txdesc)                                 \
791 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2,       \
792 			      0xffff, 0)
793 
794 #endif
795 
796 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
797      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
798      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
799 
800 /*TXDESC_WORD3*/
801 
802 #define SET_TX_DESC_AMPDU_MAX_TIME(txdesc, value)                              \
803 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
804 				  value, 0xff, 24)
805 #define SET_TX_DESC_AMPDU_MAX_TIME_NO_CLR(txdesc, value)                       \
806 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
807 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0xff, 24)
808 #define GET_TX_DESC_AMPDU_MAX_TIME(txdesc)                                     \
809 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0xff, \
810 			      24)
811 #define SET_TX_DESC_NDPA(txdesc, value)                                        \
812 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
813 				  value, 0x3, 22)
814 #define SET_TX_DESC_NDPA_NO_CLR(txdesc, value)                                 \
815 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
816 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x3, 22)
817 #define GET_TX_DESC_NDPA(txdesc)                                               \
818 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x3,  \
819 			      22)
820 #define SET_TX_DESC_MAX_AGG_NUM(txdesc, value)                                 \
821 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
822 				  value, 0x1f, 17)
823 #define SET_TX_DESC_MAX_AGG_NUM_NO_CLR(txdesc, value)                          \
824 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
825 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1f, 17)
826 #define GET_TX_DESC_MAX_AGG_NUM(txdesc)                                        \
827 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1f, \
828 			      17)
829 #define SET_TX_DESC_USE_MAX_TIME_EN(txdesc, value)                             \
830 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
831 				  value, 0x1, 16)
832 #define SET_TX_DESC_USE_MAX_TIME_EN_NO_CLR(txdesc, value)                      \
833 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
834 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 16)
835 #define GET_TX_DESC_USE_MAX_TIME_EN(txdesc)                                    \
836 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1,  \
837 			      16)
838 
839 #endif
840 
841 #if (HALMAC_8814B_SUPPORT)
842 
843 #define SET_TX_DESC_OFFLOAD_SIZE(txdesc, value)                                \
844 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
845 				  value, 0x7fff, 16)
846 #define SET_TX_DESC_OFFLOAD_SIZE_NO_CLR(txdesc, value)                         \
847 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
848 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x7fff, 16)
849 #define GET_TX_DESC_OFFLOAD_SIZE(txdesc)                                       \
850 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3,       \
851 			      0x7fff, 16)
852 
853 #endif
854 
855 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
856      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
857      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
858 
859 #define SET_TX_DESC_NAVUSEHDR(txdesc, value)                                   \
860 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
861 				  value, 0x1, 15)
862 #define SET_TX_DESC_NAVUSEHDR_NO_CLR(txdesc, value)                            \
863 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
864 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 15)
865 #define GET_TX_DESC_NAVUSEHDR(txdesc)                                          \
866 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1,  \
867 			      15)
868 #define SET_TX_DESC_CHK_EN(txdesc, value)                                      \
869 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
870 				  value, 0x1, 14)
871 #define SET_TX_DESC_CHK_EN_NO_CLR(txdesc, value)                               \
872 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
873 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 14)
874 #define GET_TX_DESC_CHK_EN(txdesc)                                             \
875 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1,  \
876 			      14)
877 #define SET_TX_DESC_HW_RTS_EN(txdesc, value)                                   \
878 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
879 				  value, 0x1, 13)
880 #define SET_TX_DESC_HW_RTS_EN_NO_CLR(txdesc, value)                            \
881 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
882 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 13)
883 #define GET_TX_DESC_HW_RTS_EN(txdesc)                                          \
884 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1,  \
885 			      13)
886 #define SET_TX_DESC_RTSEN(txdesc, value)                                       \
887 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
888 				  value, 0x1, 12)
889 #define SET_TX_DESC_RTSEN_NO_CLR(txdesc, value)                                \
890 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
891 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 12)
892 #define GET_TX_DESC_RTSEN(txdesc)                                              \
893 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1,  \
894 			      12)
895 #define SET_TX_DESC_CTS2SELF(txdesc, value)                                    \
896 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
897 				  value, 0x1, 11)
898 #define SET_TX_DESC_CTS2SELF_NO_CLR(txdesc, value)                             \
899 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
900 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 11)
901 #define GET_TX_DESC_CTS2SELF(txdesc)                                           \
902 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1,  \
903 			      11)
904 
905 #endif
906 
907 #if (HALMAC_8814B_SUPPORT)
908 
909 #define SET_TX_DESC_CHANNEL_DMA(txdesc, value)                                 \
910 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
911 				  value, 0x1f, 11)
912 #define SET_TX_DESC_CHANNEL_DMA_NO_CLR(txdesc, value)                          \
913 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
914 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1f, 11)
915 #define GET_TX_DESC_CHANNEL_DMA(txdesc)                                        \
916 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1f, \
917 			      11)
918 
919 #endif
920 
921 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
922      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
923      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
924 
925 #define SET_TX_DESC_DISDATAFB(txdesc, value)                                   \
926 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
927 				  value, 0x1, 10)
928 #define SET_TX_DESC_DISDATAFB_NO_CLR(txdesc, value)                            \
929 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
930 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 10)
931 #define GET_TX_DESC_DISDATAFB(txdesc)                                          \
932 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1,  \
933 			      10)
934 #define SET_TX_DESC_DISRTSFB(txdesc, value)                                    \
935 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
936 				  value, 0x1, 9)
937 #define SET_TX_DESC_DISRTSFB_NO_CLR(txdesc, value)                             \
938 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
939 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 9)
940 #define GET_TX_DESC_DISRTSFB(txdesc)                                           \
941 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, 9)
942 #define SET_TX_DESC_USE_RATE(txdesc, value)                                    \
943 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
944 				  value, 0x1, 8)
945 #define SET_TX_DESC_USE_RATE_NO_CLR(txdesc, value)                             \
946 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
947 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 8)
948 #define GET_TX_DESC_USE_RATE(txdesc)                                           \
949 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, 8)
950 #define SET_TX_DESC_HW_SSN_SEL(txdesc, value)                                  \
951 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
952 				  value, 0x3, 6)
953 #define SET_TX_DESC_HW_SSN_SEL_NO_CLR(txdesc, value)                           \
954 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
955 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x3, 6)
956 #define GET_TX_DESC_HW_SSN_SEL(txdesc)                                         \
957 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x3, 6)
958 
959 #endif
960 
961 #if (HALMAC_8814B_SUPPORT)
962 
963 #define SET_TX_DESC_IE_CNT(txdesc, value)                                      \
964 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
965 				  value, 0x7, 6)
966 #define SET_TX_DESC_IE_CNT_NO_CLR(txdesc, value)                               \
967 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
968 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x7, 6)
969 #define GET_TX_DESC_IE_CNT(txdesc)                                             \
970 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x7, 6)
971 #define SET_TX_DESC_IE_CNT_EN(txdesc, value)                                   \
972 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
973 				  value, 0x1, 5)
974 #define SET_TX_DESC_IE_CNT_EN_NO_CLR(txdesc, value)                            \
975 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
976 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 5)
977 #define GET_TX_DESC_IE_CNT_EN(txdesc)                                          \
978 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, 5)
979 
980 #endif
981 
982 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
983      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
984      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
985 
986 #define SET_TX_DESC_WHEADER_LEN(txdesc, value)                                 \
987 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
988 				  value, 0x1f, 0)
989 #define SET_TX_DESC_WHEADER_LEN_NO_CLR(txdesc, value)                          \
990 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
991 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1f, 0)
992 #define GET_TX_DESC_WHEADER_LEN(txdesc)                                        \
993 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1f, \
994 			      0)
995 
996 #endif
997 
998 #if (HALMAC_8814B_SUPPORT)
999 
1000 #define SET_TX_DESC_WHEADER_LEN_V1(txdesc, value)                              \
1001 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3,   \
1002 				  value, 0x1f, 0)
1003 #define SET_TX_DESC_WHEADER_LEN_V1_NO_CLR(txdesc, value)                       \
1004 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1005 		((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1f, 0)
1006 #define GET_TX_DESC_WHEADER_LEN_V1(txdesc)                                     \
1007 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1f, \
1008 			      0)
1009 
1010 #endif
1011 
1012 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1013      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1014      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
1015 
1016 /*TXDESC_WORD4*/
1017 
1018 #define SET_TX_DESC_PCTS_MASK_IDX(txdesc, value)                               \
1019 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4,   \
1020 				  value, 0x3, 30)
1021 #define SET_TX_DESC_PCTS_MASK_IDX_NO_CLR(txdesc, value)                        \
1022 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1023 		((struct halmac_tx_desc *)txdesc)->dword4, value, 0x3, 30)
1024 #define GET_TX_DESC_PCTS_MASK_IDX(txdesc)                                      \
1025 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x3,  \
1026 			      30)
1027 #define SET_TX_DESC_PCTS_EN(txdesc, value)                                     \
1028 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4,   \
1029 				  value, 0x1, 29)
1030 #define SET_TX_DESC_PCTS_EN_NO_CLR(txdesc, value)                              \
1031 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1032 		((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1, 29)
1033 #define GET_TX_DESC_PCTS_EN(txdesc)                                            \
1034 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1,  \
1035 			      29)
1036 #define SET_TX_DESC_RTSRATE(txdesc, value)                                     \
1037 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4,   \
1038 				  value, 0x1f, 24)
1039 #define SET_TX_DESC_RTSRATE_NO_CLR(txdesc, value)                              \
1040 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1041 		((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1f, 24)
1042 #define GET_TX_DESC_RTSRATE(txdesc)                                            \
1043 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1f, \
1044 			      24)
1045 #define SET_TX_DESC_RTS_DATA_RTY_LMT(txdesc, value)                            \
1046 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4,   \
1047 				  value, 0x3f, 18)
1048 #define SET_TX_DESC_RTS_DATA_RTY_LMT_NO_CLR(txdesc, value)                     \
1049 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1050 		((struct halmac_tx_desc *)txdesc)->dword4, value, 0x3f, 18)
1051 #define GET_TX_DESC_RTS_DATA_RTY_LMT(txdesc)                                   \
1052 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x3f, \
1053 			      18)
1054 #define SET_TX_DESC_RTY_LMT_EN(txdesc, value)                                  \
1055 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4,   \
1056 				  value, 0x1, 17)
1057 #define SET_TX_DESC_RTY_LMT_EN_NO_CLR(txdesc, value)                           \
1058 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1059 		((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1, 17)
1060 #define GET_TX_DESC_RTY_LMT_EN(txdesc)                                         \
1061 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1,  \
1062 			      17)
1063 #define SET_TX_DESC_RTS_RTY_LOWEST_RATE(txdesc, value)                         \
1064 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4,   \
1065 				  value, 0xf, 13)
1066 #define SET_TX_DESC_RTS_RTY_LOWEST_RATE_NO_CLR(txdesc, value)                  \
1067 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1068 		((struct halmac_tx_desc *)txdesc)->dword4, value, 0xf, 13)
1069 #define GET_TX_DESC_RTS_RTY_LOWEST_RATE(txdesc)                                \
1070 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0xf,  \
1071 			      13)
1072 #define SET_TX_DESC_DATA_RTY_LOWEST_RATE(txdesc, value)                        \
1073 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4,   \
1074 				  value, 0x1f, 8)
1075 #define SET_TX_DESC_DATA_RTY_LOWEST_RATE_NO_CLR(txdesc, value)                 \
1076 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1077 		((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1f, 8)
1078 #define GET_TX_DESC_DATA_RTY_LOWEST_RATE(txdesc)                               \
1079 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1f, \
1080 			      8)
1081 #define SET_TX_DESC_TRY_RATE(txdesc, value)                                    \
1082 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4,   \
1083 				  value, 0x1, 7)
1084 #define SET_TX_DESC_TRY_RATE_NO_CLR(txdesc, value)                             \
1085 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1086 		((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1, 7)
1087 #define GET_TX_DESC_TRY_RATE(txdesc)                                           \
1088 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1, 7)
1089 #define SET_TX_DESC_DATARATE(txdesc, value)                                    \
1090 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4,   \
1091 				  value, 0x7f, 0)
1092 #define SET_TX_DESC_DATARATE_NO_CLR(txdesc, value)                             \
1093 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1094 		((struct halmac_tx_desc *)txdesc)->dword4, value, 0x7f, 0)
1095 #define GET_TX_DESC_DATARATE(txdesc)                                           \
1096 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x7f, \
1097 			      0)
1098 
1099 /*TXDESC_WORD5*/
1100 
1101 #define SET_TX_DESC_POLLUTED(txdesc, value)                                    \
1102 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1103 				  value, 0x1, 31)
1104 #define SET_TX_DESC_POLLUTED_NO_CLR(txdesc, value)                             \
1105 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1106 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 31)
1107 #define GET_TX_DESC_POLLUTED(txdesc)                                           \
1108 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1,  \
1109 			      31)
1110 
1111 #endif
1112 
1113 #if (HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
1114 
1115 #define SET_TX_DESC_ANTSEL_EN_V1(txdesc, value)                                \
1116 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1117 				  value, 0x1, 30)
1118 #define SET_TX_DESC_ANTSEL_EN_V1_NO_CLR(txdesc, value)                         \
1119 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1120 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 30)
1121 #define GET_TX_DESC_ANTSEL_EN_V1(txdesc)                                       \
1122 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1,  \
1123 			      30)
1124 
1125 #endif
1126 
1127 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1128      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
1129 
1130 #define SET_TX_DESC_TXPWR_OFSET(txdesc, value)                                 \
1131 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1132 				  value, 0x7, 28)
1133 #define SET_TX_DESC_TXPWR_OFSET_NO_CLR(txdesc, value)                          \
1134 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1135 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x7, 28)
1136 #define GET_TX_DESC_TXPWR_OFSET(txdesc)                                        \
1137 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x7,  \
1138 			      28)
1139 
1140 #endif
1141 
1142 #if (HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
1143 
1144 #define SET_TX_DESC_TXPWR_OFSET_TYPE(txdesc, value)                            \
1145 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1146 				  value, 0x3, 28)
1147 #define SET_TX_DESC_TXPWR_OFSET_TYPE_NO_CLR(txdesc, value)                     \
1148 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1149 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 28)
1150 #define GET_TX_DESC_TXPWR_OFSET_TYPE(txdesc)                                   \
1151 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3,  \
1152 			      28)
1153 
1154 #endif
1155 
1156 #if (HALMAC_8192F_SUPPORT)
1157 
1158 #define SET_TX_DESC_TXPWR_OFSET_TYPE_V1(txdesc, value)                         \
1159 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1160 				  value, 0x7, 28)
1161 #define SET_TX_DESC_TXPWR_OFSET_TYPE_V1_NO_CLR(txdesc, value)                  \
1162 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1163 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x7, 28)
1164 #define GET_TX_DESC_TXPWR_OFSET_TYPE_V1(txdesc)                                \
1165 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x7,  \
1166 			      28)
1167 
1168 #endif
1169 
1170 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1171      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8192F_SUPPORT ||   \
1172      HALMAC_8812F_SUPPORT)
1173 
1174 #define SET_TX_DESC_TX_ANT(txdesc, value)                                      \
1175 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1176 				  value, 0xf, 24)
1177 #define SET_TX_DESC_TX_ANT_NO_CLR(txdesc, value)                               \
1178 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1179 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0xf, 24)
1180 #define GET_TX_DESC_TX_ANT(txdesc)                                             \
1181 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0xf,  \
1182 			      24)
1183 
1184 #endif
1185 
1186 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
1187 
1188 #define SET_TX_DESC_DROP_ID(txdesc, value)                                     \
1189 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1190 				  value, 0x3, 24)
1191 #define SET_TX_DESC_DROP_ID_NO_CLR(txdesc, value)                              \
1192 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1193 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 24)
1194 #define GET_TX_DESC_DROP_ID(txdesc)                                            \
1195 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3,  \
1196 			      24)
1197 
1198 #endif
1199 
1200 #if (HALMAC_8192F_SUPPORT)
1201 
1202 #define SET_TX_DESC_DROP_ID_V1(txdesc, value)                                  \
1203 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1204 				  value, 0x3, 22)
1205 #define SET_TX_DESC_DROP_ID_V1_NO_CLR(txdesc, value)                           \
1206 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1207 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 22)
1208 #define GET_TX_DESC_DROP_ID_V1(txdesc)                                         \
1209 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3,  \
1210 			      22)
1211 
1212 #endif
1213 
1214 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1215      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1216      HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
1217 
1218 #define SET_TX_DESC_PORT_ID(txdesc, value)                                     \
1219 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1220 				  value, 0x7, 21)
1221 #define SET_TX_DESC_PORT_ID_NO_CLR(txdesc, value)                              \
1222 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1223 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x7, 21)
1224 #define GET_TX_DESC_PORT_ID(txdesc)                                            \
1225 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x7,  \
1226 			      21)
1227 
1228 #endif
1229 
1230 #if (HALMAC_8192F_SUPPORT)
1231 
1232 #define SET_TX_DESC_PORT_ID_V1(txdesc, value)                                  \
1233 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1234 				  value, 0x1, 21)
1235 #define SET_TX_DESC_PORT_ID_V1_NO_CLR(txdesc, value)                           \
1236 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1237 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 21)
1238 #define GET_TX_DESC_PORT_ID_V1(txdesc)                                         \
1239 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1,  \
1240 			      21)
1241 
1242 #endif
1243 
1244 #if (HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8821C_SUPPORT ||   \
1245      HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT ||   \
1246      HALMAC_8197G_SUPPORT)
1247 
1248 #define SET_TX_DESC_MULTIPLE_PORT(txdesc, value)                               \
1249 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1250 				  value, 0x7, 18)
1251 #define SET_TX_DESC_MULTIPLE_PORT_NO_CLR(txdesc, value)                        \
1252 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1253 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x7, 18)
1254 #define GET_TX_DESC_MULTIPLE_PORT(txdesc)                                      \
1255 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x7,  \
1256 			      18)
1257 
1258 #endif
1259 
1260 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1261      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1262      HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
1263 
1264 #define SET_TX_DESC_SIGNALING_TAPKT_EN(txdesc, value)                          \
1265 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1266 				  value, 0x1, 17)
1267 #define SET_TX_DESC_SIGNALING_TAPKT_EN_NO_CLR(txdesc, value)                   \
1268 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1269 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 17)
1270 #define GET_TX_DESC_SIGNALING_TAPKT_EN(txdesc)                                 \
1271 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1,  \
1272 			      17)
1273 
1274 #endif
1275 
1276 #if (HALMAC_8814A_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8198F_SUPPORT ||   \
1277      HALMAC_8192F_SUPPORT || HALMAC_8197G_SUPPORT)
1278 
1279 #define SET_TX_DESC_RTS_SC(txdesc, value)                                      \
1280 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1281 				  value, 0xf, 13)
1282 #define SET_TX_DESC_RTS_SC_NO_CLR(txdesc, value)                               \
1283 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1284 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0xf, 13)
1285 #define GET_TX_DESC_RTS_SC(txdesc)                                             \
1286 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0xf,  \
1287 			      13)
1288 
1289 #endif
1290 
1291 #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1292      HALMAC_8812F_SUPPORT)
1293 
1294 #define SET_TX_DESC_SIGNALING_TA_PKT_SC(txdesc, value)                         \
1295 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1296 				  value, 0xf, 13)
1297 #define SET_TX_DESC_SIGNALING_TA_PKT_SC_NO_CLR(txdesc, value)                  \
1298 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1299 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0xf, 13)
1300 #define GET_TX_DESC_SIGNALING_TA_PKT_SC(txdesc)                                \
1301 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0xf,  \
1302 			      13)
1303 
1304 #endif
1305 
1306 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1307      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1308      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
1309 
1310 #define SET_TX_DESC_RTS_SHORT(txdesc, value)                                   \
1311 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1312 				  value, 0x1, 12)
1313 #define SET_TX_DESC_RTS_SHORT_NO_CLR(txdesc, value)                            \
1314 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1315 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 12)
1316 #define GET_TX_DESC_RTS_SHORT(txdesc)                                          \
1317 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1,  \
1318 			      12)
1319 #define SET_TX_DESC_VCS_STBC(txdesc, value)                                    \
1320 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1321 				  value, 0x3, 10)
1322 #define SET_TX_DESC_VCS_STBC_NO_CLR(txdesc, value)                             \
1323 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1324 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 10)
1325 #define GET_TX_DESC_VCS_STBC(txdesc)                                           \
1326 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3,  \
1327 			      10)
1328 #define SET_TX_DESC_DATA_STBC(txdesc, value)                                   \
1329 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1330 				  value, 0x3, 8)
1331 #define SET_TX_DESC_DATA_STBC_NO_CLR(txdesc, value)                            \
1332 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1333 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 8)
1334 #define GET_TX_DESC_DATA_STBC(txdesc)                                          \
1335 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3, 8)
1336 #define SET_TX_DESC_DATA_LDPC(txdesc, value)                                   \
1337 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1338 				  value, 0x1, 7)
1339 #define SET_TX_DESC_DATA_LDPC_NO_CLR(txdesc, value)                            \
1340 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1341 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 7)
1342 #define GET_TX_DESC_DATA_LDPC(txdesc)                                          \
1343 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, 7)
1344 #define SET_TX_DESC_DATA_BW(txdesc, value)                                     \
1345 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1346 				  value, 0x3, 5)
1347 #define SET_TX_DESC_DATA_BW_NO_CLR(txdesc, value)                              \
1348 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1349 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 5)
1350 #define GET_TX_DESC_DATA_BW(txdesc)                                            \
1351 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3, 5)
1352 #define SET_TX_DESC_DATA_SHORT(txdesc, value)                                  \
1353 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1354 				  value, 0x1, 4)
1355 #define SET_TX_DESC_DATA_SHORT_NO_CLR(txdesc, value)                           \
1356 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1357 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 4)
1358 #define GET_TX_DESC_DATA_SHORT(txdesc)                                         \
1359 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, 4)
1360 #define SET_TX_DESC_DATA_SC(txdesc, value)                                     \
1361 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5,   \
1362 				  value, 0xf, 0)
1363 #define SET_TX_DESC_DATA_SC_NO_CLR(txdesc, value)                              \
1364 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1365 		((struct halmac_tx_desc *)txdesc)->dword5, value, 0xf, 0)
1366 #define GET_TX_DESC_DATA_SC(txdesc)                                            \
1367 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0xf, 0)
1368 
1369 #endif
1370 
1371 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1372      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
1373 
1374 /*TXDESC_WORD6*/
1375 
1376 #define SET_TX_DESC_ANTSEL_D(txdesc, value)                                    \
1377 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1378 				  value, 0x3, 30)
1379 #define SET_TX_DESC_ANTSEL_D_NO_CLR(txdesc, value)                             \
1380 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1381 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 30)
1382 #define GET_TX_DESC_ANTSEL_D(txdesc)                                           \
1383 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1384 			      30)
1385 
1386 #endif
1387 
1388 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
1389 
1390 #define SET_TX_DESC_ANT_MAPD_V1(txdesc, value)                                 \
1391 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1392 				  value, 0x3, 30)
1393 #define SET_TX_DESC_ANT_MAPD_V1_NO_CLR(txdesc, value)                          \
1394 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1395 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 30)
1396 #define GET_TX_DESC_ANT_MAPD_V1(txdesc)                                        \
1397 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1398 			      30)
1399 
1400 #endif
1401 
1402 #if (HALMAC_8192F_SUPPORT)
1403 
1404 #define SET_TX_DESC_ANT_MAPC_V2(txdesc, value)                                 \
1405 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1406 				  value, 0x3, 30)
1407 #define SET_TX_DESC_ANT_MAPC_V2_NO_CLR(txdesc, value)                          \
1408 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1409 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 30)
1410 #define GET_TX_DESC_ANT_MAPC_V2(txdesc)                                        \
1411 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1412 			      30)
1413 
1414 #endif
1415 
1416 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1417      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
1418 
1419 #define SET_TX_DESC_ANT_MAPD(txdesc, value)                                    \
1420 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1421 				  value, 0x3, 28)
1422 #define SET_TX_DESC_ANT_MAPD_NO_CLR(txdesc, value)                             \
1423 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1424 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 28)
1425 #define GET_TX_DESC_ANT_MAPD(txdesc)                                           \
1426 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1427 			      28)
1428 
1429 #endif
1430 
1431 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
1432 
1433 #define SET_TX_DESC_ANT_MAPC_V1(txdesc, value)                                 \
1434 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1435 				  value, 0x3, 28)
1436 #define SET_TX_DESC_ANT_MAPC_V1_NO_CLR(txdesc, value)                          \
1437 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1438 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 28)
1439 #define GET_TX_DESC_ANT_MAPC_V1(txdesc)                                        \
1440 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1441 			      28)
1442 
1443 #endif
1444 
1445 #if (HALMAC_8192F_SUPPORT)
1446 
1447 #define SET_TX_DESC_ANT_MAPB_V2(txdesc, value)                                 \
1448 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1449 				  value, 0x3, 28)
1450 #define SET_TX_DESC_ANT_MAPB_V2_NO_CLR(txdesc, value)                          \
1451 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1452 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 28)
1453 #define GET_TX_DESC_ANT_MAPB_V2(txdesc)                                        \
1454 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1455 			      28)
1456 
1457 #endif
1458 
1459 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1460      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
1461 
1462 #define SET_TX_DESC_ANT_MAPC(txdesc, value)                                    \
1463 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1464 				  value, 0x3, 26)
1465 #define SET_TX_DESC_ANT_MAPC_NO_CLR(txdesc, value)                             \
1466 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1467 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 26)
1468 #define GET_TX_DESC_ANT_MAPC(txdesc)                                           \
1469 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1470 			      26)
1471 
1472 #endif
1473 
1474 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
1475 
1476 #define SET_TX_DESC_ANT_MAPB_V1(txdesc, value)                                 \
1477 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1478 				  value, 0x3, 26)
1479 #define SET_TX_DESC_ANT_MAPB_V1_NO_CLR(txdesc, value)                          \
1480 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1481 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 26)
1482 #define GET_TX_DESC_ANT_MAPB_V1(txdesc)                                        \
1483 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1484 			      26)
1485 
1486 #endif
1487 
1488 #if (HALMAC_8192F_SUPPORT)
1489 
1490 #define SET_TX_DESC_ANT_MAPA_V2(txdesc, value)                                 \
1491 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1492 				  value, 0x3, 26)
1493 #define SET_TX_DESC_ANT_MAPA_V2_NO_CLR(txdesc, value)                          \
1494 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1495 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 26)
1496 #define GET_TX_DESC_ANT_MAPA_V2(txdesc)                                        \
1497 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1498 			      26)
1499 
1500 #endif
1501 
1502 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1503      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
1504 
1505 #define SET_TX_DESC_ANT_MAPB(txdesc, value)                                    \
1506 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1507 				  value, 0x3, 24)
1508 #define SET_TX_DESC_ANT_MAPB_NO_CLR(txdesc, value)                             \
1509 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1510 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 24)
1511 #define GET_TX_DESC_ANT_MAPB(txdesc)                                           \
1512 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1513 			      24)
1514 
1515 #endif
1516 
1517 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
1518 
1519 #define SET_TX_DESC_ANT_MAPA_V1(txdesc, value)                                 \
1520 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1521 				  value, 0x3, 24)
1522 #define SET_TX_DESC_ANT_MAPA_V1_NO_CLR(txdesc, value)                          \
1523 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1524 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 24)
1525 #define GET_TX_DESC_ANT_MAPA_V1(txdesc)                                        \
1526 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1527 			      24)
1528 
1529 #endif
1530 
1531 #if (HALMAC_8192F_SUPPORT)
1532 
1533 #define SET_TX_DESC_ANTSEL_D_V1(txdesc, value)                                 \
1534 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1535 				  value, 0x3, 24)
1536 #define SET_TX_DESC_ANTSEL_D_V1_NO_CLR(txdesc, value)                          \
1537 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1538 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 24)
1539 #define GET_TX_DESC_ANTSEL_D_V1(txdesc)                                        \
1540 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1541 			      24)
1542 
1543 #endif
1544 
1545 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1546      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
1547 
1548 #define SET_TX_DESC_ANT_MAPA(txdesc, value)                                    \
1549 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1550 				  value, 0x3, 22)
1551 #define SET_TX_DESC_ANT_MAPA_NO_CLR(txdesc, value)                             \
1552 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1553 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 22)
1554 #define GET_TX_DESC_ANT_MAPA(txdesc)                                           \
1555 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1556 			      22)
1557 
1558 #endif
1559 
1560 #if (HALMAC_8192F_SUPPORT)
1561 
1562 #define SET_TX_DESC_ANTSEL_C_V2(txdesc, value)                                 \
1563 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1564 				  value, 0x3, 22)
1565 #define SET_TX_DESC_ANTSEL_C_V2_NO_CLR(txdesc, value)                          \
1566 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1567 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 22)
1568 #define GET_TX_DESC_ANTSEL_C_V2(txdesc)                                        \
1569 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1570 			      22)
1571 
1572 #endif
1573 
1574 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1575      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
1576 
1577 #define SET_TX_DESC_ANTSEL_C(txdesc, value)                                    \
1578 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1579 				  value, 0x3, 20)
1580 #define SET_TX_DESC_ANTSEL_C_NO_CLR(txdesc, value)                             \
1581 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1582 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 20)
1583 #define GET_TX_DESC_ANTSEL_C(txdesc)                                           \
1584 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1585 			      20)
1586 
1587 #endif
1588 
1589 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
1590 
1591 #define SET_TX_DESC_ANTSEL_B_V1(txdesc, value)                                 \
1592 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1593 				  value, 0xf, 20)
1594 #define SET_TX_DESC_ANTSEL_B_V1_NO_CLR(txdesc, value)                          \
1595 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1596 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0xf, 20)
1597 #define GET_TX_DESC_ANTSEL_B_V1(txdesc)                                        \
1598 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0xf,  \
1599 			      20)
1600 
1601 #endif
1602 
1603 #if (HALMAC_8192F_SUPPORT)
1604 
1605 #define SET_TX_DESC_ANTSEL_B_V2(txdesc, value)                                 \
1606 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1607 				  value, 0x7, 19)
1608 #define SET_TX_DESC_ANTSEL_B_V2_NO_CLR(txdesc, value)                          \
1609 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1610 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x7, 19)
1611 #define GET_TX_DESC_ANTSEL_B_V2(txdesc)                                        \
1612 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x7,  \
1613 			      19)
1614 
1615 #endif
1616 
1617 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1618      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
1619 
1620 #define SET_TX_DESC_ANTSEL_B(txdesc, value)                                    \
1621 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1622 				  value, 0x3, 18)
1623 #define SET_TX_DESC_ANTSEL_B_NO_CLR(txdesc, value)                             \
1624 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1625 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 18)
1626 #define GET_TX_DESC_ANTSEL_B(txdesc)                                           \
1627 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1628 			      18)
1629 #define SET_TX_DESC_ANTSEL_A(txdesc, value)                                    \
1630 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1631 				  value, 0x3, 16)
1632 #define SET_TX_DESC_ANTSEL_A_NO_CLR(txdesc, value)                             \
1633 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1634 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 16)
1635 #define GET_TX_DESC_ANTSEL_A(txdesc)                                           \
1636 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3,  \
1637 			      16)
1638 
1639 #endif
1640 
1641 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
1642 
1643 #define SET_TX_DESC_ANTSEL_A_V1(txdesc, value)                                 \
1644 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1645 				  value, 0xf, 16)
1646 #define SET_TX_DESC_ANTSEL_A_V1_NO_CLR(txdesc, value)                          \
1647 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1648 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0xf, 16)
1649 #define GET_TX_DESC_ANTSEL_A_V1(txdesc)                                        \
1650 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0xf,  \
1651 			      16)
1652 
1653 #endif
1654 
1655 #if (HALMAC_8192F_SUPPORT)
1656 
1657 #define SET_TX_DESC_ANTSEL_A_V2(txdesc, value)                                 \
1658 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1659 				  value, 0x7, 16)
1660 #define SET_TX_DESC_ANTSEL_A_V2_NO_CLR(txdesc, value)                          \
1661 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1662 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0x7, 16)
1663 #define GET_TX_DESC_ANTSEL_A_V2(txdesc)                                        \
1664 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x7,  \
1665 			      16)
1666 
1667 #endif
1668 
1669 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1670      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1671      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
1672 
1673 #define SET_TX_DESC_MBSSID(txdesc, value)                                      \
1674 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1675 				  value, 0xf, 12)
1676 #define SET_TX_DESC_MBSSID_NO_CLR(txdesc, value)                               \
1677 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1678 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0xf, 12)
1679 #define GET_TX_DESC_MBSSID(txdesc)                                             \
1680 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0xf,  \
1681 			      12)
1682 
1683 #endif
1684 
1685 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1686      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
1687 
1688 #define SET_TX_DESC_SW_DEFINE(txdesc, value)                                   \
1689 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1690 				  value, 0xfff, 0)
1691 #define SET_TX_DESC_SW_DEFINE_NO_CLR(txdesc, value)                            \
1692 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1693 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0xfff, 0)
1694 #define GET_TX_DESC_SW_DEFINE(txdesc)                                          \
1695 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6,       \
1696 			      0xfff, 0)
1697 
1698 #endif
1699 
1700 #if (HALMAC_8198F_SUPPORT || HALMAC_8192F_SUPPORT || HALMAC_8197G_SUPPORT)
1701 
1702 #define SET_TX_DESC_SWPS_SEQ(txdesc, value)                                    \
1703 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6,   \
1704 				  value, 0xfff, 0)
1705 #define SET_TX_DESC_SWPS_SEQ_NO_CLR(txdesc, value)                             \
1706 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1707 		((struct halmac_tx_desc *)txdesc)->dword6, value, 0xfff, 0)
1708 #define GET_TX_DESC_SWPS_SEQ(txdesc)                                           \
1709 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6,       \
1710 			      0xfff, 0)
1711 
1712 #endif
1713 
1714 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1715      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1716      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
1717 
1718 /*TXDESC_WORD7*/
1719 
1720 #define SET_TX_DESC_DMA_TXAGG_NUM(txdesc, value)                               \
1721 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7,   \
1722 				  value, 0xff, 24)
1723 #define SET_TX_DESC_DMA_TXAGG_NUM_NO_CLR(txdesc, value)                        \
1724 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1725 		((struct halmac_tx_desc *)txdesc)->dword7, value, 0xff, 24)
1726 #define GET_TX_DESC_DMA_TXAGG_NUM(txdesc)                                      \
1727 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0xff, \
1728 			      24)
1729 
1730 #endif
1731 
1732 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1733      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1734      HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
1735 
1736 #define SET_TX_DESC_FINAL_DATA_RATE(txdesc, value)                             \
1737 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7,   \
1738 				  value, 0xff, 24)
1739 #define SET_TX_DESC_FINAL_DATA_RATE_NO_CLR(txdesc, value)                      \
1740 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1741 		((struct halmac_tx_desc *)txdesc)->dword7, value, 0xff, 24)
1742 #define GET_TX_DESC_FINAL_DATA_RATE(txdesc)                                    \
1743 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0xff, \
1744 			      24)
1745 
1746 #endif
1747 
1748 #if (HALMAC_8192F_SUPPORT)
1749 
1750 #define SET_TX_DESC_ANT_MAPD_V2(txdesc, value)                                 \
1751 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7,   \
1752 				  value, 0x3, 22)
1753 #define SET_TX_DESC_ANT_MAPD_V2_NO_CLR(txdesc, value)                          \
1754 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1755 		((struct halmac_tx_desc *)txdesc)->dword7, value, 0x3, 22)
1756 #define GET_TX_DESC_ANT_MAPD_V2(txdesc)                                        \
1757 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0x3,  \
1758 			      22)
1759 #define SET_TX_DESC_ANTSEL_EN_V2(txdesc, value)                                \
1760 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7,   \
1761 				  value, 0x1, 21)
1762 #define SET_TX_DESC_ANTSEL_EN_V2_NO_CLR(txdesc, value)                         \
1763 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1764 		((struct halmac_tx_desc *)txdesc)->dword7, value, 0x1, 21)
1765 #define GET_TX_DESC_ANTSEL_EN_V2(txdesc)                                       \
1766 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0x1,  \
1767 			      21)
1768 
1769 #endif
1770 
1771 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1772      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1773      HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
1774 
1775 #define SET_TX_DESC_NTX_MAP(txdesc, value)                                     \
1776 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7,   \
1777 				  value, 0xf, 20)
1778 #define SET_TX_DESC_NTX_MAP_NO_CLR(txdesc, value)                              \
1779 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1780 		((struct halmac_tx_desc *)txdesc)->dword7, value, 0xf, 20)
1781 #define GET_TX_DESC_NTX_MAP(txdesc)                                            \
1782 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0xf,  \
1783 			      20)
1784 
1785 #endif
1786 
1787 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT)
1788 
1789 #define SET_TX_DESC_ANTSEL_EN(txdesc, value)                                   \
1790 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7,   \
1791 				  value, 0x1, 19)
1792 #define SET_TX_DESC_ANTSEL_EN_NO_CLR(txdesc, value)                            \
1793 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1794 		((struct halmac_tx_desc *)txdesc)->dword7, value, 0x1, 19)
1795 #define GET_TX_DESC_ANTSEL_EN(txdesc)                                          \
1796 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0x1,  \
1797 			      19)
1798 #define SET_TX_DESC_MBSSID_EX(txdesc, value)                                   \
1799 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7,   \
1800 				  value, 0x7, 16)
1801 #define SET_TX_DESC_MBSSID_EX_NO_CLR(txdesc, value)                            \
1802 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1803 		((struct halmac_tx_desc *)txdesc)->dword7, value, 0x7, 16)
1804 #define GET_TX_DESC_MBSSID_EX(txdesc)                                          \
1805 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0x7,  \
1806 			      16)
1807 
1808 #endif
1809 
1810 #if (HALMAC_8192F_SUPPORT)
1811 
1812 #define SET_TX_DESC_MBSSID_EX_V1(txdesc, value)                                \
1813 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7,   \
1814 				  value, 0x1, 16)
1815 #define SET_TX_DESC_MBSSID_EX_V1_NO_CLR(txdesc, value)                         \
1816 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1817 		((struct halmac_tx_desc *)txdesc)->dword7, value, 0x1, 16)
1818 #define GET_TX_DESC_MBSSID_EX_V1(txdesc)                                       \
1819 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0x1,  \
1820 			      16)
1821 
1822 #endif
1823 
1824 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1825      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1826      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
1827 
1828 #define SET_TX_DESC_TX_BUFF_SIZE(txdesc, value)                                \
1829 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7,   \
1830 				  value, 0xffff, 0)
1831 #define SET_TX_DESC_TX_BUFF_SIZE_NO_CLR(txdesc, value)                         \
1832 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1833 		((struct halmac_tx_desc *)txdesc)->dword7, value, 0xffff, 0)
1834 #define GET_TX_DESC_TX_BUFF_SIZE(txdesc)                                       \
1835 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7,       \
1836 			      0xffff, 0)
1837 #define SET_TX_DESC_TXDESC_CHECKSUM(txdesc, value)                             \
1838 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7,   \
1839 				  value, 0xffff, 0)
1840 #define SET_TX_DESC_TXDESC_CHECKSUM_NO_CLR(txdesc, value)                      \
1841 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1842 		((struct halmac_tx_desc *)txdesc)->dword7, value, 0xffff, 0)
1843 #define GET_TX_DESC_TXDESC_CHECKSUM(txdesc)                                    \
1844 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7,       \
1845 			      0xffff, 0)
1846 #define SET_TX_DESC_TIMESTAMP(txdesc, value)                                   \
1847 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7,   \
1848 				  value, 0xffff, 0)
1849 #define SET_TX_DESC_TIMESTAMP_NO_CLR(txdesc, value)                            \
1850 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1851 		((struct halmac_tx_desc *)txdesc)->dword7, value, 0xffff, 0)
1852 #define GET_TX_DESC_TIMESTAMP(txdesc)                                          \
1853 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7,       \
1854 			      0xffff, 0)
1855 
1856 #endif
1857 
1858 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1859      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1860      HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
1861 
1862 /*TXDESC_WORD8*/
1863 
1864 #define SET_TX_DESC_TXWIFI_CP(txdesc, value)                                   \
1865 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1866 				  value, 0x1, 31)
1867 #define SET_TX_DESC_TXWIFI_CP_NO_CLR(txdesc, value)                            \
1868 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1869 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 31)
1870 #define GET_TX_DESC_TXWIFI_CP(txdesc)                                          \
1871 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1,  \
1872 			      31)
1873 #define SET_TX_DESC_MAC_CP(txdesc, value)                                      \
1874 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1875 				  value, 0x1, 30)
1876 #define SET_TX_DESC_MAC_CP_NO_CLR(txdesc, value)                               \
1877 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1878 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 30)
1879 #define GET_TX_DESC_MAC_CP(txdesc)                                             \
1880 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1,  \
1881 			      30)
1882 #define SET_TX_DESC_STW_PKTRE_DIS(txdesc, value)                               \
1883 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1884 				  value, 0x1, 29)
1885 #define SET_TX_DESC_STW_PKTRE_DIS_NO_CLR(txdesc, value)                        \
1886 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1887 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 29)
1888 #define GET_TX_DESC_STW_PKTRE_DIS(txdesc)                                      \
1889 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1,  \
1890 			      29)
1891 #define SET_TX_DESC_STW_RB_DIS(txdesc, value)                                  \
1892 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1893 				  value, 0x1, 28)
1894 #define SET_TX_DESC_STW_RB_DIS_NO_CLR(txdesc, value)                           \
1895 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1896 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 28)
1897 #define GET_TX_DESC_STW_RB_DIS(txdesc)                                         \
1898 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1,  \
1899 			      28)
1900 #define SET_TX_DESC_STW_RATE_DIS(txdesc, value)                                \
1901 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1902 				  value, 0x1, 27)
1903 #define SET_TX_DESC_STW_RATE_DIS_NO_CLR(txdesc, value)                         \
1904 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1905 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 27)
1906 #define GET_TX_DESC_STW_RATE_DIS(txdesc)                                       \
1907 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1,  \
1908 			      27)
1909 #define SET_TX_DESC_STW_ANT_DIS(txdesc, value)                                 \
1910 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1911 				  value, 0x1, 26)
1912 #define SET_TX_DESC_STW_ANT_DIS_NO_CLR(txdesc, value)                          \
1913 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1914 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 26)
1915 #define GET_TX_DESC_STW_ANT_DIS(txdesc)                                        \
1916 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1,  \
1917 			      26)
1918 #define SET_TX_DESC_STW_EN(txdesc, value)                                      \
1919 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1920 				  value, 0x1, 25)
1921 #define SET_TX_DESC_STW_EN_NO_CLR(txdesc, value)                               \
1922 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1923 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 25)
1924 #define GET_TX_DESC_STW_EN(txdesc)                                             \
1925 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1,  \
1926 			      25)
1927 #define SET_TX_DESC_SMH_EN(txdesc, value)                                      \
1928 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1929 				  value, 0x1, 24)
1930 #define SET_TX_DESC_SMH_EN_NO_CLR(txdesc, value)                               \
1931 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1932 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 24)
1933 #define GET_TX_DESC_SMH_EN(txdesc)                                             \
1934 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1,  \
1935 			      24)
1936 
1937 #endif
1938 
1939 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1940      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1941      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
1942 
1943 #define SET_TX_DESC_TAILPAGE_L(txdesc, value)                                  \
1944 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1945 				  value, 0xff, 24)
1946 #define SET_TX_DESC_TAILPAGE_L_NO_CLR(txdesc, value)                           \
1947 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1948 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0xff, 24)
1949 #define GET_TX_DESC_TAILPAGE_L(txdesc)                                         \
1950 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xff, \
1951 			      24)
1952 #define SET_TX_DESC_SDIO_DMASEQ(txdesc, value)                                 \
1953 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1954 				  value, 0xff, 16)
1955 #define SET_TX_DESC_SDIO_DMASEQ_NO_CLR(txdesc, value)                          \
1956 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1957 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0xff, 16)
1958 #define GET_TX_DESC_SDIO_DMASEQ(txdesc)                                        \
1959 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xff, \
1960 			      16)
1961 #define SET_TX_DESC_NEXTHEADPAGE_L(txdesc, value)                              \
1962 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1963 				  value, 0xff, 16)
1964 #define SET_TX_DESC_NEXTHEADPAGE_L_NO_CLR(txdesc, value)                       \
1965 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1966 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0xff, 16)
1967 #define GET_TX_DESC_NEXTHEADPAGE_L(txdesc)                                     \
1968 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xff, \
1969 			      16)
1970 
1971 #endif
1972 
1973 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1974      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
1975      HALMAC_8192F_SUPPORT)
1976 
1977 #define SET_TX_DESC_EN_HWSEQ(txdesc, value)                                    \
1978 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1979 				  value, 0x1, 15)
1980 #define SET_TX_DESC_EN_HWSEQ_NO_CLR(txdesc, value)                             \
1981 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1982 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 15)
1983 #define GET_TX_DESC_EN_HWSEQ(txdesc)                                           \
1984 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1,  \
1985 			      15)
1986 
1987 #endif
1988 
1989 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
1990      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT)
1991 
1992 #define SET_TX_DESC_EN_HWEXSEQ(txdesc, value)                                  \
1993 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
1994 				  value, 0x1, 14)
1995 #define SET_TX_DESC_EN_HWEXSEQ_NO_CLR(txdesc, value)                           \
1996 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
1997 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 14)
1998 #define GET_TX_DESC_EN_HWEXSEQ(txdesc)                                         \
1999 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1,  \
2000 			      14)
2001 
2002 #endif
2003 
2004 #if (HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
2005 
2006 #define SET_TX_DESC_EN_HWSEQ_MODE(txdesc, value)                               \
2007 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
2008 				  value, 0x3, 14)
2009 #define SET_TX_DESC_EN_HWSEQ_MODE_NO_CLR(txdesc, value)                        \
2010 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2011 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3, 14)
2012 #define GET_TX_DESC_EN_HWSEQ_MODE(txdesc)                                      \
2013 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3,  \
2014 			      14)
2015 
2016 #endif
2017 
2018 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
2019      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
2020      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
2021 
2022 #define SET_TX_DESC_DATA_RC(txdesc, value)                                     \
2023 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
2024 				  value, 0x3f, 8)
2025 #define SET_TX_DESC_DATA_RC_NO_CLR(txdesc, value)                              \
2026 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2027 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3f, 8)
2028 #define GET_TX_DESC_DATA_RC(txdesc)                                            \
2029 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3f, \
2030 			      8)
2031 #define SET_TX_DESC_BAR_RTY_TH(txdesc, value)                                  \
2032 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
2033 				  value, 0x3, 6)
2034 #define SET_TX_DESC_BAR_RTY_TH_NO_CLR(txdesc, value)                           \
2035 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2036 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3, 6)
2037 #define GET_TX_DESC_BAR_RTY_TH(txdesc)                                         \
2038 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3, 6)
2039 #define SET_TX_DESC_RTS_RC(txdesc, value)                                      \
2040 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8,   \
2041 				  value, 0x3f, 0)
2042 #define SET_TX_DESC_RTS_RC_NO_CLR(txdesc, value)                               \
2043 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2044 		((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3f, 0)
2045 #define GET_TX_DESC_RTS_RC(txdesc)                                             \
2046 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3f, \
2047 			      0)
2048 
2049 #endif
2050 
2051 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
2052      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
2053      HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
2054 
2055 /*TXDESC_WORD9*/
2056 
2057 #define SET_TX_DESC_TAILPAGE_H(txdesc, value)                                  \
2058 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9,   \
2059 				  value, 0xf, 28)
2060 #define SET_TX_DESC_TAILPAGE_H_NO_CLR(txdesc, value)                           \
2061 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2062 		((struct halmac_tx_desc *)txdesc)->dword9, value, 0xf, 28)
2063 #define GET_TX_DESC_TAILPAGE_H(txdesc)                                         \
2064 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0xf,  \
2065 			      28)
2066 #define SET_TX_DESC_NEXTHEADPAGE_H(txdesc, value)                              \
2067 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9,   \
2068 				  value, 0xf, 24)
2069 #define SET_TX_DESC_NEXTHEADPAGE_H_NO_CLR(txdesc, value)                       \
2070 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2071 		((struct halmac_tx_desc *)txdesc)->dword9, value, 0xf, 24)
2072 #define GET_TX_DESC_NEXTHEADPAGE_H(txdesc)                                     \
2073 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0xf,  \
2074 			      24)
2075 
2076 #endif
2077 
2078 #if (HALMAC_8192F_SUPPORT)
2079 
2080 #define SET_TX_DESC_FINAL_DATA_RATE_V1(txdesc, value)                          \
2081 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9,   \
2082 				  value, 0xff, 24)
2083 #define SET_TX_DESC_FINAL_DATA_RATE_V1_NO_CLR(txdesc, value)                   \
2084 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2085 		((struct halmac_tx_desc *)txdesc)->dword9, value, 0xff, 24)
2086 #define GET_TX_DESC_FINAL_DATA_RATE_V1(txdesc)                                 \
2087 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0xff, \
2088 			      24)
2089 
2090 #endif
2091 
2092 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
2093      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
2094      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
2095 
2096 #define SET_TX_DESC_SW_SEQ(txdesc, value)                                      \
2097 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9,   \
2098 				  value, 0xfff, 12)
2099 #define SET_TX_DESC_SW_SEQ_NO_CLR(txdesc, value)                               \
2100 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2101 		((struct halmac_tx_desc *)txdesc)->dword9, value, 0xfff, 12)
2102 #define GET_TX_DESC_SW_SEQ(txdesc)                                             \
2103 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9,       \
2104 			      0xfff, 12)
2105 
2106 #endif
2107 
2108 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
2109      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
2110      HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
2111 
2112 #define SET_TX_DESC_TXBF_PATH(txdesc, value)                                   \
2113 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9,   \
2114 				  value, 0x1, 11)
2115 #define SET_TX_DESC_TXBF_PATH_NO_CLR(txdesc, value)                            \
2116 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2117 		((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 11)
2118 #define GET_TX_DESC_TXBF_PATH(txdesc)                                          \
2119 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1,  \
2120 			      11)
2121 
2122 #endif
2123 
2124 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
2125      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
2126      HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
2127 
2128 #define SET_TX_DESC_PADDING_LEN(txdesc, value)                                 \
2129 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9,   \
2130 				  value, 0x7ff, 0)
2131 #define SET_TX_DESC_PADDING_LEN_NO_CLR(txdesc, value)                          \
2132 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2133 		((struct halmac_tx_desc *)txdesc)->dword9, value, 0x7ff, 0)
2134 #define GET_TX_DESC_PADDING_LEN(txdesc)                                        \
2135 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9,       \
2136 			      0x7ff, 0)
2137 #define SET_TX_DESC_GROUP_BIT_IE_OFFSET(txdesc, value)                         \
2138 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9,   \
2139 				  value, 0xff, 0)
2140 #define SET_TX_DESC_GROUP_BIT_IE_OFFSET_NO_CLR(txdesc, value)                  \
2141 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2142 		((struct halmac_tx_desc *)txdesc)->dword9, value, 0xff, 0)
2143 #define GET_TX_DESC_GROUP_BIT_IE_OFFSET(txdesc)                                \
2144 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0xff, \
2145 			      0)
2146 
2147 #endif
2148 
2149 #if (HALMAC_8812F_SUPPORT)
2150 
2151 /*WORD10*/
2152 
2153 #define SET_TX_DESC_HT_DATA_SND(txdesc, value)                                 \
2154 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10,  \
2155 				  value, 0x1, 31)
2156 #define SET_TX_DESC_HT_DATA_SND_NO_CLR(txdesc, value)                          \
2157 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2158 		((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 31)
2159 #define GET_TX_DESC_HT_DATA_SND(txdesc)                                        \
2160 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
2161 			      31)
2162 
2163 #endif
2164 
2165 #if (HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
2166 
2167 #define SET_TX_DESC_SHCUT_CAM(txdesc, value)                                   \
2168 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10,  \
2169 				  value, 0x3f, 16)
2170 #define SET_TX_DESC_SHCUT_CAM_NO_CLR(txdesc, value)                            \
2171 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2172 		((struct halmac_tx_desc *)txdesc)->dword10, value, 0x3f, 16)
2173 #define GET_TX_DESC_SHCUT_CAM(txdesc)                                          \
2174 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10,      \
2175 			      0x3f, 16)
2176 
2177 #endif
2178 
2179 #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT ||   \
2180      HALMAC_8812F_SUPPORT)
2181 
2182 #define SET_TX_DESC_MU_DATARATE(txdesc, value)                                 \
2183 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10,  \
2184 				  value, 0xff, 8)
2185 #define SET_TX_DESC_MU_DATARATE_NO_CLR(txdesc, value)                          \
2186 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2187 		((struct halmac_tx_desc *)txdesc)->dword10, value, 0xff, 8)
2188 #define GET_TX_DESC_MU_DATARATE(txdesc)                                        \
2189 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10,      \
2190 			      0xff, 8)
2191 #define SET_TX_DESC_MU_RC(txdesc, value)                                       \
2192 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10,  \
2193 				  value, 0xf, 4)
2194 #define SET_TX_DESC_MU_RC_NO_CLR(txdesc, value)                                \
2195 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2196 		((struct halmac_tx_desc *)txdesc)->dword10, value, 0xf, 4)
2197 #define GET_TX_DESC_MU_RC(txdesc)                                              \
2198 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0xf, \
2199 			      4)
2200 
2201 #endif
2202 
2203 #if (HALMAC_8812F_SUPPORT)
2204 
2205 #define SET_TX_DESC_NDPA_RATE_SEL(txdesc, value)                               \
2206 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10,  \
2207 				  value, 0x1, 3)
2208 #define SET_TX_DESC_NDPA_RATE_SEL_NO_CLR(txdesc, value)                        \
2209 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2210 		((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 3)
2211 #define GET_TX_DESC_NDPA_RATE_SEL(txdesc)                                      \
2212 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
2213 			      3)
2214 #define SET_TX_DESC_HW_NDPA_EN(txdesc, value)                                  \
2215 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10,  \
2216 				  value, 0x1, 2)
2217 #define SET_TX_DESC_HW_NDPA_EN_NO_CLR(txdesc, value)                           \
2218 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2219 		((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 2)
2220 #define GET_TX_DESC_HW_NDPA_EN(txdesc)                                         \
2221 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
2222 			      2)
2223 
2224 #endif
2225 
2226 #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT ||   \
2227      HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT)
2228 
2229 #define SET_TX_DESC_SND_PKT_SEL(txdesc, value)                                 \
2230 	HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10,  \
2231 				  value, 0x3, 0)
2232 #define SET_TX_DESC_SND_PKT_SEL_NO_CLR(txdesc, value)                          \
2233 	HALMAC_SET_DESC_FIELD_NO_CLR(                                          \
2234 		((struct halmac_tx_desc *)txdesc)->dword10, value, 0x3, 0)
2235 #define GET_TX_DESC_SND_PKT_SEL(txdesc)                                        \
2236 	HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x3, \
2237 			      0)
2238 
2239 #endif
2240 
2241 #endif
2242