OSDN Git Service

Add rtl8821ce driver version 5.5.2
[android-x86/external-kernel-drivers.git] / rtl8821ce / hal / halmac / halmac_rx_desc_ap.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2016 - 2018 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_RX_DESC_AP_H_
17 #define _HALMAC_RX_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)
21
22 /*RXDESC_WORD0*/
23
24 #define GET_RX_DESC_EOR(rxdesc)                                                \
25         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1,  \
26                               30)
27 #define GET_RX_DESC_PHYPKTIDC(rxdesc)                                          \
28         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1,  \
29                               28)
30
31 #endif
32
33 #if (HALMAC_8814B_SUPPORT)
34
35 #define GET_RX_DESC_EVT_PKT(rxdesc)                                            \
36         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1,  \
37                               28)
38
39 #endif
40
41 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
42      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
43      HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
44
45 #define GET_RX_DESC_SWDEC(rxdesc)                                              \
46         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1,  \
47                               27)
48 #define GET_RX_DESC_PHYST(rxdesc)                                              \
49         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1,  \
50                               26)
51 #define GET_RX_DESC_SHIFT(rxdesc)                                              \
52         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x3,  \
53                               24)
54 #define GET_RX_DESC_QOS(rxdesc)                                                \
55         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1,  \
56                               23)
57 #define GET_RX_DESC_SECURITY(rxdesc)                                           \
58         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x7,  \
59                               20)
60 #define GET_RX_DESC_DRV_INFO_SIZE(rxdesc)                                      \
61         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0xf,  \
62                               16)
63 #define GET_RX_DESC_ICV_ERR(rxdesc)                                            \
64         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1,  \
65                               15)
66 #define GET_RX_DESC_CRC32(rxdesc)                                              \
67         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1,  \
68                               14)
69 #define GET_RX_DESC_PKT_LEN(rxdesc)                                            \
70         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0,       \
71                               0x3fff, 0)
72
73 /*RXDESC_WORD1*/
74
75 #define GET_RX_DESC_BC(rxdesc)                                                 \
76         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
77                               31)
78 #define GET_RX_DESC_MC(rxdesc)                                                 \
79         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
80                               30)
81
82 #endif
83
84 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
85      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
86      HALMAC_8812F_SUPPORT)
87
88 #define GET_RX_DESC_TY_PE(rxdesc)                                              \
89         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x3,  \
90                               28)
91
92 #endif
93
94 #if (HALMAC_8814B_SUPPORT)
95
96 #define GET_RX_DESC_TYPE(rxdesc)                                               \
97         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x3,  \
98                               28)
99
100 #endif
101
102 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
103      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
104      HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
105
106 #define GET_RX_DESC_MF(rxdesc)                                                 \
107         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
108                               27)
109 #define GET_RX_DESC_MD(rxdesc)                                                 \
110         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
111                               26)
112 #define GET_RX_DESC_PWR(rxdesc)                                                \
113         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
114                               25)
115
116 #endif
117
118 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
119      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
120      HALMAC_8812F_SUPPORT)
121
122 #define GET_RX_DESC_PAM(rxdesc)                                                \
123         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
124                               24)
125
126 #endif
127
128 #if (HALMAC_8814B_SUPPORT)
129
130 #define GET_RX_DESC_A1_MATCH(rxdesc)                                           \
131         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
132                               24)
133
134 #endif
135
136 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
137      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
138      HALMAC_8812F_SUPPORT)
139
140 #define GET_RX_DESC_CHK_VLD(rxdesc)                                            \
141         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
142                               23)
143
144 #endif
145
146 #if (HALMAC_8814B_SUPPORT)
147
148 #define GET_RX_DESC_TCP_CHKSUM_VLD(rxdesc)                                     \
149         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
150                               23)
151
152 #endif
153
154 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
155      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
156      HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
157
158 #define GET_RX_DESC_RX_IS_TCP_UDP(rxdesc)                                      \
159         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
160                               22)
161 #define GET_RX_DESC_RX_IPV(rxdesc)                                             \
162         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
163                               21)
164
165 #endif
166
167 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
168      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
169      HALMAC_8812F_SUPPORT)
170
171 #define GET_RX_DESC_CHKERR(rxdesc)                                             \
172         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
173                               20)
174
175 #endif
176
177 #if (HALMAC_8814B_SUPPORT)
178
179 #define GET_RX_DESC_TCP_CHKSUM_ERR(rxdesc)                                     \
180         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
181                               20)
182 #define GET_RX_DESC_PHY_PKT_IDC(rxdesc)                                        \
183         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
184                               17)
185 #define GET_RX_DESC_FW_FIFO_FULL(rxdesc)                                       \
186         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
187                               16)
188
189 #endif
190
191 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
192      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
193      HALMAC_8812F_SUPPORT)
194
195 #define GET_RX_DESC_PAGGR(rxdesc)                                              \
196         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
197                               15)
198
199 #endif
200
201 #if (HALMAC_8814B_SUPPORT)
202
203 #define GET_RX_DESC_AMPDU(rxdesc)                                              \
204         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
205                               15)
206
207 #endif
208
209 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
210      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
211      HALMAC_8812F_SUPPORT)
212
213 #define GET_RX_DESC_RXID_MATCH(rxdesc)                                         \
214         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
215                               14)
216
217 #endif
218
219 #if (HALMAC_8814B_SUPPORT)
220
221 #define GET_RX_DESC_RXCMD_IDC(rxdesc)                                          \
222         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
223                               14)
224
225 #endif
226
227 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
228      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
229      HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
230
231 #define GET_RX_DESC_AMSDU(rxdesc)                                              \
232         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
233                               13)
234
235 #endif
236
237 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
238      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
239      HALMAC_8812F_SUPPORT)
240
241 #define GET_RX_DESC_MACID_VLD(rxdesc)                                          \
242         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1,  \
243                               12)
244
245 #endif
246
247 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
248      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
249      HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
250
251 #define GET_RX_DESC_TID(rxdesc)                                                \
252         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0xf, 8)
253
254 #endif
255
256 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
257      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
258      HALMAC_8812F_SUPPORT)
259
260 #define GET_RX_DESC_MACID(rxdesc)                                              \
261         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x7f, \
262                               0)
263
264 /*RXDESC_WORD2*/
265
266 #define GET_RX_DESC_FCS_OK(rxdesc)                                             \
267         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1,  \
268                               31)
269
270 #endif
271
272 #if (HALMAC_8814B_SUPPORT)
273
274 #define GET_RX_DESC_AMSDU_CUT(rxdesc)                                          \
275         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1,  \
276                               31)
277
278 #endif
279
280 #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT ||   \
281      HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
282
283 #define GET_RX_DESC_PPDU_CNT(rxdesc)                                           \
284         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x3,  \
285                               29)
286
287 #endif
288
289 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
290      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
291      HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
292
293 #define GET_RX_DESC_C2H(rxdesc)                                                \
294         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1,  \
295                               28)
296
297 #endif
298
299 #if (HALMAC_8198F_SUPPORT)
300
301 #define GET_RX_DESC_HWRSVD_V1(rxdesc)                                          \
302         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x7,  \
303                               25)
304
305 #endif
306
307 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
308      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
309
310 #define GET_RX_DESC_HWRSVD(rxdesc)                                             \
311         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0xf,  \
312                               24)
313
314 #endif
315
316 #if (HALMAC_8198F_SUPPORT)
317
318 #define GET_RX_DESC_RXMAGPKT(rxdesc)                                           \
319         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1,  \
320                               24)
321
322 #endif
323
324 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
325      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
326      HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
327
328 #define GET_RX_DESC_WLANHD_IV_LEN(rxdesc)                                      \
329         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x3f, \
330                               18)
331
332 #endif
333
334 #if (HALMAC_8814B_SUPPORT)
335
336 #define GET_RX_DESC_LAST_MSDU(rxdesc)                                          \
337         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1,  \
338                               17)
339
340 #endif
341
342 #if (HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
343
344 #define GET_RX_DESC_RX_STATISTICS(rxdesc)                                      \
345         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1,  \
346                               17)
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_8812F_SUPPORT)
353
354 #define GET_RX_DESC_RX_IS_QOS(rxdesc)                                          \
355         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1,  \
356                               16)
357
358 #endif
359
360 #if (HALMAC_8814B_SUPPORT)
361
362 #define GET_RX_DESC_EXT_SEC_TYPE(rxdesc)                                       \
363         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1,  \
364                               16)
365
366 #endif
367
368 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
369      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
370      HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
371
372 #define GET_RX_DESC_FRAG(rxdesc)                                               \
373         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0xf,  \
374                               12)
375 #define GET_RX_DESC_SEQ(rxdesc)                                                \
376         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2,       \
377                               0xfff, 0)
378
379 /*RXDESC_WORD3*/
380
381 #define GET_RX_DESC_MAGIC_WAKE(rxdesc)                                         \
382         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1,  \
383                               31)
384 #define GET_RX_DESC_UNICAST_WAKE(rxdesc)                                       \
385         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1,  \
386                               30)
387
388 #endif
389
390 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
391      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
392      HALMAC_8812F_SUPPORT)
393
394 #define GET_RX_DESC_PATTERN_MATCH(rxdesc)                                      \
395         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1,  \
396                               29)
397
398 #endif
399
400 #if (HALMAC_8814B_SUPPORT)
401
402 #define GET_RX_DESC_PATTERN_WAKE(rxdesc)                                       \
403         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1,  \
404                               29)
405
406 #endif
407
408 #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT ||   \
409      HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
410
411 #define GET_RX_DESC_RXPAYLOAD_MATCH(rxdesc)                                    \
412         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1,  \
413                               28)
414 #define GET_RX_DESC_RXPAYLOAD_ID(rxdesc)                                       \
415         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0xf,  \
416                               24)
417
418 #endif
419
420 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
421      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
422      HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
423
424 #define GET_RX_DESC_DMA_AGG_NUM(rxdesc)                                        \
425         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0xff, \
426                               16)
427
428 #endif
429
430 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
431      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
432      HALMAC_8812F_SUPPORT)
433
434 #define GET_RX_DESC_BSSID_FIT_1_0(rxdesc)                                      \
435         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x3,  \
436                               12)
437 #define GET_RX_DESC_EOSP(rxdesc)                                               \
438         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1,  \
439                               11)
440
441 #endif
442
443 #if (HALMAC_8814B_SUPPORT)
444
445 #define GET_RX_DESC_BSSID_FIT(rxdesc)                                          \
446         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1f, \
447                               11)
448
449 #endif
450
451 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
452      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
453      HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
454
455 #define GET_RX_DESC_HTC(rxdesc)                                                \
456         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1,  \
457                               10)
458
459 #endif
460
461 #if (HALMAC_8814B_SUPPORT)
462
463 #define GET_RX_DESC_AMPDU_END_PKT(rxdesc)                                      \
464         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, 9)
465 #define GET_RX_DESC_ADDRESS_CAM_VLD(rxdesc)                                    \
466         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, 8)
467
468 #endif
469
470 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
471      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
472      HALMAC_8812F_SUPPORT)
473
474 #define GET_RX_DESC_BSSID_FIT_4_2(rxdesc)                                      \
475         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x7, 7)
476
477 #endif
478
479 #if (HALMAC_8814B_SUPPORT)
480
481 #define GET_RX_DESC_EOSP_V1(rxdesc)                                            \
482         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, 7)
483
484 #endif
485
486 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
487      HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT ||   \
488      HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
489
490 #define GET_RX_DESC_RX_RATE(rxdesc)                                            \
491         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x7f, \
492                               0)
493
494 #endif
495
496 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
497      HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
498
499 /*RXDESC_WORD4*/
500
501 #define GET_RX_DESC_A1_FIT(rxdesc)                                             \
502         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1f, \
503                               24)
504
505 #endif
506
507 #if (HALMAC_8814B_SUPPORT)
508
509 #define GET_RX_DESC_ADDRESS_CAM(rxdesc)                                        \
510         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0xff, \
511                               24)
512
513 #endif
514
515 #if (HALMAC_8198F_SUPPORT)
516
517 #define GET_RX_DESC_A1_FIT_A1(rxdesc)                                          \
518         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x7f, \
519                               24)
520
521 #endif
522
523 #if (HALMAC_8814B_SUPPORT)
524
525 #define GET_RX_DESC_MACID_VLD_V1(rxdesc)                                       \
526         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1,  \
527                               23)
528
529 #endif
530
531 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
532      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
533      HALMAC_8812F_SUPPORT)
534
535 #define GET_RX_DESC_MACID_RPT_BUFF(rxdesc)                                     \
536         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x7f, \
537                               17)
538 #define GET_RX_DESC_RX_PRE_NDP_VLD(rxdesc)                                     \
539         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1,  \
540                               16)
541
542 #endif
543
544 #if (HALMAC_8814B_SUPPORT)
545
546 #define GET_RX_DESC_MACID_V1(rxdesc)                                           \
547         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0xff, \
548                               15)
549
550 #endif
551
552 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
553      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
554      HALMAC_8812F_SUPPORT)
555
556 #define GET_RX_DESC_RX_SCRAMBLER(rxdesc)                                       \
557         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x7f, \
558                               9)
559 #define GET_RX_DESC_RX_EOF(rxdesc)                                             \
560         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1, 8)
561
562 #endif
563
564 #if (HALMAC_8197F_SUPPORT || HALMAC_8198F_SUPPORT)
565
566 #define GET_RX_DESC_FC_POWER(rxdesc)                                           \
567         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1, 7)
568
569 #endif
570
571 #if (HALMAC_8198F_SUPPORT)
572
573 #define GET_RX_DESC_TXRPTMID_CTL_MASK(rxdesc)                                  \
574         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1, 6)
575
576 #endif
577
578 #if (HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT)
579
580 #define GET_RX_DESC_SWPS_RPT(rxdesc)                                           \
581         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1, 5)
582
583 #endif
584
585 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT ||   \
586      HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
587
588 #define GET_RX_DESC_PATTERN_IDX(rxdesc)                                        \
589         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0xff, \
590                               0)
591
592 #endif
593
594 #if (HALMAC_8197F_SUPPORT || HALMAC_8198F_SUPPORT)
595
596 #define GET_RX_DESC_PATTERN_IDX_V1(rxdesc)                                     \
597         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1f, \
598                               0)
599
600 #endif
601
602 #if (HALMAC_8814B_SUPPORT)
603
604 #define GET_RX_DESC_PATTERN_IDX_V2(rxdesc)                                     \
605         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1f, \
606                               0)
607
608 #endif
609
610 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT ||   \
611      HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT ||   \
612      HALMAC_8812F_SUPPORT)
613
614 /*RXDESC_WORD5*/
615
616 #define GET_RX_DESC_TSFL(rxdesc)                                               \
617         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword5,       \
618                               0xffffffff, 0)
619
620 #endif
621
622 #if (HALMAC_8814B_SUPPORT)
623
624 #define GET_RX_DESC_FREERUN_CNT(rxdesc)                                        \
625         HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword5,       \
626                               0xffffffff, 0)
627
628 #endif
629
630 #endif