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