halmac_tx_desc_ap.h 97 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942
  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_AP_H_
  16. #define _HALMAC_TX_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. /*TXDESC_WORD0*/
  21. #define SET_TX_DESC_DISQSELSEQ(txdesc, value) \
  22. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  23. value, 0x1, 31)
  24. #define SET_TX_DESC_DISQSELSEQ_NO_CLR(txdesc, value) \
  25. HALMAC_SET_DESC_FIELD_NO_CLR( \
  26. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 31)
  27. #define GET_TX_DESC_DISQSELSEQ(txdesc) \
  28. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  29. 31)
  30. #endif
  31. #if (HALMAC_8814B_SUPPORT)
  32. #define SET_TX_DESC_IE_END_BODY(txdesc, value) \
  33. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  34. value, 0x1, 31)
  35. #define SET_TX_DESC_IE_END_BODY_NO_CLR(txdesc, value) \
  36. HALMAC_SET_DESC_FIELD_NO_CLR( \
  37. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 31)
  38. #define GET_TX_DESC_IE_END_BODY(txdesc) \
  39. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  40. 31)
  41. #endif
  42. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  43. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  44. HALMAC_8812F_SUPPORT)
  45. #define SET_TX_DESC_GF(txdesc, value) \
  46. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  47. value, 0x1, 30)
  48. #define SET_TX_DESC_GF_NO_CLR(txdesc, value) \
  49. HALMAC_SET_DESC_FIELD_NO_CLR( \
  50. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 30)
  51. #define GET_TX_DESC_GF(txdesc) \
  52. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  53. 30)
  54. #endif
  55. #if (HALMAC_8814B_SUPPORT)
  56. #define SET_TX_DESC_AGG_EN_V1(txdesc, value) \
  57. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  58. value, 0x1, 30)
  59. #define SET_TX_DESC_AGG_EN_V1_NO_CLR(txdesc, value) \
  60. HALMAC_SET_DESC_FIELD_NO_CLR( \
  61. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 30)
  62. #define GET_TX_DESC_AGG_EN_V1(txdesc) \
  63. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  64. 30)
  65. #endif
  66. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  67. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  68. HALMAC_8812F_SUPPORT)
  69. #define SET_TX_DESC_NO_ACM(txdesc, value) \
  70. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  71. value, 0x1, 29)
  72. #define SET_TX_DESC_NO_ACM_NO_CLR(txdesc, value) \
  73. HALMAC_SET_DESC_FIELD_NO_CLR( \
  74. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 29)
  75. #define GET_TX_DESC_NO_ACM(txdesc) \
  76. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  77. 29)
  78. #endif
  79. #if (HALMAC_8814B_SUPPORT)
  80. #define SET_TX_DESC_BK_V1(txdesc, value) \
  81. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  82. value, 0x1, 29)
  83. #define SET_TX_DESC_BK_V1_NO_CLR(txdesc, value) \
  84. HALMAC_SET_DESC_FIELD_NO_CLR( \
  85. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 29)
  86. #define GET_TX_DESC_BK_V1(txdesc) \
  87. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  88. 29)
  89. #endif
  90. #if (HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8821C_SUPPORT || \
  91. HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  92. #define SET_TX_DESC_BCNPKT_TSF_CTRL(txdesc, value) \
  93. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  94. value, 0x1, 28)
  95. #define SET_TX_DESC_BCNPKT_TSF_CTRL_NO_CLR(txdesc, value) \
  96. HALMAC_SET_DESC_FIELD_NO_CLR( \
  97. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 28)
  98. #define GET_TX_DESC_BCNPKT_TSF_CTRL(txdesc) \
  99. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  100. 28)
  101. #endif
  102. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  103. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  104. HALMAC_8812F_SUPPORT)
  105. #define SET_TX_DESC_AMSDU_PAD_EN(txdesc, value) \
  106. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  107. value, 0x1, 27)
  108. #define SET_TX_DESC_AMSDU_PAD_EN_NO_CLR(txdesc, value) \
  109. HALMAC_SET_DESC_FIELD_NO_CLR( \
  110. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 27)
  111. #define GET_TX_DESC_AMSDU_PAD_EN(txdesc) \
  112. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  113. 27)
  114. #define SET_TX_DESC_LS(txdesc, value) \
  115. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  116. value, 0x1, 26)
  117. #define SET_TX_DESC_LS_NO_CLR(txdesc, value) \
  118. HALMAC_SET_DESC_FIELD_NO_CLR( \
  119. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 26)
  120. #define GET_TX_DESC_LS(txdesc) \
  121. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  122. 26)
  123. #define SET_TX_DESC_HTC(txdesc, value) \
  124. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  125. value, 0x1, 25)
  126. #define SET_TX_DESC_HTC_NO_CLR(txdesc, value) \
  127. HALMAC_SET_DESC_FIELD_NO_CLR( \
  128. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 25)
  129. #define GET_TX_DESC_HTC(txdesc) \
  130. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  131. 25)
  132. #define SET_TX_DESC_BMC(txdesc, value) \
  133. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  134. value, 0x1, 24)
  135. #define SET_TX_DESC_BMC_NO_CLR(txdesc, value) \
  136. HALMAC_SET_DESC_FIELD_NO_CLR( \
  137. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 24)
  138. #define GET_TX_DESC_BMC(txdesc) \
  139. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \
  140. 24)
  141. #endif
  142. #if (HALMAC_8814B_SUPPORT)
  143. #define SET_TX_DESC_PKT_OFFSET_V1(txdesc, value) \
  144. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  145. value, 0x1f, 24)
  146. #define SET_TX_DESC_PKT_OFFSET_V1_NO_CLR(txdesc, value) \
  147. HALMAC_SET_DESC_FIELD_NO_CLR( \
  148. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1f, 24)
  149. #define GET_TX_DESC_PKT_OFFSET_V1(txdesc) \
  150. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1f, \
  151. 24)
  152. #endif
  153. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  154. HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \
  155. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  156. #define SET_TX_DESC_OFFSET(txdesc, value) \
  157. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  158. value, 0xff, 16)
  159. #define SET_TX_DESC_OFFSET_NO_CLR(txdesc, value) \
  160. HALMAC_SET_DESC_FIELD_NO_CLR( \
  161. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0xff, 16)
  162. #define GET_TX_DESC_OFFSET(txdesc) \
  163. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0xff, \
  164. 16)
  165. #define SET_TX_DESC_TXPKTSIZE(txdesc, value) \
  166. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \
  167. value, 0xffff, 0)
  168. #define SET_TX_DESC_TXPKTSIZE_NO_CLR(txdesc, value) \
  169. HALMAC_SET_DESC_FIELD_NO_CLR( \
  170. ((struct halmac_tx_desc *)txdesc)->dword0, value, 0xffff, 0)
  171. #define GET_TX_DESC_TXPKTSIZE(txdesc) \
  172. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, \
  173. 0xffff, 0)
  174. #endif
  175. #if (HALMAC_8198F_SUPPORT)
  176. /*WORD1*/
  177. #define SET_TX_DESC_HW_AES_IV_V2(txdesc, value) \
  178. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  179. value, 0x1, 31)
  180. #define SET_TX_DESC_HW_AES_IV_V2_NO_CLR(txdesc, value) \
  181. HALMAC_SET_DESC_FIELD_NO_CLR( \
  182. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 31)
  183. #define GET_TX_DESC_HW_AES_IV_V2(txdesc) \
  184. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  185. 31)
  186. #endif
  187. #if (HALMAC_8814B_SUPPORT)
  188. #define SET_TX_DESC_AMSDU(txdesc, value) \
  189. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  190. value, 0x1, 30)
  191. #define SET_TX_DESC_AMSDU_NO_CLR(txdesc, value) \
  192. HALMAC_SET_DESC_FIELD_NO_CLR( \
  193. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 30)
  194. #define GET_TX_DESC_AMSDU(txdesc) \
  195. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  196. 30)
  197. #endif
  198. #if (HALMAC_8198F_SUPPORT)
  199. #define SET_TX_DESC_FTM_EN_V1(txdesc, value) \
  200. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  201. value, 0x1, 30)
  202. #define SET_TX_DESC_FTM_EN_V1_NO_CLR(txdesc, value) \
  203. HALMAC_SET_DESC_FIELD_NO_CLR( \
  204. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 30)
  205. #define GET_TX_DESC_FTM_EN_V1(txdesc) \
  206. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  207. 30)
  208. #endif
  209. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  210. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  211. HALMAC_8812F_SUPPORT)
  212. #define SET_TX_DESC_MOREDATA(txdesc, value) \
  213. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  214. value, 0x1, 29)
  215. #define SET_TX_DESC_MOREDATA_NO_CLR(txdesc, value) \
  216. HALMAC_SET_DESC_FIELD_NO_CLR( \
  217. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 29)
  218. #define GET_TX_DESC_MOREDATA(txdesc) \
  219. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  220. 29)
  221. #endif
  222. #if (HALMAC_8814B_SUPPORT)
  223. #define SET_TX_DESC_HW_AES_IV_V1(txdesc, value) \
  224. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  225. value, 0x1, 29)
  226. #define SET_TX_DESC_HW_AES_IV_V1_NO_CLR(txdesc, value) \
  227. HALMAC_SET_DESC_FIELD_NO_CLR( \
  228. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 29)
  229. #define GET_TX_DESC_HW_AES_IV_V1(txdesc) \
  230. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  231. 29)
  232. #define SET_TX_DESC_MHR_CP(txdesc, value) \
  233. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  234. value, 0x1, 25)
  235. #define SET_TX_DESC_MHR_CP_NO_CLR(txdesc, value) \
  236. HALMAC_SET_DESC_FIELD_NO_CLR( \
  237. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 25)
  238. #define GET_TX_DESC_MHR_CP(txdesc) \
  239. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  240. 25)
  241. #endif
  242. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  243. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  244. HALMAC_8812F_SUPPORT)
  245. #define SET_TX_DESC_PKT_OFFSET(txdesc, value) \
  246. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  247. value, 0x1f, 24)
  248. #define SET_TX_DESC_PKT_OFFSET_NO_CLR(txdesc, value) \
  249. HALMAC_SET_DESC_FIELD_NO_CLR( \
  250. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1f, 24)
  251. #define GET_TX_DESC_PKT_OFFSET(txdesc) \
  252. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1f, \
  253. 24)
  254. #endif
  255. #if (HALMAC_8814B_SUPPORT)
  256. #define SET_TX_DESC_SMH_EN_V1(txdesc, value) \
  257. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  258. value, 0x1, 24)
  259. #define SET_TX_DESC_SMH_EN_V1_NO_CLR(txdesc, value) \
  260. HALMAC_SET_DESC_FIELD_NO_CLR( \
  261. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 24)
  262. #define GET_TX_DESC_SMH_EN_V1(txdesc) \
  263. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  264. 24)
  265. #endif
  266. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  267. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  268. HALMAC_8812F_SUPPORT)
  269. #define SET_TX_DESC_SEC_TYPE(txdesc, value) \
  270. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  271. value, 0x3, 22)
  272. #define SET_TX_DESC_SEC_TYPE_NO_CLR(txdesc, value) \
  273. HALMAC_SET_DESC_FIELD_NO_CLR( \
  274. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x3, 22)
  275. #define GET_TX_DESC_SEC_TYPE(txdesc) \
  276. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x3, \
  277. 22)
  278. #define SET_TX_DESC_EN_DESC_ID(txdesc, value) \
  279. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  280. value, 0x1, 21)
  281. #define SET_TX_DESC_EN_DESC_ID_NO_CLR(txdesc, value) \
  282. HALMAC_SET_DESC_FIELD_NO_CLR( \
  283. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 21)
  284. #define GET_TX_DESC_EN_DESC_ID(txdesc) \
  285. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  286. 21)
  287. #define SET_TX_DESC_RATE_ID(txdesc, value) \
  288. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  289. value, 0x1f, 16)
  290. #define SET_TX_DESC_RATE_ID_NO_CLR(txdesc, value) \
  291. HALMAC_SET_DESC_FIELD_NO_CLR( \
  292. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1f, 16)
  293. #define GET_TX_DESC_RATE_ID(txdesc) \
  294. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1f, \
  295. 16)
  296. #endif
  297. #if (HALMAC_8814B_SUPPORT)
  298. #define SET_TX_DESC_SMH_CAM(txdesc, value) \
  299. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  300. value, 0xff, 16)
  301. #define SET_TX_DESC_SMH_CAM_NO_CLR(txdesc, value) \
  302. HALMAC_SET_DESC_FIELD_NO_CLR( \
  303. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0xff, 16)
  304. #define GET_TX_DESC_SMH_CAM(txdesc) \
  305. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0xff, \
  306. 16)
  307. #endif
  308. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  309. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  310. HALMAC_8812F_SUPPORT)
  311. #define SET_TX_DESC_PIFS(txdesc, value) \
  312. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  313. value, 0x1, 15)
  314. #define SET_TX_DESC_PIFS_NO_CLR(txdesc, value) \
  315. HALMAC_SET_DESC_FIELD_NO_CLR( \
  316. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 15)
  317. #define GET_TX_DESC_PIFS(txdesc) \
  318. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  319. 15)
  320. #define SET_TX_DESC_LSIG_TXOP_EN(txdesc, value) \
  321. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  322. value, 0x1, 14)
  323. #define SET_TX_DESC_LSIG_TXOP_EN_NO_CLR(txdesc, value) \
  324. HALMAC_SET_DESC_FIELD_NO_CLR( \
  325. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 14)
  326. #define GET_TX_DESC_LSIG_TXOP_EN(txdesc) \
  327. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  328. 14)
  329. #define SET_TX_DESC_RD_NAV_EXT(txdesc, value) \
  330. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  331. value, 0x1, 13)
  332. #define SET_TX_DESC_RD_NAV_EXT_NO_CLR(txdesc, value) \
  333. HALMAC_SET_DESC_FIELD_NO_CLR( \
  334. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 13)
  335. #define GET_TX_DESC_RD_NAV_EXT(txdesc) \
  336. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  337. 13)
  338. #endif
  339. #if (HALMAC_8814B_SUPPORT)
  340. #define SET_TX_DESC_EXT_EDCA(txdesc, value) \
  341. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  342. value, 0x1, 13)
  343. #define SET_TX_DESC_EXT_EDCA_NO_CLR(txdesc, value) \
  344. HALMAC_SET_DESC_FIELD_NO_CLR( \
  345. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 13)
  346. #define GET_TX_DESC_EXT_EDCA(txdesc) \
  347. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \
  348. 13)
  349. #endif
  350. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  351. HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \
  352. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  353. #define SET_TX_DESC_QSEL(txdesc, value) \
  354. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  355. value, 0x1f, 8)
  356. #define SET_TX_DESC_QSEL_NO_CLR(txdesc, value) \
  357. HALMAC_SET_DESC_FIELD_NO_CLR( \
  358. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1f, 8)
  359. #define GET_TX_DESC_QSEL(txdesc) \
  360. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1f, \
  361. 8)
  362. #endif
  363. #if (HALMAC_8198F_SUPPORT)
  364. #define SET_TX_DESC_SPECIAL_CW(txdesc, value) \
  365. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  366. value, 0x1, 7)
  367. #define SET_TX_DESC_SPECIAL_CW_NO_CLR(txdesc, value) \
  368. HALMAC_SET_DESC_FIELD_NO_CLR( \
  369. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 7)
  370. #define GET_TX_DESC_SPECIAL_CW(txdesc) \
  371. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, 7)
  372. #endif
  373. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  374. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  375. HALMAC_8812F_SUPPORT)
  376. #define SET_TX_DESC_MACID(txdesc, value) \
  377. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  378. value, 0x7f, 0)
  379. #define SET_TX_DESC_MACID_NO_CLR(txdesc, value) \
  380. HALMAC_SET_DESC_FIELD_NO_CLR( \
  381. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x7f, 0)
  382. #define GET_TX_DESC_MACID(txdesc) \
  383. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x7f, \
  384. 0)
  385. #endif
  386. #if (HALMAC_8814B_SUPPORT)
  387. #define SET_TX_DESC_MACID_V1(txdesc, value) \
  388. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \
  389. value, 0x7f, 0)
  390. #define SET_TX_DESC_MACID_V1_NO_CLR(txdesc, value) \
  391. HALMAC_SET_DESC_FIELD_NO_CLR( \
  392. ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x7f, 0)
  393. #define GET_TX_DESC_MACID_V1(txdesc) \
  394. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x7f, \
  395. 0)
  396. #endif
  397. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  398. HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  399. /*TXDESC_WORD2*/
  400. #define SET_TX_DESC_HW_AES_IV(txdesc, value) \
  401. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  402. value, 0x1, 31)
  403. #define SET_TX_DESC_HW_AES_IV_NO_CLR(txdesc, value) \
  404. HALMAC_SET_DESC_FIELD_NO_CLR( \
  405. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 31)
  406. #define GET_TX_DESC_HW_AES_IV(txdesc) \
  407. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  408. 31)
  409. #endif
  410. #if (HALMAC_8814B_SUPPORT)
  411. #define SET_TX_DESC_CHK_EN_V1(txdesc, value) \
  412. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  413. value, 0x1, 31)
  414. #define SET_TX_DESC_CHK_EN_V1_NO_CLR(txdesc, value) \
  415. HALMAC_SET_DESC_FIELD_NO_CLR( \
  416. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 31)
  417. #define GET_TX_DESC_CHK_EN_V1(txdesc) \
  418. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  419. 31)
  420. #endif
  421. #if (HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8821C_SUPPORT || \
  422. HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  423. #define SET_TX_DESC_FTM_EN(txdesc, value) \
  424. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  425. value, 0x1, 30)
  426. #define SET_TX_DESC_FTM_EN_NO_CLR(txdesc, value) \
  427. HALMAC_SET_DESC_FIELD_NO_CLR( \
  428. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 30)
  429. #define GET_TX_DESC_FTM_EN(txdesc) \
  430. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  431. 30)
  432. #endif
  433. #if (HALMAC_8198F_SUPPORT)
  434. #define SET_TX_DESC_ANTCEL_D_V1(txdesc, value) \
  435. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  436. value, 0xf, 28)
  437. #define SET_TX_DESC_ANTCEL_D_V1_NO_CLR(txdesc, value) \
  438. HALMAC_SET_DESC_FIELD_NO_CLR( \
  439. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0xf, 28)
  440. #define GET_TX_DESC_ANTCEL_D_V1(txdesc) \
  441. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0xf, \
  442. 28)
  443. #endif
  444. #if (HALMAC_8814B_SUPPORT)
  445. #define SET_TX_DESC_DMA_PRI(txdesc, value) \
  446. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  447. value, 0x1, 27)
  448. #define SET_TX_DESC_DMA_PRI_NO_CLR(txdesc, value) \
  449. HALMAC_SET_DESC_FIELD_NO_CLR( \
  450. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 27)
  451. #define GET_TX_DESC_DMA_PRI(txdesc) \
  452. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  453. 27)
  454. #endif
  455. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  456. HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  457. #define SET_TX_DESC_G_ID(txdesc, value) \
  458. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  459. value, 0x3f, 24)
  460. #define SET_TX_DESC_G_ID_NO_CLR(txdesc, value) \
  461. HALMAC_SET_DESC_FIELD_NO_CLR( \
  462. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x3f, 24)
  463. #define GET_TX_DESC_G_ID(txdesc) \
  464. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x3f, \
  465. 24)
  466. #endif
  467. #if (HALMAC_8814B_SUPPORT)
  468. #define SET_TX_DESC_MAX_AMSDU_MODE(txdesc, value) \
  469. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  470. value, 0x7, 24)
  471. #define SET_TX_DESC_MAX_AMSDU_MODE_NO_CLR(txdesc, value) \
  472. HALMAC_SET_DESC_FIELD_NO_CLR( \
  473. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x7, 24)
  474. #define GET_TX_DESC_MAX_AMSDU_MODE(txdesc) \
  475. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x7, \
  476. 24)
  477. #endif
  478. #if (HALMAC_8198F_SUPPORT)
  479. #define SET_TX_DESC_ANTSEL_C_V1(txdesc, value) \
  480. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  481. value, 0xf, 24)
  482. #define SET_TX_DESC_ANTSEL_C_V1_NO_CLR(txdesc, value) \
  483. HALMAC_SET_DESC_FIELD_NO_CLR( \
  484. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0xf, 24)
  485. #define GET_TX_DESC_ANTSEL_C_V1(txdesc) \
  486. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0xf, \
  487. 24)
  488. #endif
  489. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  490. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  491. HALMAC_8812F_SUPPORT)
  492. #define SET_TX_DESC_BT_NULL(txdesc, value) \
  493. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  494. value, 0x1, 23)
  495. #define SET_TX_DESC_BT_NULL_NO_CLR(txdesc, value) \
  496. HALMAC_SET_DESC_FIELD_NO_CLR( \
  497. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 23)
  498. #define GET_TX_DESC_BT_NULL(txdesc) \
  499. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  500. 23)
  501. #define SET_TX_DESC_AMPDU_DENSITY(txdesc, value) \
  502. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  503. value, 0x7, 20)
  504. #define SET_TX_DESC_AMPDU_DENSITY_NO_CLR(txdesc, value) \
  505. HALMAC_SET_DESC_FIELD_NO_CLR( \
  506. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x7, 20)
  507. #define GET_TX_DESC_AMPDU_DENSITY(txdesc) \
  508. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x7, \
  509. 20)
  510. #define SET_TX_DESC_SPE_RPT(txdesc, value) \
  511. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  512. value, 0x1, 19)
  513. #define SET_TX_DESC_SPE_RPT_NO_CLR(txdesc, value) \
  514. HALMAC_SET_DESC_FIELD_NO_CLR( \
  515. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 19)
  516. #define GET_TX_DESC_SPE_RPT(txdesc) \
  517. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  518. 19)
  519. #define SET_TX_DESC_RAW(txdesc, value) \
  520. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  521. value, 0x1, 18)
  522. #define SET_TX_DESC_RAW_NO_CLR(txdesc, value) \
  523. HALMAC_SET_DESC_FIELD_NO_CLR( \
  524. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 18)
  525. #define GET_TX_DESC_RAW(txdesc) \
  526. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  527. 18)
  528. #define SET_TX_DESC_MOREFRAG(txdesc, value) \
  529. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  530. value, 0x1, 17)
  531. #define SET_TX_DESC_MOREFRAG_NO_CLR(txdesc, value) \
  532. HALMAC_SET_DESC_FIELD_NO_CLR( \
  533. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 17)
  534. #define GET_TX_DESC_MOREFRAG(txdesc) \
  535. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  536. 17)
  537. #define SET_TX_DESC_BK(txdesc, value) \
  538. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  539. value, 0x1, 16)
  540. #define SET_TX_DESC_BK_NO_CLR(txdesc, value) \
  541. HALMAC_SET_DESC_FIELD_NO_CLR( \
  542. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 16)
  543. #define GET_TX_DESC_BK(txdesc) \
  544. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  545. 16)
  546. #endif
  547. #if (HALMAC_8814B_SUPPORT)
  548. #define SET_TX_DESC_DMA_TXAGG_NUM_V1(txdesc, value) \
  549. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  550. value, 0xff, 16)
  551. #define SET_TX_DESC_DMA_TXAGG_NUM_V1_NO_CLR(txdesc, value) \
  552. HALMAC_SET_DESC_FIELD_NO_CLR( \
  553. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0xff, 16)
  554. #define GET_TX_DESC_DMA_TXAGG_NUM_V1(txdesc) \
  555. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0xff, \
  556. 16)
  557. #endif
  558. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  559. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  560. HALMAC_8812F_SUPPORT)
  561. #define SET_TX_DESC_NULL_1(txdesc, value) \
  562. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  563. value, 0x1, 15)
  564. #define SET_TX_DESC_NULL_1_NO_CLR(txdesc, value) \
  565. HALMAC_SET_DESC_FIELD_NO_CLR( \
  566. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 15)
  567. #define GET_TX_DESC_NULL_1(txdesc) \
  568. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  569. 15)
  570. #define SET_TX_DESC_NULL_0(txdesc, value) \
  571. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  572. value, 0x1, 14)
  573. #define SET_TX_DESC_NULL_0_NO_CLR(txdesc, value) \
  574. HALMAC_SET_DESC_FIELD_NO_CLR( \
  575. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 14)
  576. #define GET_TX_DESC_NULL_0(txdesc) \
  577. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  578. 14)
  579. #define SET_TX_DESC_RDG_EN(txdesc, value) \
  580. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  581. value, 0x1, 13)
  582. #define SET_TX_DESC_RDG_EN_NO_CLR(txdesc, value) \
  583. HALMAC_SET_DESC_FIELD_NO_CLR( \
  584. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 13)
  585. #define GET_TX_DESC_RDG_EN(txdesc) \
  586. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  587. 13)
  588. #define SET_TX_DESC_AGG_EN(txdesc, value) \
  589. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  590. value, 0x1, 12)
  591. #define SET_TX_DESC_AGG_EN_NO_CLR(txdesc, value) \
  592. HALMAC_SET_DESC_FIELD_NO_CLR( \
  593. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 12)
  594. #define GET_TX_DESC_AGG_EN(txdesc) \
  595. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \
  596. 12)
  597. #define SET_TX_DESC_CCA_RTS(txdesc, value) \
  598. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  599. value, 0x3, 10)
  600. #define SET_TX_DESC_CCA_RTS_NO_CLR(txdesc, value) \
  601. HALMAC_SET_DESC_FIELD_NO_CLR( \
  602. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x3, 10)
  603. #define GET_TX_DESC_CCA_RTS(txdesc) \
  604. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x3, \
  605. 10)
  606. #endif
  607. #if (HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8821C_SUPPORT || \
  608. HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  609. #define SET_TX_DESC_TRI_FRAME(txdesc, value) \
  610. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  611. value, 0x1, 9)
  612. #define SET_TX_DESC_TRI_FRAME_NO_CLR(txdesc, value) \
  613. HALMAC_SET_DESC_FIELD_NO_CLR( \
  614. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 9)
  615. #define GET_TX_DESC_TRI_FRAME(txdesc) \
  616. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, 9)
  617. #endif
  618. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  619. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  620. HALMAC_8812F_SUPPORT)
  621. #define SET_TX_DESC_P_AID(txdesc, value) \
  622. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  623. value, 0x1ff, 0)
  624. #define SET_TX_DESC_P_AID_NO_CLR(txdesc, value) \
  625. HALMAC_SET_DESC_FIELD_NO_CLR( \
  626. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1ff, 0)
  627. #define GET_TX_DESC_P_AID(txdesc) \
  628. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, \
  629. 0x1ff, 0)
  630. #endif
  631. #if (HALMAC_8814B_SUPPORT)
  632. #define SET_TX_DESC_TXDESC_CHECKSUM_V1(txdesc, value) \
  633. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \
  634. value, 0xffff, 0)
  635. #define SET_TX_DESC_TXDESC_CHECKSUM_V1_NO_CLR(txdesc, value) \
  636. HALMAC_SET_DESC_FIELD_NO_CLR( \
  637. ((struct halmac_tx_desc *)txdesc)->dword2, value, 0xffff, 0)
  638. #define GET_TX_DESC_TXDESC_CHECKSUM_V1(txdesc) \
  639. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, \
  640. 0xffff, 0)
  641. #endif
  642. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  643. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  644. HALMAC_8812F_SUPPORT)
  645. /*TXDESC_WORD3*/
  646. #define SET_TX_DESC_AMPDU_MAX_TIME(txdesc, value) \
  647. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  648. value, 0xff, 24)
  649. #define SET_TX_DESC_AMPDU_MAX_TIME_NO_CLR(txdesc, value) \
  650. HALMAC_SET_DESC_FIELD_NO_CLR( \
  651. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0xff, 24)
  652. #define GET_TX_DESC_AMPDU_MAX_TIME(txdesc) \
  653. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0xff, \
  654. 24)
  655. #define SET_TX_DESC_NDPA(txdesc, value) \
  656. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  657. value, 0x3, 22)
  658. #define SET_TX_DESC_NDPA_NO_CLR(txdesc, value) \
  659. HALMAC_SET_DESC_FIELD_NO_CLR( \
  660. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x3, 22)
  661. #define GET_TX_DESC_NDPA(txdesc) \
  662. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x3, \
  663. 22)
  664. #define SET_TX_DESC_MAX_AGG_NUM(txdesc, value) \
  665. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  666. value, 0x1f, 17)
  667. #define SET_TX_DESC_MAX_AGG_NUM_NO_CLR(txdesc, value) \
  668. HALMAC_SET_DESC_FIELD_NO_CLR( \
  669. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1f, 17)
  670. #define GET_TX_DESC_MAX_AGG_NUM(txdesc) \
  671. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1f, \
  672. 17)
  673. #define SET_TX_DESC_USE_MAX_TIME_EN(txdesc, value) \
  674. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  675. value, 0x1, 16)
  676. #define SET_TX_DESC_USE_MAX_TIME_EN_NO_CLR(txdesc, value) \
  677. HALMAC_SET_DESC_FIELD_NO_CLR( \
  678. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 16)
  679. #define GET_TX_DESC_USE_MAX_TIME_EN(txdesc) \
  680. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, \
  681. 16)
  682. #endif
  683. #if (HALMAC_8814B_SUPPORT)
  684. #define SET_TX_DESC_OFFLOAD_SIZE(txdesc, value) \
  685. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  686. value, 0x7fff, 16)
  687. #define SET_TX_DESC_OFFLOAD_SIZE_NO_CLR(txdesc, value) \
  688. HALMAC_SET_DESC_FIELD_NO_CLR( \
  689. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x7fff, 16)
  690. #define GET_TX_DESC_OFFLOAD_SIZE(txdesc) \
  691. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, \
  692. 0x7fff, 16)
  693. #endif
  694. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  695. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  696. HALMAC_8812F_SUPPORT)
  697. #define SET_TX_DESC_NAVUSEHDR(txdesc, value) \
  698. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  699. value, 0x1, 15)
  700. #define SET_TX_DESC_NAVUSEHDR_NO_CLR(txdesc, value) \
  701. HALMAC_SET_DESC_FIELD_NO_CLR( \
  702. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 15)
  703. #define GET_TX_DESC_NAVUSEHDR(txdesc) \
  704. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, \
  705. 15)
  706. #define SET_TX_DESC_CHK_EN(txdesc, value) \
  707. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  708. value, 0x1, 14)
  709. #define SET_TX_DESC_CHK_EN_NO_CLR(txdesc, value) \
  710. HALMAC_SET_DESC_FIELD_NO_CLR( \
  711. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 14)
  712. #define GET_TX_DESC_CHK_EN(txdesc) \
  713. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, \
  714. 14)
  715. #define SET_TX_DESC_HW_RTS_EN(txdesc, value) \
  716. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  717. value, 0x1, 13)
  718. #define SET_TX_DESC_HW_RTS_EN_NO_CLR(txdesc, value) \
  719. HALMAC_SET_DESC_FIELD_NO_CLR( \
  720. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 13)
  721. #define GET_TX_DESC_HW_RTS_EN(txdesc) \
  722. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, \
  723. 13)
  724. #define SET_TX_DESC_RTSEN(txdesc, value) \
  725. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  726. value, 0x1, 12)
  727. #define SET_TX_DESC_RTSEN_NO_CLR(txdesc, value) \
  728. HALMAC_SET_DESC_FIELD_NO_CLR( \
  729. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 12)
  730. #define GET_TX_DESC_RTSEN(txdesc) \
  731. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, \
  732. 12)
  733. #define SET_TX_DESC_CTS2SELF(txdesc, value) \
  734. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  735. value, 0x1, 11)
  736. #define SET_TX_DESC_CTS2SELF_NO_CLR(txdesc, value) \
  737. HALMAC_SET_DESC_FIELD_NO_CLR( \
  738. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 11)
  739. #define GET_TX_DESC_CTS2SELF(txdesc) \
  740. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, \
  741. 11)
  742. #endif
  743. #if (HALMAC_8814B_SUPPORT)
  744. #define SET_TX_DESC_CHANNEL_DMA(txdesc, value) \
  745. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  746. value, 0x1f, 11)
  747. #define SET_TX_DESC_CHANNEL_DMA_NO_CLR(txdesc, value) \
  748. HALMAC_SET_DESC_FIELD_NO_CLR( \
  749. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1f, 11)
  750. #define GET_TX_DESC_CHANNEL_DMA(txdesc) \
  751. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1f, \
  752. 11)
  753. #endif
  754. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  755. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  756. HALMAC_8812F_SUPPORT)
  757. #define SET_TX_DESC_DISDATAFB(txdesc, value) \
  758. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  759. value, 0x1, 10)
  760. #define SET_TX_DESC_DISDATAFB_NO_CLR(txdesc, value) \
  761. HALMAC_SET_DESC_FIELD_NO_CLR( \
  762. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 10)
  763. #define GET_TX_DESC_DISDATAFB(txdesc) \
  764. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, \
  765. 10)
  766. #define SET_TX_DESC_DISRTSFB(txdesc, value) \
  767. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  768. value, 0x1, 9)
  769. #define SET_TX_DESC_DISRTSFB_NO_CLR(txdesc, value) \
  770. HALMAC_SET_DESC_FIELD_NO_CLR( \
  771. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 9)
  772. #define GET_TX_DESC_DISRTSFB(txdesc) \
  773. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, 9)
  774. #define SET_TX_DESC_USE_RATE(txdesc, value) \
  775. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  776. value, 0x1, 8)
  777. #define SET_TX_DESC_USE_RATE_NO_CLR(txdesc, value) \
  778. HALMAC_SET_DESC_FIELD_NO_CLR( \
  779. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 8)
  780. #define GET_TX_DESC_USE_RATE(txdesc) \
  781. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, 8)
  782. #define SET_TX_DESC_HW_SSN_SEL(txdesc, value) \
  783. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  784. value, 0x3, 6)
  785. #define SET_TX_DESC_HW_SSN_SEL_NO_CLR(txdesc, value) \
  786. HALMAC_SET_DESC_FIELD_NO_CLR( \
  787. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x3, 6)
  788. #define GET_TX_DESC_HW_SSN_SEL(txdesc) \
  789. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x3, 6)
  790. #endif
  791. #if (HALMAC_8814B_SUPPORT)
  792. #define SET_TX_DESC_IE_CNT(txdesc, value) \
  793. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  794. value, 0x7, 6)
  795. #define SET_TX_DESC_IE_CNT_NO_CLR(txdesc, value) \
  796. HALMAC_SET_DESC_FIELD_NO_CLR( \
  797. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x7, 6)
  798. #define GET_TX_DESC_IE_CNT(txdesc) \
  799. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x7, 6)
  800. #define SET_TX_DESC_IE_CNT_EN(txdesc, value) \
  801. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  802. value, 0x1, 5)
  803. #define SET_TX_DESC_IE_CNT_EN_NO_CLR(txdesc, value) \
  804. HALMAC_SET_DESC_FIELD_NO_CLR( \
  805. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 5)
  806. #define GET_TX_DESC_IE_CNT_EN(txdesc) \
  807. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, 5)
  808. #endif
  809. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  810. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  811. HALMAC_8812F_SUPPORT)
  812. #define SET_TX_DESC_WHEADER_LEN(txdesc, value) \
  813. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  814. value, 0x1f, 0)
  815. #define SET_TX_DESC_WHEADER_LEN_NO_CLR(txdesc, value) \
  816. HALMAC_SET_DESC_FIELD_NO_CLR( \
  817. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1f, 0)
  818. #define GET_TX_DESC_WHEADER_LEN(txdesc) \
  819. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1f, \
  820. 0)
  821. #endif
  822. #if (HALMAC_8814B_SUPPORT)
  823. #define SET_TX_DESC_WHEADER_LEN_V1(txdesc, value) \
  824. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \
  825. value, 0x1f, 0)
  826. #define SET_TX_DESC_WHEADER_LEN_V1_NO_CLR(txdesc, value) \
  827. HALMAC_SET_DESC_FIELD_NO_CLR( \
  828. ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1f, 0)
  829. #define GET_TX_DESC_WHEADER_LEN_V1(txdesc) \
  830. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1f, \
  831. 0)
  832. #endif
  833. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  834. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  835. HALMAC_8812F_SUPPORT)
  836. /*TXDESC_WORD4*/
  837. #define SET_TX_DESC_PCTS_MASK_IDX(txdesc, value) \
  838. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  839. value, 0x3, 30)
  840. #define SET_TX_DESC_PCTS_MASK_IDX_NO_CLR(txdesc, value) \
  841. HALMAC_SET_DESC_FIELD_NO_CLR( \
  842. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x3, 30)
  843. #define GET_TX_DESC_PCTS_MASK_IDX(txdesc) \
  844. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x3, \
  845. 30)
  846. #define SET_TX_DESC_PCTS_EN(txdesc, value) \
  847. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  848. value, 0x1, 29)
  849. #define SET_TX_DESC_PCTS_EN_NO_CLR(txdesc, value) \
  850. HALMAC_SET_DESC_FIELD_NO_CLR( \
  851. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1, 29)
  852. #define GET_TX_DESC_PCTS_EN(txdesc) \
  853. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1, \
  854. 29)
  855. #define SET_TX_DESC_RTSRATE(txdesc, value) \
  856. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  857. value, 0x1f, 24)
  858. #define SET_TX_DESC_RTSRATE_NO_CLR(txdesc, value) \
  859. HALMAC_SET_DESC_FIELD_NO_CLR( \
  860. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1f, 24)
  861. #define GET_TX_DESC_RTSRATE(txdesc) \
  862. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1f, \
  863. 24)
  864. #define SET_TX_DESC_RTS_DATA_RTY_LMT(txdesc, value) \
  865. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  866. value, 0x3f, 18)
  867. #define SET_TX_DESC_RTS_DATA_RTY_LMT_NO_CLR(txdesc, value) \
  868. HALMAC_SET_DESC_FIELD_NO_CLR( \
  869. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x3f, 18)
  870. #define GET_TX_DESC_RTS_DATA_RTY_LMT(txdesc) \
  871. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x3f, \
  872. 18)
  873. #define SET_TX_DESC_RTY_LMT_EN(txdesc, value) \
  874. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  875. value, 0x1, 17)
  876. #define SET_TX_DESC_RTY_LMT_EN_NO_CLR(txdesc, value) \
  877. HALMAC_SET_DESC_FIELD_NO_CLR( \
  878. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1, 17)
  879. #define GET_TX_DESC_RTY_LMT_EN(txdesc) \
  880. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1, \
  881. 17)
  882. #define SET_TX_DESC_RTS_RTY_LOWEST_RATE(txdesc, value) \
  883. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  884. value, 0xf, 13)
  885. #define SET_TX_DESC_RTS_RTY_LOWEST_RATE_NO_CLR(txdesc, value) \
  886. HALMAC_SET_DESC_FIELD_NO_CLR( \
  887. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0xf, 13)
  888. #define GET_TX_DESC_RTS_RTY_LOWEST_RATE(txdesc) \
  889. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0xf, \
  890. 13)
  891. #define SET_TX_DESC_DATA_RTY_LOWEST_RATE(txdesc, value) \
  892. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  893. value, 0x1f, 8)
  894. #define SET_TX_DESC_DATA_RTY_LOWEST_RATE_NO_CLR(txdesc, value) \
  895. HALMAC_SET_DESC_FIELD_NO_CLR( \
  896. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1f, 8)
  897. #define GET_TX_DESC_DATA_RTY_LOWEST_RATE(txdesc) \
  898. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1f, \
  899. 8)
  900. #define SET_TX_DESC_TRY_RATE(txdesc, value) \
  901. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  902. value, 0x1, 7)
  903. #define SET_TX_DESC_TRY_RATE_NO_CLR(txdesc, value) \
  904. HALMAC_SET_DESC_FIELD_NO_CLR( \
  905. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1, 7)
  906. #define GET_TX_DESC_TRY_RATE(txdesc) \
  907. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1, 7)
  908. #define SET_TX_DESC_DATARATE(txdesc, value) \
  909. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \
  910. value, 0x7f, 0)
  911. #define SET_TX_DESC_DATARATE_NO_CLR(txdesc, value) \
  912. HALMAC_SET_DESC_FIELD_NO_CLR( \
  913. ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x7f, 0)
  914. #define GET_TX_DESC_DATARATE(txdesc) \
  915. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x7f, \
  916. 0)
  917. /*TXDESC_WORD5*/
  918. #define SET_TX_DESC_POLLUTED(txdesc, value) \
  919. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  920. value, 0x1, 31)
  921. #define SET_TX_DESC_POLLUTED_NO_CLR(txdesc, value) \
  922. HALMAC_SET_DESC_FIELD_NO_CLR( \
  923. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 31)
  924. #define GET_TX_DESC_POLLUTED(txdesc) \
  925. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \
  926. 31)
  927. #endif
  928. #if (HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  929. #define SET_TX_DESC_ANTSEL_EN_V1(txdesc, value) \
  930. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  931. value, 0x1, 30)
  932. #define SET_TX_DESC_ANTSEL_EN_V1_NO_CLR(txdesc, value) \
  933. HALMAC_SET_DESC_FIELD_NO_CLR( \
  934. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 30)
  935. #define GET_TX_DESC_ANTSEL_EN_V1(txdesc) \
  936. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \
  937. 30)
  938. #endif
  939. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  940. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT)
  941. #define SET_TX_DESC_TXPWR_OFSET(txdesc, value) \
  942. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  943. value, 0x7, 28)
  944. #define SET_TX_DESC_TXPWR_OFSET_NO_CLR(txdesc, value) \
  945. HALMAC_SET_DESC_FIELD_NO_CLR( \
  946. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x7, 28)
  947. #define GET_TX_DESC_TXPWR_OFSET(txdesc) \
  948. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x7, \
  949. 28)
  950. #endif
  951. #if (HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  952. #define SET_TX_DESC_TXPWR_OFSET_TYPE(txdesc, value) \
  953. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  954. value, 0x3, 28)
  955. #define SET_TX_DESC_TXPWR_OFSET_TYPE_NO_CLR(txdesc, value) \
  956. HALMAC_SET_DESC_FIELD_NO_CLR( \
  957. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 28)
  958. #define GET_TX_DESC_TXPWR_OFSET_TYPE(txdesc) \
  959. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3, \
  960. 28)
  961. #endif
  962. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  963. HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  964. #define SET_TX_DESC_TX_ANT(txdesc, value) \
  965. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  966. value, 0xf, 24)
  967. #define SET_TX_DESC_TX_ANT_NO_CLR(txdesc, value) \
  968. HALMAC_SET_DESC_FIELD_NO_CLR( \
  969. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0xf, 24)
  970. #define GET_TX_DESC_TX_ANT(txdesc) \
  971. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0xf, \
  972. 24)
  973. #endif
  974. #if (HALMAC_8198F_SUPPORT)
  975. #define SET_TX_DESC_DROP_ID(txdesc, value) \
  976. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  977. value, 0x3, 24)
  978. #define SET_TX_DESC_DROP_ID_NO_CLR(txdesc, value) \
  979. HALMAC_SET_DESC_FIELD_NO_CLR( \
  980. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 24)
  981. #define GET_TX_DESC_DROP_ID(txdesc) \
  982. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3, \
  983. 24)
  984. #endif
  985. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  986. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  987. HALMAC_8812F_SUPPORT)
  988. #define SET_TX_DESC_PORT_ID(txdesc, value) \
  989. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  990. value, 0x7, 21)
  991. #define SET_TX_DESC_PORT_ID_NO_CLR(txdesc, value) \
  992. HALMAC_SET_DESC_FIELD_NO_CLR( \
  993. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x7, 21)
  994. #define GET_TX_DESC_PORT_ID(txdesc) \
  995. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x7, \
  996. 21)
  997. #endif
  998. #if (HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8821C_SUPPORT || \
  999. HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  1000. #define SET_TX_DESC_MULTIPLE_PORT(txdesc, value) \
  1001. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  1002. value, 0x7, 18)
  1003. #define SET_TX_DESC_MULTIPLE_PORT_NO_CLR(txdesc, value) \
  1004. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1005. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x7, 18)
  1006. #define GET_TX_DESC_MULTIPLE_PORT(txdesc) \
  1007. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x7, \
  1008. 18)
  1009. #endif
  1010. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1011. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  1012. HALMAC_8812F_SUPPORT)
  1013. #define SET_TX_DESC_SIGNALING_TAPKT_EN(txdesc, value) \
  1014. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  1015. value, 0x1, 17)
  1016. #define SET_TX_DESC_SIGNALING_TAPKT_EN_NO_CLR(txdesc, value) \
  1017. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1018. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 17)
  1019. #define GET_TX_DESC_SIGNALING_TAPKT_EN(txdesc) \
  1020. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \
  1021. 17)
  1022. #endif
  1023. #if (HALMAC_8814A_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8198F_SUPPORT)
  1024. #define SET_TX_DESC_RTS_SC(txdesc, value) \
  1025. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  1026. value, 0xf, 13)
  1027. #define SET_TX_DESC_RTS_SC_NO_CLR(txdesc, value) \
  1028. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1029. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0xf, 13)
  1030. #define GET_TX_DESC_RTS_SC(txdesc) \
  1031. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0xf, \
  1032. 13)
  1033. #endif
  1034. #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || \
  1035. HALMAC_8812F_SUPPORT)
  1036. #define SET_TX_DESC_SIGNALING_TA_PKT_SC(txdesc, value) \
  1037. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  1038. value, 0xf, 13)
  1039. #define SET_TX_DESC_SIGNALING_TA_PKT_SC_NO_CLR(txdesc, value) \
  1040. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1041. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0xf, 13)
  1042. #define GET_TX_DESC_SIGNALING_TA_PKT_SC(txdesc) \
  1043. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0xf, \
  1044. 13)
  1045. #endif
  1046. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1047. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  1048. HALMAC_8812F_SUPPORT)
  1049. #define SET_TX_DESC_RTS_SHORT(txdesc, value) \
  1050. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  1051. value, 0x1, 12)
  1052. #define SET_TX_DESC_RTS_SHORT_NO_CLR(txdesc, value) \
  1053. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1054. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 12)
  1055. #define GET_TX_DESC_RTS_SHORT(txdesc) \
  1056. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \
  1057. 12)
  1058. #define SET_TX_DESC_VCS_STBC(txdesc, value) \
  1059. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  1060. value, 0x3, 10)
  1061. #define SET_TX_DESC_VCS_STBC_NO_CLR(txdesc, value) \
  1062. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1063. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 10)
  1064. #define GET_TX_DESC_VCS_STBC(txdesc) \
  1065. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3, \
  1066. 10)
  1067. #define SET_TX_DESC_DATA_STBC(txdesc, value) \
  1068. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  1069. value, 0x3, 8)
  1070. #define SET_TX_DESC_DATA_STBC_NO_CLR(txdesc, value) \
  1071. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1072. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 8)
  1073. #define GET_TX_DESC_DATA_STBC(txdesc) \
  1074. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3, 8)
  1075. #define SET_TX_DESC_DATA_LDPC(txdesc, value) \
  1076. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  1077. value, 0x1, 7)
  1078. #define SET_TX_DESC_DATA_LDPC_NO_CLR(txdesc, value) \
  1079. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1080. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 7)
  1081. #define GET_TX_DESC_DATA_LDPC(txdesc) \
  1082. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, 7)
  1083. #define SET_TX_DESC_DATA_BW(txdesc, value) \
  1084. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  1085. value, 0x3, 5)
  1086. #define SET_TX_DESC_DATA_BW_NO_CLR(txdesc, value) \
  1087. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1088. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 5)
  1089. #define GET_TX_DESC_DATA_BW(txdesc) \
  1090. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3, 5)
  1091. #define SET_TX_DESC_DATA_SHORT(txdesc, value) \
  1092. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  1093. value, 0x1, 4)
  1094. #define SET_TX_DESC_DATA_SHORT_NO_CLR(txdesc, value) \
  1095. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1096. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 4)
  1097. #define GET_TX_DESC_DATA_SHORT(txdesc) \
  1098. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, 4)
  1099. #define SET_TX_DESC_DATA_SC(txdesc, value) \
  1100. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \
  1101. value, 0xf, 0)
  1102. #define SET_TX_DESC_DATA_SC_NO_CLR(txdesc, value) \
  1103. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1104. ((struct halmac_tx_desc *)txdesc)->dword5, value, 0xf, 0)
  1105. #define GET_TX_DESC_DATA_SC(txdesc) \
  1106. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0xf, 0)
  1107. #endif
  1108. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1109. HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  1110. /*TXDESC_WORD6*/
  1111. #define SET_TX_DESC_ANTSEL_D(txdesc, value) \
  1112. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1113. value, 0x3, 30)
  1114. #define SET_TX_DESC_ANTSEL_D_NO_CLR(txdesc, value) \
  1115. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1116. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 30)
  1117. #define GET_TX_DESC_ANTSEL_D(txdesc) \
  1118. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  1119. 30)
  1120. #endif
  1121. #if (HALMAC_8198F_SUPPORT)
  1122. #define SET_TX_DESC_ANT_MAPD_V1(txdesc, value) \
  1123. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1124. value, 0x3, 30)
  1125. #define SET_TX_DESC_ANT_MAPD_V1_NO_CLR(txdesc, value) \
  1126. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1127. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 30)
  1128. #define GET_TX_DESC_ANT_MAPD_V1(txdesc) \
  1129. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  1130. 30)
  1131. #endif
  1132. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1133. HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  1134. #define SET_TX_DESC_ANT_MAPD(txdesc, value) \
  1135. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1136. value, 0x3, 28)
  1137. #define SET_TX_DESC_ANT_MAPD_NO_CLR(txdesc, value) \
  1138. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1139. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 28)
  1140. #define GET_TX_DESC_ANT_MAPD(txdesc) \
  1141. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  1142. 28)
  1143. #endif
  1144. #if (HALMAC_8198F_SUPPORT)
  1145. #define SET_TX_DESC_ANT_MAPC_V1(txdesc, value) \
  1146. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1147. value, 0x3, 28)
  1148. #define SET_TX_DESC_ANT_MAPC_V1_NO_CLR(txdesc, value) \
  1149. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1150. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 28)
  1151. #define GET_TX_DESC_ANT_MAPC_V1(txdesc) \
  1152. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  1153. 28)
  1154. #endif
  1155. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1156. HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  1157. #define SET_TX_DESC_ANT_MAPC(txdesc, value) \
  1158. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1159. value, 0x3, 26)
  1160. #define SET_TX_DESC_ANT_MAPC_NO_CLR(txdesc, value) \
  1161. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1162. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 26)
  1163. #define GET_TX_DESC_ANT_MAPC(txdesc) \
  1164. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  1165. 26)
  1166. #endif
  1167. #if (HALMAC_8198F_SUPPORT)
  1168. #define SET_TX_DESC_ANT_MAPB_V1(txdesc, value) \
  1169. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1170. value, 0x3, 26)
  1171. #define SET_TX_DESC_ANT_MAPB_V1_NO_CLR(txdesc, value) \
  1172. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1173. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 26)
  1174. #define GET_TX_DESC_ANT_MAPB_V1(txdesc) \
  1175. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  1176. 26)
  1177. #endif
  1178. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1179. HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  1180. #define SET_TX_DESC_ANT_MAPB(txdesc, value) \
  1181. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1182. value, 0x3, 24)
  1183. #define SET_TX_DESC_ANT_MAPB_NO_CLR(txdesc, value) \
  1184. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1185. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 24)
  1186. #define GET_TX_DESC_ANT_MAPB(txdesc) \
  1187. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  1188. 24)
  1189. #endif
  1190. #if (HALMAC_8198F_SUPPORT)
  1191. #define SET_TX_DESC_ANT_MAPA_V1(txdesc, value) \
  1192. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1193. value, 0x3, 24)
  1194. #define SET_TX_DESC_ANT_MAPA_V1_NO_CLR(txdesc, value) \
  1195. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1196. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 24)
  1197. #define GET_TX_DESC_ANT_MAPA_V1(txdesc) \
  1198. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  1199. 24)
  1200. #endif
  1201. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1202. HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  1203. #define SET_TX_DESC_ANT_MAPA(txdesc, value) \
  1204. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1205. value, 0x3, 22)
  1206. #define SET_TX_DESC_ANT_MAPA_NO_CLR(txdesc, value) \
  1207. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1208. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 22)
  1209. #define GET_TX_DESC_ANT_MAPA(txdesc) \
  1210. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  1211. 22)
  1212. #define SET_TX_DESC_ANTSEL_C(txdesc, value) \
  1213. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1214. value, 0x3, 20)
  1215. #define SET_TX_DESC_ANTSEL_C_NO_CLR(txdesc, value) \
  1216. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1217. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 20)
  1218. #define GET_TX_DESC_ANTSEL_C(txdesc) \
  1219. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  1220. 20)
  1221. #endif
  1222. #if (HALMAC_8198F_SUPPORT)
  1223. #define SET_TX_DESC_ANTSEL_B_V1(txdesc, value) \
  1224. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1225. value, 0xf, 20)
  1226. #define SET_TX_DESC_ANTSEL_B_V1_NO_CLR(txdesc, value) \
  1227. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1228. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0xf, 20)
  1229. #define GET_TX_DESC_ANTSEL_B_V1(txdesc) \
  1230. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0xf, \
  1231. 20)
  1232. #endif
  1233. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1234. HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  1235. #define SET_TX_DESC_ANTSEL_B(txdesc, value) \
  1236. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1237. value, 0x3, 18)
  1238. #define SET_TX_DESC_ANTSEL_B_NO_CLR(txdesc, value) \
  1239. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1240. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 18)
  1241. #define GET_TX_DESC_ANTSEL_B(txdesc) \
  1242. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  1243. 18)
  1244. #define SET_TX_DESC_ANTSEL_A(txdesc, value) \
  1245. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1246. value, 0x3, 16)
  1247. #define SET_TX_DESC_ANTSEL_A_NO_CLR(txdesc, value) \
  1248. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1249. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 16)
  1250. #define GET_TX_DESC_ANTSEL_A(txdesc) \
  1251. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \
  1252. 16)
  1253. #endif
  1254. #if (HALMAC_8198F_SUPPORT)
  1255. #define SET_TX_DESC_ANTSEL_A_V1(txdesc, value) \
  1256. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1257. value, 0xf, 16)
  1258. #define SET_TX_DESC_ANTSEL_A_V1_NO_CLR(txdesc, value) \
  1259. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1260. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0xf, 16)
  1261. #define GET_TX_DESC_ANTSEL_A_V1(txdesc) \
  1262. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0xf, \
  1263. 16)
  1264. #endif
  1265. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1266. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  1267. HALMAC_8812F_SUPPORT)
  1268. #define SET_TX_DESC_MBSSID(txdesc, value) \
  1269. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1270. value, 0xf, 12)
  1271. #define SET_TX_DESC_MBSSID_NO_CLR(txdesc, value) \
  1272. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1273. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0xf, 12)
  1274. #define GET_TX_DESC_MBSSID(txdesc) \
  1275. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0xf, \
  1276. 12)
  1277. #endif
  1278. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1279. HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT)
  1280. #define SET_TX_DESC_SW_DEFINE(txdesc, value) \
  1281. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1282. value, 0xfff, 0)
  1283. #define SET_TX_DESC_SW_DEFINE_NO_CLR(txdesc, value) \
  1284. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1285. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0xfff, 0)
  1286. #define GET_TX_DESC_SW_DEFINE(txdesc) \
  1287. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, \
  1288. 0xfff, 0)
  1289. #endif
  1290. #if (HALMAC_8198F_SUPPORT)
  1291. #define SET_TX_DESC_SWPS_SEQ(txdesc, value) \
  1292. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \
  1293. value, 0xfff, 0)
  1294. #define SET_TX_DESC_SWPS_SEQ_NO_CLR(txdesc, value) \
  1295. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1296. ((struct halmac_tx_desc *)txdesc)->dword6, value, 0xfff, 0)
  1297. #define GET_TX_DESC_SWPS_SEQ(txdesc) \
  1298. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, \
  1299. 0xfff, 0)
  1300. #endif
  1301. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1302. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  1303. HALMAC_8812F_SUPPORT)
  1304. /*TXDESC_WORD7*/
  1305. #define SET_TX_DESC_DMA_TXAGG_NUM(txdesc, value) \
  1306. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \
  1307. value, 0xff, 24)
  1308. #define SET_TX_DESC_DMA_TXAGG_NUM_NO_CLR(txdesc, value) \
  1309. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1310. ((struct halmac_tx_desc *)txdesc)->dword7, value, 0xff, 24)
  1311. #define GET_TX_DESC_DMA_TXAGG_NUM(txdesc) \
  1312. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0xff, \
  1313. 24)
  1314. #define SET_TX_DESC_FINAL_DATA_RATE(txdesc, value) \
  1315. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \
  1316. value, 0xff, 24)
  1317. #define SET_TX_DESC_FINAL_DATA_RATE_NO_CLR(txdesc, value) \
  1318. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1319. ((struct halmac_tx_desc *)txdesc)->dword7, value, 0xff, 24)
  1320. #define GET_TX_DESC_FINAL_DATA_RATE(txdesc) \
  1321. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0xff, \
  1322. 24)
  1323. #define SET_TX_DESC_NTX_MAP(txdesc, value) \
  1324. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \
  1325. value, 0xf, 20)
  1326. #define SET_TX_DESC_NTX_MAP_NO_CLR(txdesc, value) \
  1327. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1328. ((struct halmac_tx_desc *)txdesc)->dword7, value, 0xf, 20)
  1329. #define GET_TX_DESC_NTX_MAP(txdesc) \
  1330. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0xf, \
  1331. 20)
  1332. #endif
  1333. #if (HALMAC_8198F_SUPPORT)
  1334. #define SET_TX_DESC_ANTSEL_EN(txdesc, value) \
  1335. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \
  1336. value, 0x1, 19)
  1337. #define SET_TX_DESC_ANTSEL_EN_NO_CLR(txdesc, value) \
  1338. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1339. ((struct halmac_tx_desc *)txdesc)->dword7, value, 0x1, 19)
  1340. #define GET_TX_DESC_ANTSEL_EN(txdesc) \
  1341. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0x1, \
  1342. 19)
  1343. #define SET_TX_DESC_MBSSID_EX(txdesc, value) \
  1344. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \
  1345. value, 0x7, 16)
  1346. #define SET_TX_DESC_MBSSID_EX_NO_CLR(txdesc, value) \
  1347. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1348. ((struct halmac_tx_desc *)txdesc)->dword7, value, 0x7, 16)
  1349. #define GET_TX_DESC_MBSSID_EX(txdesc) \
  1350. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0x7, \
  1351. 16)
  1352. #endif
  1353. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1354. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  1355. HALMAC_8812F_SUPPORT)
  1356. #define SET_TX_DESC_TX_BUFF_SIZE(txdesc, value) \
  1357. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \
  1358. value, 0xffff, 0)
  1359. #define SET_TX_DESC_TX_BUFF_SIZE_NO_CLR(txdesc, value) \
  1360. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1361. ((struct halmac_tx_desc *)txdesc)->dword7, value, 0xffff, 0)
  1362. #define GET_TX_DESC_TX_BUFF_SIZE(txdesc) \
  1363. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, \
  1364. 0xffff, 0)
  1365. #define SET_TX_DESC_TXDESC_CHECKSUM(txdesc, value) \
  1366. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \
  1367. value, 0xffff, 0)
  1368. #define SET_TX_DESC_TXDESC_CHECKSUM_NO_CLR(txdesc, value) \
  1369. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1370. ((struct halmac_tx_desc *)txdesc)->dword7, value, 0xffff, 0)
  1371. #define GET_TX_DESC_TXDESC_CHECKSUM(txdesc) \
  1372. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, \
  1373. 0xffff, 0)
  1374. #define SET_TX_DESC_TIMESTAMP(txdesc, value) \
  1375. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \
  1376. value, 0xffff, 0)
  1377. #define SET_TX_DESC_TIMESTAMP_NO_CLR(txdesc, value) \
  1378. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1379. ((struct halmac_tx_desc *)txdesc)->dword7, value, 0xffff, 0)
  1380. #define GET_TX_DESC_TIMESTAMP(txdesc) \
  1381. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, \
  1382. 0xffff, 0)
  1383. /*TXDESC_WORD8*/
  1384. #define SET_TX_DESC_TXWIFI_CP(txdesc, value) \
  1385. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1386. value, 0x1, 31)
  1387. #define SET_TX_DESC_TXWIFI_CP_NO_CLR(txdesc, value) \
  1388. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1389. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 31)
  1390. #define GET_TX_DESC_TXWIFI_CP(txdesc) \
  1391. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1, \
  1392. 31)
  1393. #define SET_TX_DESC_MAC_CP(txdesc, value) \
  1394. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1395. value, 0x1, 30)
  1396. #define SET_TX_DESC_MAC_CP_NO_CLR(txdesc, value) \
  1397. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1398. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 30)
  1399. #define GET_TX_DESC_MAC_CP(txdesc) \
  1400. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1, \
  1401. 30)
  1402. #define SET_TX_DESC_STW_PKTRE_DIS(txdesc, value) \
  1403. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1404. value, 0x1, 29)
  1405. #define SET_TX_DESC_STW_PKTRE_DIS_NO_CLR(txdesc, value) \
  1406. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1407. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 29)
  1408. #define GET_TX_DESC_STW_PKTRE_DIS(txdesc) \
  1409. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1, \
  1410. 29)
  1411. #define SET_TX_DESC_STW_RB_DIS(txdesc, value) \
  1412. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1413. value, 0x1, 28)
  1414. #define SET_TX_DESC_STW_RB_DIS_NO_CLR(txdesc, value) \
  1415. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1416. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 28)
  1417. #define GET_TX_DESC_STW_RB_DIS(txdesc) \
  1418. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1, \
  1419. 28)
  1420. #define SET_TX_DESC_STW_RATE_DIS(txdesc, value) \
  1421. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1422. value, 0x1, 27)
  1423. #define SET_TX_DESC_STW_RATE_DIS_NO_CLR(txdesc, value) \
  1424. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1425. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 27)
  1426. #define GET_TX_DESC_STW_RATE_DIS(txdesc) \
  1427. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1, \
  1428. 27)
  1429. #define SET_TX_DESC_STW_ANT_DIS(txdesc, value) \
  1430. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1431. value, 0x1, 26)
  1432. #define SET_TX_DESC_STW_ANT_DIS_NO_CLR(txdesc, value) \
  1433. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1434. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 26)
  1435. #define GET_TX_DESC_STW_ANT_DIS(txdesc) \
  1436. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1, \
  1437. 26)
  1438. #define SET_TX_DESC_STW_EN(txdesc, value) \
  1439. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1440. value, 0x1, 25)
  1441. #define SET_TX_DESC_STW_EN_NO_CLR(txdesc, value) \
  1442. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1443. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 25)
  1444. #define GET_TX_DESC_STW_EN(txdesc) \
  1445. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1, \
  1446. 25)
  1447. #define SET_TX_DESC_SMH_EN(txdesc, value) \
  1448. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1449. value, 0x1, 24)
  1450. #define SET_TX_DESC_SMH_EN_NO_CLR(txdesc, value) \
  1451. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1452. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 24)
  1453. #define GET_TX_DESC_SMH_EN(txdesc) \
  1454. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1, \
  1455. 24)
  1456. #define SET_TX_DESC_TAILPAGE_L(txdesc, value) \
  1457. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1458. value, 0xff, 24)
  1459. #define SET_TX_DESC_TAILPAGE_L_NO_CLR(txdesc, value) \
  1460. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1461. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xff, 24)
  1462. #define GET_TX_DESC_TAILPAGE_L(txdesc) \
  1463. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xff, \
  1464. 24)
  1465. #define SET_TX_DESC_SDIO_DMASEQ(txdesc, value) \
  1466. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1467. value, 0xff, 16)
  1468. #define SET_TX_DESC_SDIO_DMASEQ_NO_CLR(txdesc, value) \
  1469. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1470. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xff, 16)
  1471. #define GET_TX_DESC_SDIO_DMASEQ(txdesc) \
  1472. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xff, \
  1473. 16)
  1474. #define SET_TX_DESC_NEXTHEADPAGE_L(txdesc, value) \
  1475. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1476. value, 0xff, 16)
  1477. #define SET_TX_DESC_NEXTHEADPAGE_L_NO_CLR(txdesc, value) \
  1478. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1479. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xff, 16)
  1480. #define GET_TX_DESC_NEXTHEADPAGE_L(txdesc) \
  1481. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xff, \
  1482. 16)
  1483. #endif
  1484. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1485. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT)
  1486. #define SET_TX_DESC_EN_HWSEQ(txdesc, value) \
  1487. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1488. value, 0x1, 15)
  1489. #define SET_TX_DESC_EN_HWSEQ_NO_CLR(txdesc, value) \
  1490. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1491. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 15)
  1492. #define GET_TX_DESC_EN_HWSEQ(txdesc) \
  1493. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1, \
  1494. 15)
  1495. #define SET_TX_DESC_EN_HWEXSEQ(txdesc, value) \
  1496. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1497. value, 0x1, 14)
  1498. #define SET_TX_DESC_EN_HWEXSEQ_NO_CLR(txdesc, value) \
  1499. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1500. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 14)
  1501. #define GET_TX_DESC_EN_HWEXSEQ(txdesc) \
  1502. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1, \
  1503. 14)
  1504. #endif
  1505. #if (HALMAC_8812F_SUPPORT)
  1506. #define SET_TX_DESC_EN_HWSEQ_MODE(txdesc, value) \
  1507. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1508. value, 0x3, 14)
  1509. #define SET_TX_DESC_EN_HWSEQ_MODE_NO_CLR(txdesc, value) \
  1510. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1511. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3, 14)
  1512. #define GET_TX_DESC_EN_HWSEQ_MODE(txdesc) \
  1513. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3, \
  1514. 14)
  1515. #endif
  1516. #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \
  1517. HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \
  1518. HALMAC_8812F_SUPPORT)
  1519. #define SET_TX_DESC_DATA_RC(txdesc, value) \
  1520. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1521. value, 0x3f, 8)
  1522. #define SET_TX_DESC_DATA_RC_NO_CLR(txdesc, value) \
  1523. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1524. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3f, 8)
  1525. #define GET_TX_DESC_DATA_RC(txdesc) \
  1526. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3f, \
  1527. 8)
  1528. #define SET_TX_DESC_BAR_RTY_TH(txdesc, value) \
  1529. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1530. value, 0x3, 6)
  1531. #define SET_TX_DESC_BAR_RTY_TH_NO_CLR(txdesc, value) \
  1532. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1533. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3, 6)
  1534. #define GET_TX_DESC_BAR_RTY_TH(txdesc) \
  1535. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3, 6)
  1536. #define SET_TX_DESC_RTS_RC(txdesc, value) \
  1537. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \
  1538. value, 0x3f, 0)
  1539. #define SET_TX_DESC_RTS_RC_NO_CLR(txdesc, value) \
  1540. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1541. ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3f, 0)
  1542. #define GET_TX_DESC_RTS_RC(txdesc) \
  1543. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3f, \
  1544. 0)
  1545. /*TXDESC_WORD9*/
  1546. #define SET_TX_DESC_TAILPAGE_H(txdesc, value) \
  1547. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  1548. value, 0xf, 28)
  1549. #define SET_TX_DESC_TAILPAGE_H_NO_CLR(txdesc, value) \
  1550. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1551. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0xf, 28)
  1552. #define GET_TX_DESC_TAILPAGE_H(txdesc) \
  1553. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0xf, \
  1554. 28)
  1555. #define SET_TX_DESC_NEXTHEADPAGE_H(txdesc, value) \
  1556. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  1557. value, 0xf, 24)
  1558. #define SET_TX_DESC_NEXTHEADPAGE_H_NO_CLR(txdesc, value) \
  1559. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1560. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0xf, 24)
  1561. #define GET_TX_DESC_NEXTHEADPAGE_H(txdesc) \
  1562. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0xf, \
  1563. 24)
  1564. #define SET_TX_DESC_SW_SEQ(txdesc, value) \
  1565. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  1566. value, 0xfff, 12)
  1567. #define SET_TX_DESC_SW_SEQ_NO_CLR(txdesc, value) \
  1568. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1569. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0xfff, 12)
  1570. #define GET_TX_DESC_SW_SEQ(txdesc) \
  1571. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, \
  1572. 0xfff, 12)
  1573. #define SET_TX_DESC_TXBF_PATH(txdesc, value) \
  1574. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  1575. value, 0x1, 11)
  1576. #define SET_TX_DESC_TXBF_PATH_NO_CLR(txdesc, value) \
  1577. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1578. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 11)
  1579. #define GET_TX_DESC_TXBF_PATH(txdesc) \
  1580. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, \
  1581. 11)
  1582. #define SET_TX_DESC_PADDING_LEN(txdesc, value) \
  1583. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  1584. value, 0x7ff, 0)
  1585. #define SET_TX_DESC_PADDING_LEN_NO_CLR(txdesc, value) \
  1586. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1587. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x7ff, 0)
  1588. #define GET_TX_DESC_PADDING_LEN(txdesc) \
  1589. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, \
  1590. 0x7ff, 0)
  1591. #define SET_TX_DESC_GROUP_BIT_IE_OFFSET(txdesc, value) \
  1592. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \
  1593. value, 0xff, 0)
  1594. #define SET_TX_DESC_GROUP_BIT_IE_OFFSET_NO_CLR(txdesc, value) \
  1595. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1596. ((struct halmac_tx_desc *)txdesc)->dword9, value, 0xff, 0)
  1597. #define GET_TX_DESC_GROUP_BIT_IE_OFFSET(txdesc) \
  1598. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0xff, \
  1599. 0)
  1600. #endif
  1601. #if (HALMAC_8812F_SUPPORT)
  1602. /*WORD10*/
  1603. #define SET_TX_DESC_HT_DATA_SND(txdesc, value) \
  1604. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  1605. value, 0x1, 31)
  1606. #define SET_TX_DESC_HT_DATA_SND_NO_CLR(txdesc, value) \
  1607. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1608. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 31)
  1609. #define GET_TX_DESC_HT_DATA_SND(txdesc) \
  1610. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
  1611. 31)
  1612. #define SET_TX_DESC_SHCUT_CAM(txdesc, value) \
  1613. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  1614. value, 0x3f, 16)
  1615. #define SET_TX_DESC_SHCUT_CAM_NO_CLR(txdesc, value) \
  1616. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1617. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x3f, 16)
  1618. #define GET_TX_DESC_SHCUT_CAM(txdesc) \
  1619. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, \
  1620. 0x3f, 16)
  1621. #endif
  1622. #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || \
  1623. HALMAC_8812F_SUPPORT)
  1624. #define SET_TX_DESC_MU_DATARATE(txdesc, value) \
  1625. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  1626. value, 0xff, 8)
  1627. #define SET_TX_DESC_MU_DATARATE_NO_CLR(txdesc, value) \
  1628. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1629. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0xff, 8)
  1630. #define GET_TX_DESC_MU_DATARATE(txdesc) \
  1631. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, \
  1632. 0xff, 8)
  1633. #define SET_TX_DESC_MU_RC(txdesc, value) \
  1634. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  1635. value, 0xf, 4)
  1636. #define SET_TX_DESC_MU_RC_NO_CLR(txdesc, value) \
  1637. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1638. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0xf, 4)
  1639. #define GET_TX_DESC_MU_RC(txdesc) \
  1640. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0xf, \
  1641. 4)
  1642. #endif
  1643. #if (HALMAC_8812F_SUPPORT)
  1644. #define SET_TX_DESC_NDPA_RATE_SEL(txdesc, value) \
  1645. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  1646. value, 0x1, 3)
  1647. #define SET_TX_DESC_NDPA_RATE_SEL_NO_CLR(txdesc, value) \
  1648. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1649. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 3)
  1650. #define GET_TX_DESC_NDPA_RATE_SEL(txdesc) \
  1651. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
  1652. 3)
  1653. #define SET_TX_DESC_HW_NDPA_EN(txdesc, value) \
  1654. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  1655. value, 0x1, 2)
  1656. #define SET_TX_DESC_HW_NDPA_EN_NO_CLR(txdesc, value) \
  1657. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1658. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 2)
  1659. #define GET_TX_DESC_HW_NDPA_EN(txdesc) \
  1660. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \
  1661. 2)
  1662. #endif
  1663. #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || \
  1664. HALMAC_8812F_SUPPORT)
  1665. #define SET_TX_DESC_SND_PKT_SEL(txdesc, value) \
  1666. HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \
  1667. value, 0x3, 0)
  1668. #define SET_TX_DESC_SND_PKT_SEL_NO_CLR(txdesc, value) \
  1669. HALMAC_SET_DESC_FIELD_NO_CLR( \
  1670. ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x3, 0)
  1671. #define GET_TX_DESC_SND_PKT_SEL(txdesc) \
  1672. HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x3, \
  1673. 0)
  1674. #endif
  1675. #endif