halmac_tx_desc_buffer_ap.h 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078
  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_TX_DESC_BUFFER_AP_H_
  16. #define _HALMAC_TX_DESC_BUFFER_AP_H_
  17. #if (HALMAC_8814B_SUPPORT)
  18. /*TXDESC_WORD0*/
  19. #define SET_TX_DESC_BUFFER_RDG_EN(txdesc, value) \
  20. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  21. value, 0x1, 31)
  22. #define SET_TX_DESC_BUFFER_RDG_EN_NO_CLR(txdesc, value) \
  23. HALMAC_SET_DESC_FIELD_NO_CLR( \
  24. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 31)
  25. #define GET_TX_DESC_BUFFER_RDG_EN(txdesc) \
  26. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  27. 31)
  28. #define SET_TX_DESC_BUFFER_BCNPKT_TSF_CTRL(txdesc, value) \
  29. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  30. value, 0x1, 30)
  31. #define SET_TX_DESC_BUFFER_BCNPKT_TSF_CTRL_NO_CLR(txdesc, value) \
  32. HALMAC_SET_DESC_FIELD_NO_CLR( \
  33. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 30)
  34. #define GET_TX_DESC_BUFFER_BCNPKT_TSF_CTRL(txdesc) \
  35. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  36. 30)
  37. #define SET_TX_DESC_BUFFER_AGG_EN(txdesc, value) \
  38. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  39. value, 0x1, 29)
  40. #define SET_TX_DESC_BUFFER_AGG_EN_NO_CLR(txdesc, value) \
  41. HALMAC_SET_DESC_FIELD_NO_CLR( \
  42. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 29)
  43. #define GET_TX_DESC_BUFFER_AGG_EN(txdesc) \
  44. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  45. 29)
  46. #define SET_TX_DESC_BUFFER_PKT_OFFSET(txdesc, value) \
  47. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  48. value, 0x1f, 24)
  49. #define SET_TX_DESC_BUFFER_PKT_OFFSET_NO_CLR(txdesc, value) \
  50. HALMAC_SET_DESC_FIELD_NO_CLR( \
  51. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1f, 24)
  52. #define GET_TX_DESC_BUFFER_PKT_OFFSET(txdesc) \
  53. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1f, \
  54. 24)
  55. #define SET_TX_DESC_BUFFER_OFFSET(txdesc, value) \
  56. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  57. value, 0xff, 16)
  58. #define SET_TX_DESC_BUFFER_OFFSET_NO_CLR(txdesc, value) \
  59. HALMAC_SET_DESC_FIELD_NO_CLR( \
  60. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0xff, 16)
  61. #define GET_TX_DESC_BUFFER_OFFSET(txdesc) \
  62. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0xff, \
  63. 16)
  64. #define SET_TX_DESC_BUFFER_TXPKTSIZE(txdesc, value) \
  65. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  66. value, 0xffff, 0)
  67. #define SET_TX_DESC_BUFFER_TXPKTSIZE_NO_CLR(txdesc, value) \
  68. HALMAC_SET_DESC_FIELD_NO_CLR( \
  69. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0xffff, 0)
  70. #define GET_TX_DESC_BUFFER_TXPKTSIZE(txdesc) \
  71. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, \
  72. 0xffff, 0)
  73. /*TXDESC_WORD1*/
  74. #define SET_TX_DESC_BUFFER_USERATE(txdesc, value) \
  75. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  76. value, 0x1, 31)
  77. #define SET_TX_DESC_BUFFER_USERATE_NO_CLR(txdesc, value) \
  78. HALMAC_SET_DESC_FIELD_NO_CLR( \
  79. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 31)
  80. #define GET_TX_DESC_BUFFER_USERATE(txdesc) \
  81. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  82. 31)
  83. #define SET_TX_DESC_BUFFER_AMSDU(txdesc, value) \
  84. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  85. value, 0x1, 30)
  86. #define SET_TX_DESC_BUFFER_AMSDU_NO_CLR(txdesc, value) \
  87. HALMAC_SET_DESC_FIELD_NO_CLR( \
  88. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 30)
  89. #define GET_TX_DESC_BUFFER_AMSDU(txdesc) \
  90. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  91. 30)
  92. #define SET_TX_DESC_BUFFER_EN_HWSEQ(txdesc, value) \
  93. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  94. value, 0x1, 29)
  95. #define SET_TX_DESC_BUFFER_EN_HWSEQ_NO_CLR(txdesc, value) \
  96. HALMAC_SET_DESC_FIELD_NO_CLR( \
  97. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 29)
  98. #define GET_TX_DESC_BUFFER_EN_HWSEQ(txdesc) \
  99. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  100. 29)
  101. #define SET_TX_DESC_BUFFER_EN_HWEXSEQ(txdesc, value) \
  102. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  103. value, 0x1, 28)
  104. #define SET_TX_DESC_BUFFER_EN_HWEXSEQ_NO_CLR(txdesc, value) \
  105. HALMAC_SET_DESC_FIELD_NO_CLR( \
  106. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 28)
  107. #define GET_TX_DESC_BUFFER_EN_HWEXSEQ(txdesc) \
  108. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  109. 28)
  110. #define SET_TX_DESC_BUFFER_SW_SEQ(txdesc, value) \
  111. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  112. value, 0xfff, 16)
  113. #define SET_TX_DESC_BUFFER_SW_SEQ_NO_CLR(txdesc, value) \
  114. HALMAC_SET_DESC_FIELD_NO_CLR( \
  115. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0xfff, 16)
  116. #define GET_TX_DESC_BUFFER_SW_SEQ(txdesc) \
  117. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, \
  118. 0xfff, 16)
  119. #define SET_TX_DESC_BUFFER_DROP_ID(txdesc, value) \
  120. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  121. value, 0x3, 14)
  122. #define SET_TX_DESC_BUFFER_DROP_ID_NO_CLR(txdesc, value) \
  123. HALMAC_SET_DESC_FIELD_NO_CLR( \
  124. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x3, 14)
  125. #define GET_TX_DESC_BUFFER_DROP_ID(txdesc) \
  126. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x3, \
  127. 14)
  128. #define SET_TX_DESC_BUFFER_MOREDATA(txdesc, value) \
  129. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  130. value, 0x1, 13)
  131. #define SET_TX_DESC_BUFFER_MOREDATA_NO_CLR(txdesc, value) \
  132. HALMAC_SET_DESC_FIELD_NO_CLR( \
  133. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 13)
  134. #define GET_TX_DESC_BUFFER_MOREDATA(txdesc) \
  135. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  136. 13)
  137. #define SET_TX_DESC_BUFFER_QSEL(txdesc, value) \
  138. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  139. value, 0x1f, 8)
  140. #define SET_TX_DESC_BUFFER_QSEL_NO_CLR(txdesc, value) \
  141. HALMAC_SET_DESC_FIELD_NO_CLR( \
  142. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1f, 8)
  143. #define GET_TX_DESC_BUFFER_QSEL(txdesc) \
  144. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1f, \
  145. 8)
  146. #define SET_TX_DESC_BUFFER_MACID(txdesc, value) \
  147. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  148. value, 0xff, 0)
  149. #define SET_TX_DESC_BUFFER_MACID_NO_CLR(txdesc, value) \
  150. HALMAC_SET_DESC_FIELD_NO_CLR( \
  151. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0xff, 0)
  152. #define GET_TX_DESC_BUFFER_MACID(txdesc) \
  153. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0xff, \
  154. 0)
  155. /*TXDESC_WORD2*/
  156. #define SET_TX_DESC_BUFFER_CHK_EN(txdesc, value) \
  157. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  158. value, 0x1, 31)
  159. #define SET_TX_DESC_BUFFER_CHK_EN_NO_CLR(txdesc, value) \
  160. HALMAC_SET_DESC_FIELD_NO_CLR( \
  161. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 31)
  162. #define GET_TX_DESC_BUFFER_CHK_EN(txdesc) \
  163. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  164. 31)
  165. #define SET_TX_DESC_BUFFER_DISQSELSEQ(txdesc, value) \
  166. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  167. value, 0x1, 30)
  168. #define SET_TX_DESC_BUFFER_DISQSELSEQ_NO_CLR(txdesc, value) \
  169. HALMAC_SET_DESC_FIELD_NO_CLR( \
  170. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 30)
  171. #define GET_TX_DESC_BUFFER_DISQSELSEQ(txdesc) \
  172. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  173. 30)
  174. #define SET_TX_DESC_BUFFER_SND_PKT_SEL(txdesc, value) \
  175. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  176. value, 0x3, 28)
  177. #define SET_TX_DESC_BUFFER_SND_PKT_SEL_NO_CLR(txdesc, value) \
  178. HALMAC_SET_DESC_FIELD_NO_CLR( \
  179. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x3, 28)
  180. #define GET_TX_DESC_BUFFER_SND_PKT_SEL(txdesc) \
  181. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x3, \
  182. 28)
  183. #define SET_TX_DESC_BUFFER_DMA_PRI(txdesc, value) \
  184. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  185. value, 0x1, 27)
  186. #define SET_TX_DESC_BUFFER_DMA_PRI_NO_CLR(txdesc, value) \
  187. HALMAC_SET_DESC_FIELD_NO_CLR( \
  188. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 27)
  189. #define GET_TX_DESC_BUFFER_DMA_PRI(txdesc) \
  190. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  191. 27)
  192. #define SET_TX_DESC_BUFFER_MAX_AMSDU_MODE(txdesc, value) \
  193. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  194. value, 0x7, 24)
  195. #define SET_TX_DESC_BUFFER_MAX_AMSDU_MODE_NO_CLR(txdesc, value) \
  196. HALMAC_SET_DESC_FIELD_NO_CLR( \
  197. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x7, 24)
  198. #define GET_TX_DESC_BUFFER_MAX_AMSDU_MODE(txdesc) \
  199. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x7, \
  200. 24)
  201. #define SET_TX_DESC_BUFFER_DMA_TXAGG_NUM(txdesc, value) \
  202. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  203. value, 0xff, 16)
  204. #define SET_TX_DESC_BUFFER_DMA_TXAGG_NUM_NO_CLR(txdesc, value) \
  205. HALMAC_SET_DESC_FIELD_NO_CLR( \
  206. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0xff, 16)
  207. #define GET_TX_DESC_BUFFER_DMA_TXAGG_NUM(txdesc) \
  208. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0xff, \
  209. 16)
  210. #define SET_TX_DESC_BUFFER_TXDESC_CHECKSUM(txdesc, value) \
  211. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  212. value, 0xffff, 0)
  213. #define SET_TX_DESC_BUFFER_TXDESC_CHECKSUM_NO_CLR(txdesc, value) \
  214. HALMAC_SET_DESC_FIELD_NO_CLR( \
  215. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0xffff, 0)
  216. #define GET_TX_DESC_BUFFER_TXDESC_CHECKSUM(txdesc) \
  217. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, \
  218. 0xffff, 0)
  219. /*TXDESC_WORD3*/
  220. #define SET_TX_DESC_BUFFER_OFFLOAD_SIZE(txdesc, value) \
  221. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  222. value, 0x7fff, 16)
  223. #define SET_TX_DESC_BUFFER_OFFLOAD_SIZE_NO_CLR(txdesc, value) \
  224. HALMAC_SET_DESC_FIELD_NO_CLR( \
  225. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x7fff, 16)
  226. #define GET_TX_DESC_BUFFER_OFFLOAD_SIZE(txdesc) \
  227. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, \
  228. 0x7fff, 16)
  229. #define SET_TX_DESC_BUFFER_CHANNEL_DMA(txdesc, value) \
  230. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  231. value, 0x1f, 11)
  232. #define SET_TX_DESC_BUFFER_CHANNEL_DMA_NO_CLR(txdesc, value) \
  233. HALMAC_SET_DESC_FIELD_NO_CLR( \
  234. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1f, 11)
  235. #define GET_TX_DESC_BUFFER_CHANNEL_DMA(txdesc) \
  236. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1f, \
  237. 11)
  238. #define SET_TX_DESC_BUFFER_MBSSID(txdesc, value) \
  239. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  240. value, 0xf, 7)
  241. #define SET_TX_DESC_BUFFER_MBSSID_NO_CLR(txdesc, value) \
  242. HALMAC_SET_DESC_FIELD_NO_CLR( \
  243. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0xf, 7)
  244. #define GET_TX_DESC_BUFFER_MBSSID(txdesc) \
  245. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0xf, 7)
  246. #define SET_TX_DESC_BUFFER_BK(txdesc, value) \
  247. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  248. value, 0x1, 6)
  249. #define SET_TX_DESC_BUFFER_BK_NO_CLR(txdesc, value) \
  250. HALMAC_SET_DESC_FIELD_NO_CLR( \
  251. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 6)
  252. #define GET_TX_DESC_BUFFER_BK(txdesc) \
  253. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, 6)
  254. #define SET_TX_DESC_BUFFER_WHEADER_LEN(txdesc, value) \
  255. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  256. value, 0x1f, 0)
  257. #define SET_TX_DESC_BUFFER_WHEADER_LEN_NO_CLR(txdesc, value) \
  258. HALMAC_SET_DESC_FIELD_NO_CLR( \
  259. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1f, 0)
  260. #define GET_TX_DESC_BUFFER_WHEADER_LEN(txdesc) \
  261. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1f, \
  262. 0)
  263. /*TXDESC_WORD4*/
  264. #define SET_TX_DESC_BUFFER_TRY_RATE(txdesc, value) \
  265. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  266. value, 0x1, 26)
  267. #define SET_TX_DESC_BUFFER_TRY_RATE_NO_CLR(txdesc, value) \
  268. HALMAC_SET_DESC_FIELD_NO_CLR( \
  269. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1, 26)
  270. #define GET_TX_DESC_BUFFER_TRY_RATE(txdesc) \
  271. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1, \
  272. 26)
  273. #define SET_TX_DESC_BUFFER_DATA_BW(txdesc, value) \
  274. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  275. value, 0x3, 24)
  276. #define SET_TX_DESC_BUFFER_DATA_BW_NO_CLR(txdesc, value) \
  277. HALMAC_SET_DESC_FIELD_NO_CLR( \
  278. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x3, 24)
  279. #define GET_TX_DESC_BUFFER_DATA_BW(txdesc) \
  280. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x3, \
  281. 24)
  282. #define SET_TX_DESC_BUFFER_DATA_SHORT(txdesc, value) \
  283. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  284. value, 0x1, 23)
  285. #define SET_TX_DESC_BUFFER_DATA_SHORT_NO_CLR(txdesc, value) \
  286. HALMAC_SET_DESC_FIELD_NO_CLR( \
  287. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1, 23)
  288. #define GET_TX_DESC_BUFFER_DATA_SHORT(txdesc) \
  289. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1, \
  290. 23)
  291. #define SET_TX_DESC_BUFFER_DATARATE(txdesc, value) \
  292. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  293. value, 0x7f, 16)
  294. #define SET_TX_DESC_BUFFER_DATARATE_NO_CLR(txdesc, value) \
  295. HALMAC_SET_DESC_FIELD_NO_CLR( \
  296. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x7f, 16)
  297. #define GET_TX_DESC_BUFFER_DATARATE(txdesc) \
  298. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x7f, \
  299. 16)
  300. #define SET_TX_DESC_BUFFER_TXBF_PATH(txdesc, value) \
  301. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  302. value, 0x1, 11)
  303. #define SET_TX_DESC_BUFFER_TXBF_PATH_NO_CLR(txdesc, value) \
  304. HALMAC_SET_DESC_FIELD_NO_CLR( \
  305. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1, 11)
  306. #define GET_TX_DESC_BUFFER_TXBF_PATH(txdesc) \
  307. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1, \
  308. 11)
  309. #define SET_TX_DESC_BUFFER_GROUP_BIT_IE_OFFSET(txdesc, value) \
  310. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  311. value, 0x7ff, 0)
  312. #define SET_TX_DESC_BUFFER_GROUP_BIT_IE_OFFSET_NO_CLR(txdesc, value) \
  313. HALMAC_SET_DESC_FIELD_NO_CLR( \
  314. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x7ff, 0)
  315. #define GET_TX_DESC_BUFFER_GROUP_BIT_IE_OFFSET(txdesc) \
  316. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, \
  317. 0x7ff, 0)
  318. /*TXDESC_WORD5*/
  319. #define SET_TX_DESC_BUFFER_RTY_LMT_EN(txdesc, value) \
  320. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  321. value, 0x1, 31)
  322. #define SET_TX_DESC_BUFFER_RTY_LMT_EN_NO_CLR(txdesc, value) \
  323. HALMAC_SET_DESC_FIELD_NO_CLR( \
  324. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 31)
  325. #define GET_TX_DESC_BUFFER_RTY_LMT_EN(txdesc) \
  326. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \
  327. 31)
  328. #define SET_TX_DESC_BUFFER_HW_RTS_EN(txdesc, value) \
  329. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  330. value, 0x1, 30)
  331. #define SET_TX_DESC_BUFFER_HW_RTS_EN_NO_CLR(txdesc, value) \
  332. HALMAC_SET_DESC_FIELD_NO_CLR( \
  333. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 30)
  334. #define GET_TX_DESC_BUFFER_HW_RTS_EN(txdesc) \
  335. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \
  336. 30)
  337. #define SET_TX_DESC_BUFFER_RTS_EN(txdesc, value) \
  338. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  339. value, 0x1, 29)
  340. #define SET_TX_DESC_BUFFER_RTS_EN_NO_CLR(txdesc, value) \
  341. HALMAC_SET_DESC_FIELD_NO_CLR( \
  342. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 29)
  343. #define GET_TX_DESC_BUFFER_RTS_EN(txdesc) \
  344. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \
  345. 29)
  346. #define SET_TX_DESC_BUFFER_CTS2SELF(txdesc, value) \
  347. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  348. value, 0x1, 28)
  349. #define SET_TX_DESC_BUFFER_CTS2SELF_NO_CLR(txdesc, value) \
  350. HALMAC_SET_DESC_FIELD_NO_CLR( \
  351. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 28)
  352. #define GET_TX_DESC_BUFFER_CTS2SELF(txdesc) \
  353. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \
  354. 28)
  355. #define SET_TX_DESC_BUFFER_TAILPAGE_H(txdesc, value) \
  356. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  357. value, 0xf, 24)
  358. #define SET_TX_DESC_BUFFER_TAILPAGE_H_NO_CLR(txdesc, value) \
  359. HALMAC_SET_DESC_FIELD_NO_CLR( \
  360. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0xf, 24)
  361. #define GET_TX_DESC_BUFFER_TAILPAGE_H(txdesc) \
  362. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0xf, \
  363. 24)
  364. #define SET_TX_DESC_BUFFER_TAILPAGE_L(txdesc, value) \
  365. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  366. value, 0xff, 16)
  367. #define SET_TX_DESC_BUFFER_TAILPAGE_L_NO_CLR(txdesc, value) \
  368. HALMAC_SET_DESC_FIELD_NO_CLR( \
  369. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0xff, 16)
  370. #define GET_TX_DESC_BUFFER_TAILPAGE_L(txdesc) \
  371. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0xff, \
  372. 16)
  373. #define SET_TX_DESC_BUFFER_NAVUSEHDR(txdesc, value) \
  374. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  375. value, 0x1, 15)
  376. #define SET_TX_DESC_BUFFER_NAVUSEHDR_NO_CLR(txdesc, value) \
  377. HALMAC_SET_DESC_FIELD_NO_CLR( \
  378. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 15)
  379. #define GET_TX_DESC_BUFFER_NAVUSEHDR(txdesc) \
  380. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \
  381. 15)
  382. #define SET_TX_DESC_BUFFER_BMC(txdesc, value) \
  383. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  384. value, 0x1, 14)
  385. #define SET_TX_DESC_BUFFER_BMC_NO_CLR(txdesc, value) \
  386. HALMAC_SET_DESC_FIELD_NO_CLR( \
  387. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 14)
  388. #define GET_TX_DESC_BUFFER_BMC(txdesc) \
  389. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \
  390. 14)
  391. #define SET_TX_DESC_BUFFER_RTS_DATA_RTY_LMT(txdesc, value) \
  392. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  393. value, 0x3f, 8)
  394. #define SET_TX_DESC_BUFFER_RTS_DATA_RTY_LMT_NO_CLR(txdesc, value) \
  395. HALMAC_SET_DESC_FIELD_NO_CLR( \
  396. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3f, 8)
  397. #define GET_TX_DESC_BUFFER_RTS_DATA_RTY_LMT(txdesc) \
  398. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3f, \
  399. 8)
  400. #define SET_TX_DESC_BUFFER_HW_AES_IV(txdesc, value) \
  401. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  402. value, 0x1, 7)
  403. #define SET_TX_DESC_BUFFER_HW_AES_IV_NO_CLR(txdesc, value) \
  404. HALMAC_SET_DESC_FIELD_NO_CLR( \
  405. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 7)
  406. #define GET_TX_DESC_BUFFER_HW_AES_IV(txdesc) \
  407. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, 7)
  408. #define SET_TX_DESC_BUFFER_BT_NULL(txdesc, value) \
  409. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  410. value, 0x1, 3)
  411. #define SET_TX_DESC_BUFFER_BT_NULL_NO_CLR(txdesc, value) \
  412. HALMAC_SET_DESC_FIELD_NO_CLR( \
  413. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 3)
  414. #define GET_TX_DESC_BUFFER_BT_NULL(txdesc) \
  415. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, 3)
  416. #define SET_TX_DESC_BUFFER_EN_DESC_ID(txdesc, value) \
  417. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  418. value, 0x1, 2)
  419. #define SET_TX_DESC_BUFFER_EN_DESC_ID_NO_CLR(txdesc, value) \
  420. HALMAC_SET_DESC_FIELD_NO_CLR( \
  421. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 2)
  422. #define GET_TX_DESC_BUFFER_EN_DESC_ID(txdesc) \
  423. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, 2)
  424. #define SET_TX_DESC_BUFFER_SECTYPE(txdesc, value) \
  425. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  426. value, 0x3, 0)
  427. #define SET_TX_DESC_BUFFER_SECTYPE_NO_CLR(txdesc, value) \
  428. HALMAC_SET_DESC_FIELD_NO_CLR( \
  429. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 0)
  430. #define GET_TX_DESC_BUFFER_SECTYPE(txdesc) \
  431. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3, 0)
  432. /*TXDESC_WORD6*/
  433. #define SET_TX_DESC_BUFFER_MULTIPLE_PORT(txdesc, value) \
  434. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  435. value, 0x7, 29)
  436. #define SET_TX_DESC_BUFFER_MULTIPLE_PORT_NO_CLR(txdesc, value) \
  437. HALMAC_SET_DESC_FIELD_NO_CLR( \
  438. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x7, 29)
  439. #define GET_TX_DESC_BUFFER_MULTIPLE_PORT(txdesc) \
  440. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x7, \
  441. 29)
  442. #define SET_TX_DESC_BUFFER_POLLUTED(txdesc, value) \
  443. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  444. value, 0x1, 28)
  445. #define SET_TX_DESC_BUFFER_POLLUTED_NO_CLR(txdesc, value) \
  446. HALMAC_SET_DESC_FIELD_NO_CLR( \
  447. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1, 28)
  448. #define GET_TX_DESC_BUFFER_POLLUTED(txdesc) \
  449. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x1, \
  450. 28)
  451. #define SET_TX_DESC_BUFFER_NULL_1(txdesc, value) \
  452. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  453. value, 0x1, 27)
  454. #define SET_TX_DESC_BUFFER_NULL_1_NO_CLR(txdesc, value) \
  455. HALMAC_SET_DESC_FIELD_NO_CLR( \
  456. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1, 27)
  457. #define GET_TX_DESC_BUFFER_NULL_1(txdesc) \
  458. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x1, \
  459. 27)
  460. #define SET_TX_DESC_BUFFER_NULL_0(txdesc, value) \
  461. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  462. value, 0x1, 26)
  463. #define SET_TX_DESC_BUFFER_NULL_0_NO_CLR(txdesc, value) \
  464. HALMAC_SET_DESC_FIELD_NO_CLR( \
  465. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1, 26)
  466. #define GET_TX_DESC_BUFFER_NULL_0(txdesc) \
  467. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x1, \
  468. 26)
  469. #define SET_TX_DESC_BUFFER_TRI_FRAME(txdesc, value) \
  470. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  471. value, 0x1, 25)
  472. #define SET_TX_DESC_BUFFER_TRI_FRAME_NO_CLR(txdesc, value) \
  473. HALMAC_SET_DESC_FIELD_NO_CLR( \
  474. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1, 25)
  475. #define GET_TX_DESC_BUFFER_TRI_FRAME(txdesc) \
  476. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x1, \
  477. 25)
  478. #define SET_TX_DESC_BUFFER_SPE_RPT(txdesc, value) \
  479. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  480. value, 0x1, 24)
  481. #define SET_TX_DESC_BUFFER_SPE_RPT_NO_CLR(txdesc, value) \
  482. HALMAC_SET_DESC_FIELD_NO_CLR( \
  483. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1, 24)
  484. #define GET_TX_DESC_BUFFER_SPE_RPT(txdesc) \
  485. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x1, \
  486. 24)
  487. #define SET_TX_DESC_BUFFER_FTM_EN(txdesc, value) \
  488. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  489. value, 0x1, 23)
  490. #define SET_TX_DESC_BUFFER_FTM_EN_NO_CLR(txdesc, value) \
  491. HALMAC_SET_DESC_FIELD_NO_CLR( \
  492. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1, 23)
  493. #define GET_TX_DESC_BUFFER_FTM_EN(txdesc) \
  494. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x1, \
  495. 23)
  496. #define SET_TX_DESC_BUFFER_MU_DATARATE(txdesc, value) \
  497. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  498. value, 0x7f, 16)
  499. #define SET_TX_DESC_BUFFER_MU_DATARATE_NO_CLR(txdesc, value) \
  500. HALMAC_SET_DESC_FIELD_NO_CLR( \
  501. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x7f, 16)
  502. #define GET_TX_DESC_BUFFER_MU_DATARATE(txdesc) \
  503. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x7f, \
  504. 16)
  505. #define SET_TX_DESC_BUFFER_CCA_RTS(txdesc, value) \
  506. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  507. value, 0x3, 14)
  508. #define SET_TX_DESC_BUFFER_CCA_RTS_NO_CLR(txdesc, value) \
  509. HALMAC_SET_DESC_FIELD_NO_CLR( \
  510. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 14)
  511. #define GET_TX_DESC_BUFFER_CCA_RTS(txdesc) \
  512. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  513. 14)
  514. #define SET_TX_DESC_BUFFER_NDPA(txdesc, value) \
  515. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  516. value, 0x3, 12)
  517. #define SET_TX_DESC_BUFFER_NDPA_NO_CLR(txdesc, value) \
  518. HALMAC_SET_DESC_FIELD_NO_CLR( \
  519. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 12)
  520. #define GET_TX_DESC_BUFFER_NDPA(txdesc) \
  521. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  522. 12)
  523. #define SET_TX_DESC_BUFFER_TXPWR_OFSET_TYPE(txdesc, value) \
  524. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  525. value, 0x3, 9)
  526. #define SET_TX_DESC_BUFFER_TXPWR_OFSET_TYPE_NO_CLR(txdesc, value) \
  527. HALMAC_SET_DESC_FIELD_NO_CLR( \
  528. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 9)
  529. #define GET_TX_DESC_BUFFER_TXPWR_OFSET_TYPE(txdesc) \
  530. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, 9)
  531. #define SET_TX_DESC_BUFFER_P_AID(txdesc, value) \
  532. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  533. value, 0x1ff, 0)
  534. #define SET_TX_DESC_BUFFER_P_AID_NO_CLR(txdesc, value) \
  535. HALMAC_SET_DESC_FIELD_NO_CLR( \
  536. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1ff, 0)
  537. #define GET_TX_DESC_BUFFER_P_AID(txdesc) \
  538. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, \
  539. 0x1ff, 0)
  540. /*TXDESC_WORD7*/
  541. #define SET_TX_DESC_BUFFER_SW_DEFINE(txdesc, value) \
  542. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \
  543. value, 0xfff, 16)
  544. #define SET_TX_DESC_BUFFER_SW_DEFINE_NO_CLR(txdesc, value) \
  545. HALMAC_SET_DESC_FIELD_NO_CLR( \
  546. ((struct halmac_tx_desc *)txdesc)->dword7, value, 0xfff, 16)
  547. #define GET_TX_DESC_BUFFER_SW_DEFINE(txdesc) \
  548. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, \
  549. 0xfff, 16)
  550. #define SET_TX_DESC_BUFFER_CTRL_CNT_VALID(txdesc, value) \
  551. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \
  552. value, 0x1, 9)
  553. #define SET_TX_DESC_BUFFER_CTRL_CNT_VALID_NO_CLR(txdesc, value) \
  554. HALMAC_SET_DESC_FIELD_NO_CLR( \
  555. ((struct halmac_tx_desc *)txdesc)->dword7, value, 0x1, 9)
  556. #define GET_TX_DESC_BUFFER_CTRL_CNT_VALID(txdesc) \
  557. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0x1, 9)
  558. #define SET_TX_DESC_BUFFER_CTRL_CNT(txdesc, value) \
  559. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \
  560. value, 0xf, 5)
  561. #define SET_TX_DESC_BUFFER_CTRL_CNT_NO_CLR(txdesc, value) \
  562. HALMAC_SET_DESC_FIELD_NO_CLR( \
  563. ((struct halmac_tx_desc *)txdesc)->dword7, value, 0xf, 5)
  564. #define GET_TX_DESC_BUFFER_CTRL_CNT(txdesc) \
  565. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0xf, 5)
  566. #define SET_TX_DESC_BUFFER_DATA_RTY_LOWEST_RATE(txdesc, value) \
  567. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \
  568. value, 0x1f, 0)
  569. #define SET_TX_DESC_BUFFER_DATA_RTY_LOWEST_RATE_NO_CLR(txdesc, value) \
  570. HALMAC_SET_DESC_FIELD_NO_CLR( \
  571. ((struct halmac_tx_desc *)txdesc)->dword7, value, 0x1f, 0)
  572. #define GET_TX_DESC_BUFFER_DATA_RTY_LOWEST_RATE(txdesc) \
  573. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0x1f, \
  574. 0)
  575. /*TXDESC_WORD8*/
  576. #define SET_TX_DESC_BUFFER_PATH_MAPA(txdesc, value) \
  577. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  578. value, 0x3, 30)
  579. #define SET_TX_DESC_BUFFER_PATH_MAPA_NO_CLR(txdesc, value) \
  580. HALMAC_SET_DESC_FIELD_NO_CLR( \
  581. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3, 30)
  582. #define GET_TX_DESC_BUFFER_PATH_MAPA(txdesc) \
  583. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3, \
  584. 30)
  585. #define SET_TX_DESC_BUFFER_PATH_MAPB(txdesc, value) \
  586. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  587. value, 0x3, 28)
  588. #define SET_TX_DESC_BUFFER_PATH_MAPB_NO_CLR(txdesc, value) \
  589. HALMAC_SET_DESC_FIELD_NO_CLR( \
  590. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3, 28)
  591. #define GET_TX_DESC_BUFFER_PATH_MAPB(txdesc) \
  592. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3, \
  593. 28)
  594. #define SET_TX_DESC_BUFFER_PATH_MAPC(txdesc, value) \
  595. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  596. value, 0x3, 26)
  597. #define SET_TX_DESC_BUFFER_PATH_MAPC_NO_CLR(txdesc, value) \
  598. HALMAC_SET_DESC_FIELD_NO_CLR( \
  599. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3, 26)
  600. #define GET_TX_DESC_BUFFER_PATH_MAPC(txdesc) \
  601. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3, \
  602. 26)
  603. #define SET_TX_DESC_BUFFER_PATH_MAPD(txdesc, value) \
  604. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  605. value, 0x3, 24)
  606. #define SET_TX_DESC_BUFFER_PATH_MAPD_NO_CLR(txdesc, value) \
  607. HALMAC_SET_DESC_FIELD_NO_CLR( \
  608. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3, 24)
  609. #define GET_TX_DESC_BUFFER_PATH_MAPD(txdesc) \
  610. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3, \
  611. 24)
  612. #define SET_TX_DESC_BUFFER_ANTSEL_A(txdesc, value) \
  613. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  614. value, 0xf, 20)
  615. #define SET_TX_DESC_BUFFER_ANTSEL_A_NO_CLR(txdesc, value) \
  616. HALMAC_SET_DESC_FIELD_NO_CLR( \
  617. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xf, 20)
  618. #define GET_TX_DESC_BUFFER_ANTSEL_A(txdesc) \
  619. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xf, \
  620. 20)
  621. #define SET_TX_DESC_BUFFER_ANTSEL_B(txdesc, value) \
  622. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  623. value, 0xf, 16)
  624. #define SET_TX_DESC_BUFFER_ANTSEL_B_NO_CLR(txdesc, value) \
  625. HALMAC_SET_DESC_FIELD_NO_CLR( \
  626. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xf, 16)
  627. #define GET_TX_DESC_BUFFER_ANTSEL_B(txdesc) \
  628. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xf, \
  629. 16)
  630. #define SET_TX_DESC_BUFFER_ANTSEL_C(txdesc, value) \
  631. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  632. value, 0xf, 12)
  633. #define SET_TX_DESC_BUFFER_ANTSEL_C_NO_CLR(txdesc, value) \
  634. HALMAC_SET_DESC_FIELD_NO_CLR( \
  635. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xf, 12)
  636. #define GET_TX_DESC_BUFFER_ANTSEL_C(txdesc) \
  637. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xf, \
  638. 12)
  639. #define SET_TX_DESC_BUFFER_ANTSEL_D(txdesc, value) \
  640. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  641. value, 0xf, 8)
  642. #define SET_TX_DESC_BUFFER_ANTSEL_D_NO_CLR(txdesc, value) \
  643. HALMAC_SET_DESC_FIELD_NO_CLR( \
  644. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xf, 8)
  645. #define GET_TX_DESC_BUFFER_ANTSEL_D(txdesc) \
  646. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xf, 8)
  647. #define SET_TX_DESC_BUFFER_NTX_PATH_EN(txdesc, value) \
  648. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  649. value, 0xf, 4)
  650. #define SET_TX_DESC_BUFFER_NTX_PATH_EN_NO_CLR(txdesc, value) \
  651. HALMAC_SET_DESC_FIELD_NO_CLR( \
  652. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xf, 4)
  653. #define GET_TX_DESC_BUFFER_NTX_PATH_EN(txdesc) \
  654. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xf, 4)
  655. #define SET_TX_DESC_BUFFER_ANTLSEL_EN(txdesc, value) \
  656. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  657. value, 0x1, 3)
  658. #define SET_TX_DESC_BUFFER_ANTLSEL_EN_NO_CLR(txdesc, value) \
  659. HALMAC_SET_DESC_FIELD_NO_CLR( \
  660. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 3)
  661. #define GET_TX_DESC_BUFFER_ANTLSEL_EN(txdesc) \
  662. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1, 3)
  663. #define SET_TX_DESC_BUFFER_AMPDU_DENSITY(txdesc, value) \
  664. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  665. value, 0x7, 0)
  666. #define SET_TX_DESC_BUFFER_AMPDU_DENSITY_NO_CLR(txdesc, value) \
  667. HALMAC_SET_DESC_FIELD_NO_CLR( \
  668. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x7, 0)
  669. #define GET_TX_DESC_BUFFER_AMPDU_DENSITY(txdesc) \
  670. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x7, 0)
  671. /*TXDESC_WORD9*/
  672. #define SET_TX_DESC_BUFFER_VCS_STBC(txdesc, value) \
  673. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  674. value, 0x3, 30)
  675. #define SET_TX_DESC_BUFFER_VCS_STBC_NO_CLR(txdesc, value) \
  676. HALMAC_SET_DESC_FIELD_NO_CLR( \
  677. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x3, 30)
  678. #define GET_TX_DESC_BUFFER_VCS_STBC(txdesc) \
  679. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x3, \
  680. 30)
  681. #define SET_TX_DESC_BUFFER_DATA_STBC(txdesc, value) \
  682. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  683. value, 0x3, 28)
  684. #define SET_TX_DESC_BUFFER_DATA_STBC_NO_CLR(txdesc, value) \
  685. HALMAC_SET_DESC_FIELD_NO_CLR( \
  686. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x3, 28)
  687. #define GET_TX_DESC_BUFFER_DATA_STBC(txdesc) \
  688. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x3, \
  689. 28)
  690. #define SET_TX_DESC_BUFFER_RTS_RTY_LOWEST_RATE(txdesc, value) \
  691. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  692. value, 0xf, 24)
  693. #define SET_TX_DESC_BUFFER_RTS_RTY_LOWEST_RATE_NO_CLR(txdesc, value) \
  694. HALMAC_SET_DESC_FIELD_NO_CLR( \
  695. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0xf, 24)
  696. #define GET_TX_DESC_BUFFER_RTS_RTY_LOWEST_RATE(txdesc) \
  697. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0xf, \
  698. 24)
  699. #define SET_TX_DESC_BUFFER_SIGNALING_TA_PKT_EN(txdesc, value) \
  700. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  701. value, 0x1, 23)
  702. #define SET_TX_DESC_BUFFER_SIGNALING_TA_PKT_EN_NO_CLR(txdesc, value) \
  703. HALMAC_SET_DESC_FIELD_NO_CLR( \
  704. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 23)
  705. #define GET_TX_DESC_BUFFER_SIGNALING_TA_PKT_EN(txdesc) \
  706. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, \
  707. 23)
  708. #define SET_TX_DESC_BUFFER_MHR_CP(txdesc, value) \
  709. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  710. value, 0x1, 22)
  711. #define SET_TX_DESC_BUFFER_MHR_CP_NO_CLR(txdesc, value) \
  712. HALMAC_SET_DESC_FIELD_NO_CLR( \
  713. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 22)
  714. #define GET_TX_DESC_BUFFER_MHR_CP(txdesc) \
  715. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, \
  716. 22)
  717. #define SET_TX_DESC_BUFFER_SMH_EN(txdesc, value) \
  718. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  719. value, 0x1, 21)
  720. #define SET_TX_DESC_BUFFER_SMH_EN_NO_CLR(txdesc, value) \
  721. HALMAC_SET_DESC_FIELD_NO_CLR( \
  722. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 21)
  723. #define GET_TX_DESC_BUFFER_SMH_EN(txdesc) \
  724. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, \
  725. 21)
  726. #define SET_TX_DESC_BUFFER_RTSRATE(txdesc, value) \
  727. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  728. value, 0x1f, 16)
  729. #define SET_TX_DESC_BUFFER_RTSRATE_NO_CLR(txdesc, value) \
  730. HALMAC_SET_DESC_FIELD_NO_CLR( \
  731. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1f, 16)
  732. #define GET_TX_DESC_BUFFER_RTSRATE(txdesc) \
  733. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1f, \
  734. 16)
  735. #define SET_TX_DESC_BUFFER_SMH_CAM(txdesc, value) \
  736. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  737. value, 0xff, 8)
  738. #define SET_TX_DESC_BUFFER_SMH_CAM_NO_CLR(txdesc, value) \
  739. HALMAC_SET_DESC_FIELD_NO_CLR( \
  740. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0xff, 8)
  741. #define GET_TX_DESC_BUFFER_SMH_CAM(txdesc) \
  742. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0xff, \
  743. 8)
  744. #define SET_TX_DESC_BUFFER_ARFR_TABLE_SEL(txdesc, value) \
  745. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  746. value, 0x1, 7)
  747. #define SET_TX_DESC_BUFFER_ARFR_TABLE_SEL_NO_CLR(txdesc, value) \
  748. HALMAC_SET_DESC_FIELD_NO_CLR( \
  749. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 7)
  750. #define GET_TX_DESC_BUFFER_ARFR_TABLE_SEL(txdesc) \
  751. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 7)
  752. #define SET_TX_DESC_BUFFER_ARFR_HT_EN(txdesc, value) \
  753. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  754. value, 0x1, 6)
  755. #define SET_TX_DESC_BUFFER_ARFR_HT_EN_NO_CLR(txdesc, value) \
  756. HALMAC_SET_DESC_FIELD_NO_CLR( \
  757. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 6)
  758. #define GET_TX_DESC_BUFFER_ARFR_HT_EN(txdesc) \
  759. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 6)
  760. #define SET_TX_DESC_BUFFER_ARFR_OFDM_EN(txdesc, value) \
  761. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  762. value, 0x1, 5)
  763. #define SET_TX_DESC_BUFFER_ARFR_OFDM_EN_NO_CLR(txdesc, value) \
  764. HALMAC_SET_DESC_FIELD_NO_CLR( \
  765. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 5)
  766. #define GET_TX_DESC_BUFFER_ARFR_OFDM_EN(txdesc) \
  767. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 5)
  768. #define SET_TX_DESC_BUFFER_ARFR_CCK_EN(txdesc, value) \
  769. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  770. value, 0x1, 4)
  771. #define SET_TX_DESC_BUFFER_ARFR_CCK_EN_NO_CLR(txdesc, value) \
  772. HALMAC_SET_DESC_FIELD_NO_CLR( \
  773. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 4)
  774. #define GET_TX_DESC_BUFFER_ARFR_CCK_EN(txdesc) \
  775. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 4)
  776. #define SET_TX_DESC_BUFFER_RTS_SHORT(txdesc, value) \
  777. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  778. value, 0x1, 3)
  779. #define SET_TX_DESC_BUFFER_RTS_SHORT_NO_CLR(txdesc, value) \
  780. HALMAC_SET_DESC_FIELD_NO_CLR( \
  781. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 3)
  782. #define GET_TX_DESC_BUFFER_RTS_SHORT(txdesc) \
  783. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 3)
  784. #define SET_TX_DESC_BUFFER_DISDATAFB(txdesc, value) \
  785. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  786. value, 0x1, 2)
  787. #define SET_TX_DESC_BUFFER_DISDATAFB_NO_CLR(txdesc, value) \
  788. HALMAC_SET_DESC_FIELD_NO_CLR( \
  789. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 2)
  790. #define GET_TX_DESC_BUFFER_DISDATAFB(txdesc) \
  791. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 2)
  792. #define SET_TX_DESC_BUFFER_DISRTSFB(txdesc, value) \
  793. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  794. value, 0x1, 1)
  795. #define SET_TX_DESC_BUFFER_DISRTSFB_NO_CLR(txdesc, value) \
  796. HALMAC_SET_DESC_FIELD_NO_CLR( \
  797. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 1)
  798. #define GET_TX_DESC_BUFFER_DISRTSFB(txdesc) \
  799. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 1)
  800. #define SET_TX_DESC_BUFFER_EXT_EDCA(txdesc, value) \
  801. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  802. value, 0x1, 0)
  803. #define SET_TX_DESC_BUFFER_EXT_EDCA_NO_CLR(txdesc, value) \
  804. HALMAC_SET_DESC_FIELD_NO_CLR( \
  805. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 0)
  806. #define GET_TX_DESC_BUFFER_EXT_EDCA(txdesc) \
  807. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 0)
  808. /*TXDESC_WORD10*/
  809. #define SET_TX_DESC_BUFFER_AMPDU_MAX_TIME(txdesc, value) \
  810. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  811. value, 0xff, 24)
  812. #define SET_TX_DESC_BUFFER_AMPDU_MAX_TIME_NO_CLR(txdesc, value) \
  813. HALMAC_SET_DESC_FIELD_NO_CLR( \
  814. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0xff, 24)
  815. #define GET_TX_DESC_BUFFER_AMPDU_MAX_TIME(txdesc) \
  816. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, \
  817. 0xff, 24)
  818. #define SET_TX_DESC_BUFFER_SPECIAL_CW(txdesc, value) \
  819. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  820. value, 0x1, 23)
  821. #define SET_TX_DESC_BUFFER_SPECIAL_CW_NO_CLR(txdesc, value) \
  822. HALMAC_SET_DESC_FIELD_NO_CLR( \
  823. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 23)
  824. #define GET_TX_DESC_BUFFER_SPECIAL_CW(txdesc) \
  825. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
  826. 23)
  827. #define SET_TX_DESC_BUFFER_RDG_NAV_EXT(txdesc, value) \
  828. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  829. value, 0x1, 22)
  830. #define SET_TX_DESC_BUFFER_RDG_NAV_EXT_NO_CLR(txdesc, value) \
  831. HALMAC_SET_DESC_FIELD_NO_CLR( \
  832. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 22)
  833. #define GET_TX_DESC_BUFFER_RDG_NAV_EXT(txdesc) \
  834. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
  835. 22)
  836. #define SET_TX_DESC_BUFFER_RAW(txdesc, value) \
  837. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  838. value, 0x1, 21)
  839. #define SET_TX_DESC_BUFFER_RAW_NO_CLR(txdesc, value) \
  840. HALMAC_SET_DESC_FIELD_NO_CLR( \
  841. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 21)
  842. #define GET_TX_DESC_BUFFER_RAW(txdesc) \
  843. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
  844. 21)
  845. #define SET_TX_DESC_BUFFER_MAX_AGG_NUM(txdesc, value) \
  846. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  847. value, 0x1f, 16)
  848. #define SET_TX_DESC_BUFFER_MAX_AGG_NUM_NO_CLR(txdesc, value) \
  849. HALMAC_SET_DESC_FIELD_NO_CLR( \
  850. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1f, 16)
  851. #define GET_TX_DESC_BUFFER_MAX_AGG_NUM(txdesc) \
  852. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, \
  853. 0x1f, 16)
  854. #define SET_TX_DESC_BUFFER_FINAL_DATA_RATE(txdesc, value) \
  855. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  856. value, 0xff, 8)
  857. #define SET_TX_DESC_BUFFER_FINAL_DATA_RATE_NO_CLR(txdesc, value) \
  858. HALMAC_SET_DESC_FIELD_NO_CLR( \
  859. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0xff, 8)
  860. #define GET_TX_DESC_BUFFER_FINAL_DATA_RATE(txdesc) \
  861. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, \
  862. 0xff, 8)
  863. #define SET_TX_DESC_BUFFER_GF(txdesc, value) \
  864. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  865. value, 0x1, 7)
  866. #define SET_TX_DESC_BUFFER_GF_NO_CLR(txdesc, value) \
  867. HALMAC_SET_DESC_FIELD_NO_CLR( \
  868. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 7)
  869. #define GET_TX_DESC_BUFFER_GF(txdesc) \
  870. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
  871. 7)
  872. #define SET_TX_DESC_BUFFER_MOREFRAG(txdesc, value) \
  873. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  874. value, 0x1, 6)
  875. #define SET_TX_DESC_BUFFER_MOREFRAG_NO_CLR(txdesc, value) \
  876. HALMAC_SET_DESC_FIELD_NO_CLR( \
  877. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 6)
  878. #define GET_TX_DESC_BUFFER_MOREFRAG(txdesc) \
  879. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
  880. 6)
  881. #define SET_TX_DESC_BUFFER_NOACM(txdesc, value) \
  882. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  883. value, 0x1, 5)
  884. #define SET_TX_DESC_BUFFER_NOACM_NO_CLR(txdesc, value) \
  885. HALMAC_SET_DESC_FIELD_NO_CLR( \
  886. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 5)
  887. #define GET_TX_DESC_BUFFER_NOACM(txdesc) \
  888. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
  889. 5)
  890. #define SET_TX_DESC_BUFFER_HTC(txdesc, value) \
  891. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  892. value, 0x1, 4)
  893. #define SET_TX_DESC_BUFFER_HTC_NO_CLR(txdesc, value) \
  894. HALMAC_SET_DESC_FIELD_NO_CLR( \
  895. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 4)
  896. #define GET_TX_DESC_BUFFER_HTC(txdesc) \
  897. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
  898. 4)
  899. #define SET_TX_DESC_BUFFER_TX_PKT_AFTER_PIFS(txdesc, value) \
  900. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  901. value, 0x1, 3)
  902. #define SET_TX_DESC_BUFFER_TX_PKT_AFTER_PIFS_NO_CLR(txdesc, value) \
  903. HALMAC_SET_DESC_FIELD_NO_CLR( \
  904. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 3)
  905. #define GET_TX_DESC_BUFFER_TX_PKT_AFTER_PIFS(txdesc) \
  906. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
  907. 3)
  908. #define SET_TX_DESC_BUFFER_USE_MAX_TIME_EN(txdesc, value) \
  909. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  910. value, 0x1, 2)
  911. #define SET_TX_DESC_BUFFER_USE_MAX_TIME_EN_NO_CLR(txdesc, value) \
  912. HALMAC_SET_DESC_FIELD_NO_CLR( \
  913. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 2)
  914. #define GET_TX_DESC_BUFFER_USE_MAX_TIME_EN(txdesc) \
  915. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
  916. 2)
  917. #define SET_TX_DESC_BUFFER_HW_SSN_SEL(txdesc, value) \
  918. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  919. value, 0x3, 0)
  920. #define SET_TX_DESC_BUFFER_HW_SSN_SEL_NO_CLR(txdesc, value) \
  921. HALMAC_SET_DESC_FIELD_NO_CLR( \
  922. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x3, 0)
  923. #define GET_TX_DESC_BUFFER_HW_SSN_SEL(txdesc) \
  924. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x3, \
  925. 0)
  926. /*TXDESC_WORD11*/
  927. #define SET_TX_DESC_BUFFER_ADDR_CAM(txdesc, value) \
  928. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \
  929. value, 0xff, 24)
  930. #define SET_TX_DESC_BUFFER_ADDR_CAM_NO_CLR(txdesc, value) \
  931. HALMAC_SET_DESC_FIELD_NO_CLR( \
  932. ((struct halmac_tx_desc *)txdesc)->dword11, value, 0xff, 24)
  933. #define GET_TX_DESC_BUFFER_ADDR_CAM(txdesc) \
  934. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, \
  935. 0xff, 24)
  936. #define SET_TX_DESC_BUFFER_SND_TARGET(txdesc, value) \
  937. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \
  938. value, 0xff, 16)
  939. #define SET_TX_DESC_BUFFER_SND_TARGET_NO_CLR(txdesc, value) \
  940. HALMAC_SET_DESC_FIELD_NO_CLR( \
  941. ((struct halmac_tx_desc *)txdesc)->dword11, value, 0xff, 16)
  942. #define GET_TX_DESC_BUFFER_SND_TARGET(txdesc) \
  943. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, \
  944. 0xff, 16)
  945. #define SET_TX_DESC_BUFFER_DATA_LDPC(txdesc, value) \
  946. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \
  947. value, 0x1, 15)
  948. #define SET_TX_DESC_BUFFER_DATA_LDPC_NO_CLR(txdesc, value) \
  949. HALMAC_SET_DESC_FIELD_NO_CLR( \
  950. ((struct halmac_tx_desc *)txdesc)->dword11, value, 0x1, 15)
  951. #define GET_TX_DESC_BUFFER_DATA_LDPC(txdesc) \
  952. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, 0x1, \
  953. 15)
  954. #define SET_TX_DESC_BUFFER_LSIG_TXOP_EN(txdesc, value) \
  955. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \
  956. value, 0x1, 14)
  957. #define SET_TX_DESC_BUFFER_LSIG_TXOP_EN_NO_CLR(txdesc, value) \
  958. HALMAC_SET_DESC_FIELD_NO_CLR( \
  959. ((struct halmac_tx_desc *)txdesc)->dword11, value, 0x1, 14)
  960. #define GET_TX_DESC_BUFFER_LSIG_TXOP_EN(txdesc) \
  961. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, 0x1, \
  962. 14)
  963. #define SET_TX_DESC_BUFFER_G_ID(txdesc, value) \
  964. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \
  965. value, 0x3f, 8)
  966. #define SET_TX_DESC_BUFFER_G_ID_NO_CLR(txdesc, value) \
  967. HALMAC_SET_DESC_FIELD_NO_CLR( \
  968. ((struct halmac_tx_desc *)txdesc)->dword11, value, 0x3f, 8)
  969. #define GET_TX_DESC_BUFFER_G_ID(txdesc) \
  970. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, \
  971. 0x3f, 8)
  972. #define SET_TX_DESC_BUFFER_SIGNALING_TA_PKT_SC(txdesc, value) \
  973. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \
  974. value, 0xf, 4)
  975. #define SET_TX_DESC_BUFFER_SIGNALING_TA_PKT_SC_NO_CLR(txdesc, value) \
  976. HALMAC_SET_DESC_FIELD_NO_CLR( \
  977. ((struct halmac_tx_desc *)txdesc)->dword11, value, 0xf, 4)
  978. #define GET_TX_DESC_BUFFER_SIGNALING_TA_PKT_SC(txdesc) \
  979. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, 0xf, \
  980. 4)
  981. #define SET_TX_DESC_BUFFER_DATA_SC(txdesc, value) \
  982. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \
  983. value, 0xf, 0)
  984. #define SET_TX_DESC_BUFFER_DATA_SC_NO_CLR(txdesc, value) \
  985. HALMAC_SET_DESC_FIELD_NO_CLR( \
  986. ((struct halmac_tx_desc *)txdesc)->dword11, value, 0xf, 0)
  987. #define GET_TX_DESC_BUFFER_DATA_SC(txdesc) \
  988. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, 0xf, \
  989. 0)
  990. /*TXDESC_WORD12*/
  991. #define SET_TX_DESC_BUFFER_LEN1_L(txdesc, value) \
  992. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword12, \
  993. value, 0x7f, 17)
  994. #define SET_TX_DESC_BUFFER_LEN1_L_NO_CLR(txdesc, value) \
  995. HALMAC_SET_DESC_FIELD_NO_CLR( \
  996. ((struct halmac_tx_desc *)txdesc)->dword12, value, 0x7f, 17)
  997. #define GET_TX_DESC_BUFFER_LEN1_L(txdesc) \
  998. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword12, \
  999. 0x7f, 17)
  1000. #define SET_TX_DESC_BUFFER_LEN0(txdesc, value) \
  1001. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword12, \
  1002. value, 0x1fff, 4)
  1003. #define SET_TX_DESC_BUFFER_LEN0_NO_CLR(txdesc, value) \
  1004. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1005. ((struct halmac_tx_desc *)txdesc)->dword12, value, 0x1fff, 4)
  1006. #define GET_TX_DESC_BUFFER_LEN0(txdesc) \
  1007. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword12, \
  1008. 0x1fff, 4)
  1009. #define SET_TX_DESC_BUFFER_PKT_NUM(txdesc, value) \
  1010. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword12, \
  1011. value, 0xf, 0)
  1012. #define SET_TX_DESC_BUFFER_PKT_NUM_NO_CLR(txdesc, value) \
  1013. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1014. ((struct halmac_tx_desc *)txdesc)->dword12, value, 0xf, 0)
  1015. #define GET_TX_DESC_BUFFER_PKT_NUM(txdesc) \
  1016. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword12, 0xf, \
  1017. 0)
  1018. /*TXDESC_WORD13*/
  1019. #define SET_TX_DESC_BUFFER_LEN3(txdesc, value) \
  1020. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword13, \
  1021. value, 0x1fff, 19)
  1022. #define SET_TX_DESC_BUFFER_LEN3_NO_CLR(txdesc, value) \
  1023. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1024. ((struct halmac_tx_desc *)txdesc)->dword13, value, 0x1fff, 19)
  1025. #define GET_TX_DESC_BUFFER_LEN3(txdesc) \
  1026. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword13, \
  1027. 0x1fff, 19)
  1028. #define SET_TX_DESC_BUFFER_LEN2(txdesc, value) \
  1029. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword13, \
  1030. value, 0x1fff, 6)
  1031. #define SET_TX_DESC_BUFFER_LEN2_NO_CLR(txdesc, value) \
  1032. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1033. ((struct halmac_tx_desc *)txdesc)->dword13, value, 0x1fff, 6)
  1034. #define GET_TX_DESC_BUFFER_LEN2(txdesc) \
  1035. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword13, \
  1036. 0x1fff, 6)
  1037. #define SET_TX_DESC_BUFFER_LEN1_H(txdesc, value) \
  1038. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword13, \
  1039. value, 0x3f, 0)
  1040. #define SET_TX_DESC_BUFFER_LEN1_H_NO_CLR(txdesc, value) \
  1041. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1042. ((struct halmac_tx_desc *)txdesc)->dword13, value, 0x3f, 0)
  1043. #define GET_TX_DESC_BUFFER_LEN1_H(txdesc) \
  1044. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword13, \
  1045. 0x3f, 0)
  1046. #endif
  1047. #endif