halmac_rx_desc_ap.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  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. #ifndef _HALMAC_RX_DESC_AP_H_
  16. #define _HALMAC_RX_DESC_AP_H_
  17. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  18. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  19. HALMAC_8812F_SUPPORT)
  20. /*RXDESC_WORD0*/
  21. #define GET_RX_DESC_EOR(rxdesc) \
  22. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1, \
  23. 30)
  24. #define GET_RX_DESC_PHYPKTIDC(rxdesc) \
  25. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1, \
  26. 28)
  27. #endif
  28. #if (HALMAC_8814B_SUPPORT)
  29. #define GET_RX_DESC_EVT_PKT(rxdesc) \
  30. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1, \
  31. 28)
  32. #endif
  33. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  34. HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \
  35. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  36. #define GET_RX_DESC_SWDEC(rxdesc) \
  37. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1, \
  38. 27)
  39. #define GET_RX_DESC_PHYST(rxdesc) \
  40. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1, \
  41. 26)
  42. #define GET_RX_DESC_SHIFT(rxdesc) \
  43. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x3, \
  44. 24)
  45. #define GET_RX_DESC_QOS(rxdesc) \
  46. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1, \
  47. 23)
  48. #define GET_RX_DESC_SECURITY(rxdesc) \
  49. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x7, \
  50. 20)
  51. #define GET_RX_DESC_DRV_INFO_SIZE(rxdesc) \
  52. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0xf, \
  53. 16)
  54. #define GET_RX_DESC_ICV_ERR(rxdesc) \
  55. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1, \
  56. 15)
  57. #define GET_RX_DESC_CRC32(rxdesc) \
  58. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, 0x1, \
  59. 14)
  60. #define GET_RX_DESC_PKT_LEN(rxdesc) \
  61. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword0, \
  62. 0x3fff, 0)
  63. /*RXDESC_WORD1*/
  64. #define GET_RX_DESC_BC(rxdesc) \
  65. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  66. 31)
  67. #define GET_RX_DESC_MC(rxdesc) \
  68. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  69. 30)
  70. #endif
  71. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  72. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  73. HALMAC_8812F_SUPPORT)
  74. #define GET_RX_DESC_TY_PE(rxdesc) \
  75. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x3, \
  76. 28)
  77. #endif
  78. #if (HALMAC_8814B_SUPPORT)
  79. #define GET_RX_DESC_TYPE(rxdesc) \
  80. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x3, \
  81. 28)
  82. #endif
  83. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  84. HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \
  85. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  86. #define GET_RX_DESC_MF(rxdesc) \
  87. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  88. 27)
  89. #define GET_RX_DESC_MD(rxdesc) \
  90. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  91. 26)
  92. #define GET_RX_DESC_PWR(rxdesc) \
  93. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  94. 25)
  95. #endif
  96. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  97. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  98. HALMAC_8812F_SUPPORT)
  99. #define GET_RX_DESC_PAM(rxdesc) \
  100. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  101. 24)
  102. #endif
  103. #if (HALMAC_8814B_SUPPORT)
  104. #define GET_RX_DESC_A1_MATCH(rxdesc) \
  105. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  106. 24)
  107. #endif
  108. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  109. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  110. HALMAC_8812F_SUPPORT)
  111. #define GET_RX_DESC_CHK_VLD(rxdesc) \
  112. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  113. 23)
  114. #endif
  115. #if (HALMAC_8814B_SUPPORT)
  116. #define GET_RX_DESC_TCP_CHKSUM_VLD(rxdesc) \
  117. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  118. 23)
  119. #endif
  120. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  121. HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \
  122. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  123. #define GET_RX_DESC_RX_IS_TCP_UDP(rxdesc) \
  124. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  125. 22)
  126. #define GET_RX_DESC_RX_IPV(rxdesc) \
  127. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  128. 21)
  129. #endif
  130. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  131. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  132. HALMAC_8812F_SUPPORT)
  133. #define GET_RX_DESC_CHKERR(rxdesc) \
  134. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  135. 20)
  136. #endif
  137. #if (HALMAC_8814B_SUPPORT)
  138. #define GET_RX_DESC_TCP_CHKSUM_ERR(rxdesc) \
  139. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  140. 20)
  141. #define GET_RX_DESC_PHY_PKT_IDC(rxdesc) \
  142. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  143. 17)
  144. #define GET_RX_DESC_FW_FIFO_FULL(rxdesc) \
  145. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  146. 16)
  147. #endif
  148. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  149. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  150. HALMAC_8812F_SUPPORT)
  151. #define GET_RX_DESC_PAGGR(rxdesc) \
  152. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  153. 15)
  154. #endif
  155. #if (HALMAC_8814B_SUPPORT)
  156. #define GET_RX_DESC_AMPDU(rxdesc) \
  157. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  158. 15)
  159. #endif
  160. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  161. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  162. HALMAC_8812F_SUPPORT)
  163. #define GET_RX_DESC_RXID_MATCH(rxdesc) \
  164. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  165. 14)
  166. #endif
  167. #if (HALMAC_8814B_SUPPORT)
  168. #define GET_RX_DESC_RXCMD_IDC(rxdesc) \
  169. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  170. 14)
  171. #endif
  172. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  173. HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \
  174. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  175. #define GET_RX_DESC_AMSDU(rxdesc) \
  176. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  177. 13)
  178. #endif
  179. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  180. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  181. HALMAC_8812F_SUPPORT)
  182. #define GET_RX_DESC_MACID_VLD(rxdesc) \
  183. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x1, \
  184. 12)
  185. #endif
  186. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  187. HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \
  188. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  189. #define GET_RX_DESC_TID(rxdesc) \
  190. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0xf, 8)
  191. #endif
  192. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  193. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  194. HALMAC_8812F_SUPPORT)
  195. #define GET_RX_DESC_MACID(rxdesc) \
  196. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword1, 0x7f, \
  197. 0)
  198. /*RXDESC_WORD2*/
  199. #define GET_RX_DESC_FCS_OK(rxdesc) \
  200. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1, \
  201. 31)
  202. #endif
  203. #if (HALMAC_8814B_SUPPORT)
  204. #define GET_RX_DESC_AMSDU_CUT(rxdesc) \
  205. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1, \
  206. 31)
  207. #endif
  208. #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || \
  209. HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  210. #define GET_RX_DESC_PPDU_CNT(rxdesc) \
  211. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x3, \
  212. 29)
  213. #endif
  214. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  215. HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \
  216. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  217. #define GET_RX_DESC_C2H(rxdesc) \
  218. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1, \
  219. 28)
  220. #endif
  221. #if (HALMAC_8198F_SUPPORT)
  222. #define GET_RX_DESC_HWRSVD_V1(rxdesc) \
  223. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x7, \
  224. 25)
  225. #endif
  226. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  227. HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  228. #define GET_RX_DESC_HWRSVD(rxdesc) \
  229. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0xf, \
  230. 24)
  231. #endif
  232. #if (HALMAC_8198F_SUPPORT)
  233. #define GET_RX_DESC_RXMAGPKT(rxdesc) \
  234. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1, \
  235. 24)
  236. #endif
  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_8812F_SUPPORT)
  240. #define GET_RX_DESC_WLANHD_IV_LEN(rxdesc) \
  241. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x3f, \
  242. 18)
  243. #endif
  244. #if (HALMAC_8814B_SUPPORT)
  245. #define GET_RX_DESC_LAST_MSDU(rxdesc) \
  246. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1, \
  247. 17)
  248. #endif
  249. #if (HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  250. #define GET_RX_DESC_RX_STATISTICS(rxdesc) \
  251. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1, \
  252. 17)
  253. #endif
  254. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  255. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  256. HALMAC_8812F_SUPPORT)
  257. #define GET_RX_DESC_RX_IS_QOS(rxdesc) \
  258. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1, \
  259. 16)
  260. #endif
  261. #if (HALMAC_8814B_SUPPORT)
  262. #define GET_RX_DESC_EXT_SEC_TYPE(rxdesc) \
  263. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0x1, \
  264. 16)
  265. #endif
  266. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  267. HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \
  268. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  269. #define GET_RX_DESC_FRAG(rxdesc) \
  270. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, 0xf, \
  271. 12)
  272. #define GET_RX_DESC_SEQ(rxdesc) \
  273. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword2, \
  274. 0xfff, 0)
  275. /*RXDESC_WORD3*/
  276. #define GET_RX_DESC_MAGIC_WAKE(rxdesc) \
  277. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, \
  278. 31)
  279. #define GET_RX_DESC_UNICAST_WAKE(rxdesc) \
  280. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, \
  281. 30)
  282. #endif
  283. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  284. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  285. HALMAC_8812F_SUPPORT)
  286. #define GET_RX_DESC_PATTERN_MATCH(rxdesc) \
  287. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, \
  288. 29)
  289. #endif
  290. #if (HALMAC_8814B_SUPPORT)
  291. #define GET_RX_DESC_PATTERN_WAKE(rxdesc) \
  292. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, \
  293. 29)
  294. #endif
  295. #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || \
  296. HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  297. #define GET_RX_DESC_RXPAYLOAD_MATCH(rxdesc) \
  298. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, \
  299. 28)
  300. #define GET_RX_DESC_RXPAYLOAD_ID(rxdesc) \
  301. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0xf, \
  302. 24)
  303. #endif
  304. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  305. HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \
  306. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  307. #define GET_RX_DESC_DMA_AGG_NUM(rxdesc) \
  308. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0xff, \
  309. 16)
  310. #endif
  311. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  312. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  313. HALMAC_8812F_SUPPORT)
  314. #define GET_RX_DESC_BSSID_FIT_1_0(rxdesc) \
  315. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x3, \
  316. 12)
  317. #define GET_RX_DESC_EOSP(rxdesc) \
  318. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, \
  319. 11)
  320. #endif
  321. #if (HALMAC_8814B_SUPPORT)
  322. #define GET_RX_DESC_BSSID_FIT(rxdesc) \
  323. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1f, \
  324. 11)
  325. #endif
  326. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  327. HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \
  328. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  329. #define GET_RX_DESC_HTC(rxdesc) \
  330. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, \
  331. 10)
  332. #endif
  333. #if (HALMAC_8814B_SUPPORT)
  334. #define GET_RX_DESC_AMPDU_END_PKT(rxdesc) \
  335. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, 9)
  336. #define GET_RX_DESC_ADDRESS_CAM_VLD(rxdesc) \
  337. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, 8)
  338. #endif
  339. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  340. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  341. HALMAC_8812F_SUPPORT)
  342. #define GET_RX_DESC_BSSID_FIT_4_2(rxdesc) \
  343. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x7, 7)
  344. #endif
  345. #if (HALMAC_8814B_SUPPORT)
  346. #define GET_RX_DESC_EOSP_V1(rxdesc) \
  347. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x1, 7)
  348. #endif
  349. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  350. HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \
  351. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  352. #define GET_RX_DESC_RX_RATE(rxdesc) \
  353. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword3, 0x7f, \
  354. 0)
  355. #endif
  356. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  357. HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  358. /*RXDESC_WORD4*/
  359. #define GET_RX_DESC_A1_FIT(rxdesc) \
  360. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1f, \
  361. 24)
  362. #endif
  363. #if (HALMAC_8814B_SUPPORT)
  364. #define GET_RX_DESC_ADDRESS_CAM(rxdesc) \
  365. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0xff, \
  366. 24)
  367. #endif
  368. #if (HALMAC_8198F_SUPPORT)
  369. #define GET_RX_DESC_A1_FIT_A1(rxdesc) \
  370. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x7f, \
  371. 24)
  372. #endif
  373. #if (HALMAC_8814B_SUPPORT)
  374. #define GET_RX_DESC_MACID_VLD_V1(rxdesc) \
  375. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1, \
  376. 23)
  377. #endif
  378. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  379. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  380. HALMAC_8812F_SUPPORT)
  381. #define GET_RX_DESC_MACID_RPT_BUFF(rxdesc) \
  382. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x7f, \
  383. 17)
  384. #define GET_RX_DESC_RX_PRE_NDP_VLD(rxdesc) \
  385. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1, \
  386. 16)
  387. #endif
  388. #if (HALMAC_8814B_SUPPORT)
  389. #define GET_RX_DESC_MACID_V1(rxdesc) \
  390. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0xff, \
  391. 15)
  392. #endif
  393. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  394. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  395. HALMAC_8812F_SUPPORT)
  396. #define GET_RX_DESC_RX_SCRAMBLER(rxdesc) \
  397. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x7f, \
  398. 9)
  399. #define GET_RX_DESC_RX_EOF(rxdesc) \
  400. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1, 8)
  401. #endif
  402. #if (HALMAC_8197F_SUPPORT || HALMAC_8198F_SUPPORT)
  403. #define GET_RX_DESC_FC_POWER(rxdesc) \
  404. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1, 7)
  405. #endif
  406. #if (HALMAC_8198F_SUPPORT)
  407. #define GET_RX_DESC_TXRPTMID_CTL_MASK(rxdesc) \
  408. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1, 6)
  409. #endif
  410. #if (HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT)
  411. #define GET_RX_DESC_SWPS_RPT(rxdesc) \
  412. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1, 5)
  413. #endif
  414. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || \
  415. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  416. #define GET_RX_DESC_PATTERN_IDX(rxdesc) \
  417. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0xff, \
  418. 0)
  419. #endif
  420. #if (HALMAC_8197F_SUPPORT || HALMAC_8198F_SUPPORT)
  421. #define GET_RX_DESC_PATTERN_IDX_V1(rxdesc) \
  422. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1f, \
  423. 0)
  424. #endif
  425. #if (HALMAC_8814B_SUPPORT)
  426. #define GET_RX_DESC_PATTERN_IDX_V2(rxdesc) \
  427. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword4, 0x1f, \
  428. 0)
  429. #endif
  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. /*RXDESC_WORD5*/
  434. #define GET_RX_DESC_TSFL(rxdesc) \
  435. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword5, \
  436. 0xffffffff, 0)
  437. #endif
  438. #if (HALMAC_8814B_SUPPORT)
  439. #define GET_RX_DESC_FREERUN_CNT(rxdesc) \
  440. HALMAC_GET_DESC_FIELD(((struct halmac_rx_desc *)rxdesc)->dword5, \
  441. 0xffffffff, 0)
  442. #endif
  443. #endif