halmac_tx_desc_ie_nic.h 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  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_IE_NIC_H_
  16. #define _HALMAC_TX_DESC_IE_NIC_H_
  17. #if (HALMAC_8814B_SUPPORT)
  18. #define IE0_GET_TX_DESC_IE_END(txdesc_ie) \
  19. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 31, 1)
  20. #define IE0_SET_TX_DESC_IE_END(txdesc_ie, value) \
  21. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 31, 1, value)
  22. #define IE0_GET_TX_DESC_IE_UP(txdesc_ie) \
  23. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 30, 1)
  24. #define IE0_SET_TX_DESC_IE_UP(txdesc_ie, value) \
  25. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 30, 1, value)
  26. #define IE0_GET_TX_DESC_IE_NUM(txdesc_ie) \
  27. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 24, 4)
  28. #define IE0_SET_TX_DESC_IE_NUM(txdesc_ie, value) \
  29. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 24, 4, value)
  30. #define IE0_GET_TX_DESC_ARFR_TABLE_SEL(txdesc_ie) \
  31. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 19, 1)
  32. #define IE0_SET_TX_DESC_ARFR_TABLE_SEL(txdesc_ie, value) \
  33. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 19, 1, value)
  34. #define IE0_GET_TX_DESC_ARFR_HT_EN(txdesc_ie) \
  35. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 18, 1)
  36. #define IE0_SET_TX_DESC_ARFR_HT_EN(txdesc_ie, value) \
  37. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 18, 1, value)
  38. #define IE0_GET_TX_DESC_ARFR_OFDM_EN(txdesc_ie) \
  39. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 17, 1)
  40. #define IE0_SET_TX_DESC_ARFR_OFDM_EN(txdesc_ie, value) \
  41. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 17, 1, value)
  42. #define IE0_GET_TX_DESC_ARFR_CCK_EN(txdesc_ie) \
  43. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 16, 1)
  44. #define IE0_SET_TX_DESC_ARFR_CCK_EN(txdesc_ie, value) \
  45. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 16, 1, value)
  46. #define IE0_GET_TX_DESC_HW_RTS_EN(txdesc_ie) \
  47. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 9, 1)
  48. #define IE0_SET_TX_DESC_HW_RTS_EN(txdesc_ie, value) \
  49. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 9, 1, value)
  50. #define IE0_GET_TX_DESC_RTS_EN(txdesc_ie) \
  51. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 8, 1)
  52. #define IE0_SET_TX_DESC_RTS_EN(txdesc_ie, value) \
  53. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 8, 1, value)
  54. #define IE0_GET_TX_DESC_CTS2SELF(txdesc_ie) \
  55. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 7, 1)
  56. #define IE0_SET_TX_DESC_CTS2SELF(txdesc_ie, value) \
  57. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 7, 1, value)
  58. #define IE0_GET_TX_DESC_RTY_LMT_EN(txdesc_ie) \
  59. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 6, 1)
  60. #define IE0_SET_TX_DESC_RTY_LMT_EN(txdesc_ie, value) \
  61. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 6, 1, value)
  62. #define IE0_GET_TX_DESC_RTS_SHORT(txdesc_ie) \
  63. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 5, 1)
  64. #define IE0_SET_TX_DESC_RTS_SHORT(txdesc_ie, value) \
  65. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 5, 1, value)
  66. #define IE0_GET_TX_DESC_DISDATAFB(txdesc_ie) \
  67. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 4, 1)
  68. #define IE0_SET_TX_DESC_DISDATAFB(txdesc_ie, value) \
  69. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 4, 1, value)
  70. #define IE0_GET_TX_DESC_DISRTSFB(txdesc_ie) \
  71. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 3, 1)
  72. #define IE0_SET_TX_DESC_DISRTSFB(txdesc_ie, value) \
  73. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 3, 1, value)
  74. #define IE0_GET_TX_DESC_DATA_SHORT(txdesc_ie) \
  75. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 2, 1)
  76. #define IE0_SET_TX_DESC_DATA_SHORT(txdesc_ie, value) \
  77. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 2, 1, value)
  78. #define IE0_GET_TX_DESC_TRY_RATE(txdesc_ie) \
  79. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 1, 1)
  80. #define IE0_SET_TX_DESC_TRY_RATE(txdesc_ie, value) \
  81. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 1, 1, value)
  82. #define IE0_GET_TX_DESC_USERATE(txdesc_ie) \
  83. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 0, 1)
  84. #define IE0_SET_TX_DESC_USERATE(txdesc_ie, value) \
  85. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 0, 1, value)
  86. #define IE0_GET_TX_DESC_RTS_RTY_LOWEST_RATE(txdesc_ie) \
  87. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 27, 4)
  88. #define IE0_SET_TX_DESC_RTS_RTY_LOWEST_RATE(txdesc_ie, value) \
  89. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 27, 4, value)
  90. #define IE0_GET_TX_DESC_DATA_RTY_LOWEST_RATE(txdesc_ie) \
  91. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 22, 5)
  92. #define IE0_SET_TX_DESC_DATA_RTY_LOWEST_RATE(txdesc_ie, value) \
  93. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 22, 5, value)
  94. #define IE0_GET_TX_DESC_RTS_DATA_RTY_LMT(txdesc_ie) \
  95. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 16, 6)
  96. #define IE0_SET_TX_DESC_RTS_DATA_RTY_LMT(txdesc_ie, value) \
  97. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 16, 6, value)
  98. #define IE0_GET_TX_DESC_DATA_BW(txdesc_ie) \
  99. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 12, 2)
  100. #define IE0_SET_TX_DESC_DATA_BW(txdesc_ie, value) \
  101. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 12, 2, value)
  102. #define IE0_GET_TX_DESC_RTSRATE(txdesc_ie) \
  103. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 7, 4)
  104. #define IE0_SET_TX_DESC_RTSRATE(txdesc_ie, value) \
  105. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 7, 4, value)
  106. #define IE0_GET_TX_DESC_DATARATE(txdesc_ie) \
  107. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 0, 7)
  108. #define IE0_SET_TX_DESC_DATARATE(txdesc_ie, value) \
  109. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 0, 7, value)
  110. #define IE1_GET_TX_DESC_IE_END(txdesc_ie) \
  111. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 31, 1)
  112. #define IE1_SET_TX_DESC_IE_END(txdesc_ie, value) \
  113. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 31, 1, value)
  114. #define IE1_GET_TX_DESC_IE_UP(txdesc_ie) \
  115. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 30, 1)
  116. #define IE1_SET_TX_DESC_IE_UP(txdesc_ie, value) \
  117. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 30, 1, value)
  118. #define IE1_GET_TX_DESC_IE_NUM(txdesc_ie) \
  119. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 24, 4)
  120. #define IE1_SET_TX_DESC_IE_NUM(txdesc_ie, value) \
  121. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 24, 4, value)
  122. #define IE1_GET_TX_DESC_AMPDU_DENSITY(txdesc_ie) \
  123. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 21, 3)
  124. #define IE1_SET_TX_DESC_AMPDU_DENSITY(txdesc_ie, value) \
  125. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 21, 3, value)
  126. #define IE1_GET_TX_DESC_MAX_AGG_NUM(txdesc_ie) \
  127. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 16, 5)
  128. #define IE1_SET_TX_DESC_MAX_AGG_NUM(txdesc_ie, value) \
  129. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 16, 5, value)
  130. #define IE1_GET_TX_DESC_SECTYPE(txdesc_ie) \
  131. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 14, 2)
  132. #define IE1_SET_TX_DESC_SECTYPE(txdesc_ie, value) \
  133. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 14, 2, value)
  134. #define IE1_GET_TX_DESC_MOREFRAG(txdesc_ie) \
  135. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 13, 1)
  136. #define IE1_SET_TX_DESC_MOREFRAG(txdesc_ie, value) \
  137. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 13, 1, value)
  138. #define IE1_GET_TX_DESC_NOACM(txdesc_ie) \
  139. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 12, 1)
  140. #define IE1_SET_TX_DESC_NOACM(txdesc_ie, value) \
  141. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 12, 1, value)
  142. #define IE1_GET_TX_DESC_BCNPKT_TSF_CTRL(txdesc_ie) \
  143. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 11, 1)
  144. #define IE1_SET_TX_DESC_BCNPKT_TSF_CTRL(txdesc_ie, value) \
  145. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 11, 1, value)
  146. #define IE1_GET_TX_DESC_NAVUSEHDR(txdesc_ie) \
  147. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 10, 1)
  148. #define IE1_SET_TX_DESC_NAVUSEHDR(txdesc_ie, value) \
  149. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 10, 1, value)
  150. #define IE1_GET_TX_DESC_HTC(txdesc_ie) LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 9, 1)
  151. #define IE1_SET_TX_DESC_HTC(txdesc_ie, value) \
  152. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 9, 1, value)
  153. #define IE1_GET_TX_DESC_BMC(txdesc_ie) LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 8, 1)
  154. #define IE1_SET_TX_DESC_BMC(txdesc_ie, value) \
  155. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 8, 1, value)
  156. #define IE1_GET_TX_DESC_TX_PKT_AFTER_PIFS(txdesc_ie) \
  157. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 7, 1)
  158. #define IE1_SET_TX_DESC_TX_PKT_AFTER_PIFS(txdesc_ie, value) \
  159. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 7, 1, value)
  160. #define IE1_GET_TX_DESC_USE_MAX_TIME_EN(txdesc_ie) \
  161. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 6, 1)
  162. #define IE1_SET_TX_DESC_USE_MAX_TIME_EN(txdesc_ie, value) \
  163. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 6, 1, value)
  164. #define IE1_GET_TX_DESC_HW_SSN_SEL(txdesc_ie) \
  165. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 4, 2)
  166. #define IE1_SET_TX_DESC_HW_SSN_SEL(txdesc_ie, value) \
  167. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 4, 2, value)
  168. #define IE1_GET_TX_DESC_DISQSELSEQ(txdesc_ie) \
  169. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 3, 1)
  170. #define IE1_SET_TX_DESC_DISQSELSEQ(txdesc_ie, value) \
  171. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 3, 1, value)
  172. #define IE1_GET_TX_DESC_EN_HWSEQ(txdesc_ie) \
  173. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 2, 1)
  174. #define IE1_SET_TX_DESC_EN_HWSEQ(txdesc_ie, value) \
  175. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 2, 1, value)
  176. #define IE1_GET_TX_DESC_EN_HWEXSEQ(txdesc_ie) \
  177. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 1, 1)
  178. #define IE1_SET_TX_DESC_EN_HWEXSEQ(txdesc_ie, value) \
  179. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 1, 1, value)
  180. #define IE1_GET_TX_DESC_EN_DESC_ID(txdesc_ie) \
  181. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 0, 1)
  182. #define IE1_SET_TX_DESC_EN_DESC_ID(txdesc_ie, value) \
  183. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 0, 1, value)
  184. #define IE1_GET_TX_DESC_AMPDU_MAX_TIME(txdesc_ie) \
  185. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 24, 8)
  186. #define IE1_SET_TX_DESC_AMPDU_MAX_TIME(txdesc_ie, value) \
  187. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 24, 8, value)
  188. #define IE1_GET_TX_DESC_P_AID(txdesc_ie) \
  189. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 15, 9)
  190. #define IE1_SET_TX_DESC_P_AID(txdesc_ie, value) \
  191. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 15, 9, value)
  192. #define IE1_GET_TX_DESC_MOREDATA(txdesc_ie) \
  193. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 14, 1)
  194. #define IE1_SET_TX_DESC_MOREDATA(txdesc_ie, value) \
  195. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 14, 1, value)
  196. #define IE1_GET_TX_DESC_SW_SEQ(txdesc_ie) \
  197. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 0, 12)
  198. #define IE1_SET_TX_DESC_SW_SEQ(txdesc_ie, value) \
  199. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 0, 12, value)
  200. #define IE2_GET_TX_DESC_IE_END(txdesc_ie) \
  201. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 31, 1)
  202. #define IE2_SET_TX_DESC_IE_END(txdesc_ie, value) \
  203. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 31, 1, value)
  204. #define IE2_GET_TX_DESC_IE_UP(txdesc_ie) \
  205. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 30, 1)
  206. #define IE2_SET_TX_DESC_IE_UP(txdesc_ie, value) \
  207. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 30, 1, value)
  208. #define IE2_GET_TX_DESC_IE_NUM(txdesc_ie) \
  209. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 24, 4)
  210. #define IE2_SET_TX_DESC_IE_NUM(txdesc_ie, value) \
  211. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 24, 4, value)
  212. #define IE2_GET_TX_DESC_ADDR_CAM(txdesc_ie) \
  213. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 16, 8)
  214. #define IE2_SET_TX_DESC_ADDR_CAM(txdesc_ie, value) \
  215. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 16, 8, value)
  216. #define IE2_GET_TX_DESC_MULTIPLE_PORT(txdesc_ie) \
  217. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 12, 3)
  218. #define IE2_SET_TX_DESC_MULTIPLE_PORT(txdesc_ie, value) \
  219. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 12, 3, value)
  220. #define IE2_GET_TX_DESC_RAW(txdesc_ie) LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 11, 1)
  221. #define IE2_SET_TX_DESC_RAW(txdesc_ie, value) \
  222. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 11, 1, value)
  223. #define IE2_GET_TX_DESC_RDG_EN(txdesc_ie) \
  224. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 10, 1)
  225. #define IE2_SET_TX_DESC_RDG_EN(txdesc_ie, value) \
  226. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 10, 1, value)
  227. #define IE2_GET_TX_DESC_SPECIAL_CW(txdesc_ie) \
  228. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 7, 1)
  229. #define IE2_SET_TX_DESC_SPECIAL_CW(txdesc_ie, value) \
  230. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 7, 1, value)
  231. #define IE2_GET_TX_DESC_POLLUTED(txdesc_ie) \
  232. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 6, 1)
  233. #define IE2_SET_TX_DESC_POLLUTED(txdesc_ie, value) \
  234. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 6, 1, value)
  235. #define IE2_GET_TX_DESC_BT_NULL(txdesc_ie) \
  236. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 5, 1)
  237. #define IE2_SET_TX_DESC_BT_NULL(txdesc_ie, value) \
  238. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 5, 1, value)
  239. #define IE2_GET_TX_DESC_NULL_1(txdesc_ie) \
  240. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 4, 1)
  241. #define IE2_SET_TX_DESC_NULL_1(txdesc_ie, value) \
  242. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 4, 1, value)
  243. #define IE2_GET_TX_DESC_NULL_0(txdesc_ie) \
  244. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 3, 1)
  245. #define IE2_SET_TX_DESC_NULL_0(txdesc_ie, value) \
  246. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 3, 1, value)
  247. #define IE2_GET_TX_DESC_TRI_FRAME(txdesc_ie) \
  248. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 2, 1)
  249. #define IE2_SET_TX_DESC_TRI_FRAME(txdesc_ie, value) \
  250. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 2, 1, value)
  251. #define IE2_GET_TX_DESC_SPE_RPT(txdesc_ie) \
  252. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 1, 1)
  253. #define IE2_SET_TX_DESC_SPE_RPT(txdesc_ie, value) \
  254. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 1, 1, value)
  255. #define IE2_GET_TX_DESC_FTM_EN(txdesc_ie) \
  256. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 0, 1)
  257. #define IE2_SET_TX_DESC_FTM_EN(txdesc_ie, value) \
  258. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 0, 1, value)
  259. #define IE2_GET_TX_DESC_MBSSID(txdesc_ie) \
  260. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 27, 4)
  261. #define IE2_SET_TX_DESC_MBSSID(txdesc_ie, value) \
  262. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 27, 4, value)
  263. #define IE2_GET_TX_DESC_GROUP_BIT_IE_OFFSET(txdesc_ie) \
  264. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 16, 11)
  265. #define IE2_SET_TX_DESC_GROUP_BIT_IE_OFFSET(txdesc_ie, value) \
  266. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 16, 11, value)
  267. #define IE2_GET_TX_DESC_RDG_NAV_EXT(txdesc_ie) \
  268. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 15, 1)
  269. #define IE2_SET_TX_DESC_RDG_NAV_EXT(txdesc_ie, value) \
  270. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 15, 1, value)
  271. #define IE2_GET_TX_DESC_DROP_ID(txdesc_ie) \
  272. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 12, 2)
  273. #define IE2_SET_TX_DESC_DROP_ID(txdesc_ie, value) \
  274. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 12, 2, value)
  275. #define IE2_GET_TX_DESC_SW_DEFINE(txdesc_ie) \
  276. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 0, 12)
  277. #define IE2_SET_TX_DESC_SW_DEFINE(txdesc_ie, value) \
  278. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 0, 12, value)
  279. #define IE3_GET_TX_DESC_IE_END(txdesc_ie) \
  280. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 31, 1)
  281. #define IE3_SET_TX_DESC_IE_END(txdesc_ie, value) \
  282. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 31, 1, value)
  283. #define IE3_GET_TX_DESC_IE_UP(txdesc_ie) \
  284. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 30, 1)
  285. #define IE3_SET_TX_DESC_IE_UP(txdesc_ie, value) \
  286. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 30, 1, value)
  287. #define IE3_GET_TX_DESC_IE_NUM(txdesc_ie) \
  288. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 24, 4)
  289. #define IE3_SET_TX_DESC_IE_NUM(txdesc_ie, value) \
  290. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 24, 4, value)
  291. #define IE3_GET_TX_DESC_DATA_SC(txdesc_ie) \
  292. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 20, 4)
  293. #define IE3_SET_TX_DESC_DATA_SC(txdesc_ie, value) \
  294. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 20, 4, value)
  295. #define IE3_GET_TX_DESC_SIGNALING_TA_PKT_SC(txdesc_ie) \
  296. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 16, 4)
  297. #define IE3_SET_TX_DESC_SIGNALING_TA_PKT_SC(txdesc_ie, value) \
  298. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 16, 4, value)
  299. #define IE3_GET_TX_DESC_CTRL_CNT(txdesc_ie) \
  300. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 8, 4)
  301. #define IE3_SET_TX_DESC_CTRL_CNT(txdesc_ie, value) \
  302. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 8, 4, value)
  303. #define IE3_GET_TX_DESC_CTRL_CNT_VALID(txdesc_ie) \
  304. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 1, 1)
  305. #define IE3_SET_TX_DESC_CTRL_CNT_VALID(txdesc_ie, value) \
  306. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 1, 1, value)
  307. #define IE3_GET_TX_DESC_SIGNALING_TA_PKT_EN(txdesc_ie) \
  308. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 0, 1)
  309. #define IE3_SET_TX_DESC_SIGNALING_TA_PKT_EN(txdesc_ie, value) \
  310. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 0, 1, value)
  311. #define IE3_GET_TX_DESC_G_ID(txdesc_ie) \
  312. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 24, 6)
  313. #define IE3_SET_TX_DESC_G_ID(txdesc_ie, value) \
  314. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 24, 6, value)
  315. #define IE3_GET_TX_DESC_SND_TARGET(txdesc_ie) \
  316. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 16, 8)
  317. #define IE3_SET_TX_DESC_SND_TARGET(txdesc_ie, value) \
  318. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 16, 8, value)
  319. #define IE3_GET_TX_DESC_CCA_RTS(txdesc_ie) \
  320. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 11, 2)
  321. #define IE3_SET_TX_DESC_CCA_RTS(txdesc_ie, value) \
  322. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 11, 2, value)
  323. #define IE3_GET_TX_DESC_SND_PKT_SEL(txdesc_ie) \
  324. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 9, 2)
  325. #define IE3_SET_TX_DESC_SND_PKT_SEL(txdesc_ie, value) \
  326. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 9, 2, value)
  327. #define IE3_GET_TX_DESC_NDPA(txdesc_ie) LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 7, 2)
  328. #define IE3_SET_TX_DESC_NDPA(txdesc_ie, value) \
  329. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 7, 2, value)
  330. #define IE3_GET_TX_DESC_MU_DATARATE(txdesc_ie) \
  331. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 0, 7)
  332. #define IE3_SET_TX_DESC_MU_DATARATE(txdesc_ie, value) \
  333. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 0, 7, value)
  334. #define IE4_GET_TX_DESC_IE_END(txdesc_ie) \
  335. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 31, 1)
  336. #define IE4_SET_TX_DESC_IE_END(txdesc_ie, value) \
  337. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 31, 1, value)
  338. #define IE4_GET_TX_DESC_IE_UP(txdesc_ie) \
  339. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 30, 1)
  340. #define IE4_SET_TX_DESC_IE_UP(txdesc_ie, value) \
  341. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 30, 1, value)
  342. #define IE4_GET_TX_DESC_IE_NUM(txdesc_ie) \
  343. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 24, 4)
  344. #define IE4_SET_TX_DESC_IE_NUM(txdesc_ie, value) \
  345. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 24, 4, value)
  346. #define IE4_GET_TX_DESC_VCS_STBC(txdesc_ie) \
  347. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 10, 2)
  348. #define IE4_SET_TX_DESC_VCS_STBC(txdesc_ie, value) \
  349. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 10, 2, value)
  350. #define IE4_GET_TX_DESC_DATA_STBC(txdesc_ie) \
  351. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 8, 2)
  352. #define IE4_SET_TX_DESC_DATA_STBC(txdesc_ie, value) \
  353. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 8, 2, value)
  354. #define IE4_GET_TX_DESC_DATA_LDPC(txdesc_ie) \
  355. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 2, 1)
  356. #define IE4_SET_TX_DESC_DATA_LDPC(txdesc_ie, value) \
  357. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 2, 1, value)
  358. #define IE4_GET_TX_DESC_GF(txdesc_ie) LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 1, 1)
  359. #define IE4_SET_TX_DESC_GF(txdesc_ie, value) \
  360. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 1, 1, value)
  361. #define IE4_GET_TX_DESC_LSIG_TXOP_EN(txdesc_ie) \
  362. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 0, 1)
  363. #define IE4_SET_TX_DESC_LSIG_TXOP_EN(txdesc_ie, value) \
  364. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 0, 1, value)
  365. #define IE4_GET_TX_DESC_PATH_MAPA(txdesc_ie) \
  366. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 30, 2)
  367. #define IE4_SET_TX_DESC_PATH_MAPA(txdesc_ie, value) \
  368. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 30, 2, value)
  369. #define IE4_GET_TX_DESC_PATH_MAPB(txdesc_ie) \
  370. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 28, 2)
  371. #define IE4_SET_TX_DESC_PATH_MAPB(txdesc_ie, value) \
  372. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 28, 2, value)
  373. #define IE4_GET_TX_DESC_PATH_MAPC(txdesc_ie) \
  374. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 26, 2)
  375. #define IE4_SET_TX_DESC_PATH_MAPC(txdesc_ie, value) \
  376. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 26, 2, value)
  377. #define IE4_GET_TX_DESC_PATH_MAPD(txdesc_ie) \
  378. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 24, 2)
  379. #define IE4_SET_TX_DESC_PATH_MAPD(txdesc_ie, value) \
  380. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 24, 2, value)
  381. #define IE4_GET_TX_DESC_ANTSEL_A(txdesc_ie) \
  382. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 20, 4)
  383. #define IE4_SET_TX_DESC_ANTSEL_A(txdesc_ie, value) \
  384. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 20, 4, value)
  385. #define IE4_GET_TX_DESC_ANTSEL_B(txdesc_ie) \
  386. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 16, 4)
  387. #define IE4_SET_TX_DESC_ANTSEL_B(txdesc_ie, value) \
  388. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 16, 4, value)
  389. #define IE4_GET_TX_DESC_ANTSEL_C(txdesc_ie) \
  390. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 12, 4)
  391. #define IE4_SET_TX_DESC_ANTSEL_C(txdesc_ie, value) \
  392. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 12, 4, value)
  393. #define IE4_GET_TX_DESC_ANTSEL_D(txdesc_ie) \
  394. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 8, 4)
  395. #define IE4_SET_TX_DESC_ANTSEL_D(txdesc_ie, value) \
  396. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 8, 4, value)
  397. #define IE4_GET_TX_DESC_NTX_PATH_EN(txdesc_ie) \
  398. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 4, 4)
  399. #define IE4_SET_TX_DESC_NTX_PATH_EN(txdesc_ie, value) \
  400. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 4, 4, value)
  401. #define IE4_GET_TX_DESC_ANTLSEL_EN(txdesc_ie) \
  402. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 3, 1)
  403. #define IE4_SET_TX_DESC_ANTLSEL_EN(txdesc_ie, value) \
  404. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 3, 1, value)
  405. #define IE4_GET_TX_DESC_TXPWR_OFSET_TYPE(txdesc_ie) \
  406. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 0, 2)
  407. #define IE4_SET_TX_DESC_TXPWR_OFSET_TYPE(txdesc_ie, value) \
  408. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 0, 2, value)
  409. #define IE5_GET_TX_DESC_IE_END(txdesc_ie) \
  410. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 31, 1)
  411. #define IE5_SET_TX_DESC_IE_END(txdesc_ie, value) \
  412. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 31, 1, value)
  413. #define IE5_GET_TX_DESC_IE_UP(txdesc_ie) \
  414. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 30, 1)
  415. #define IE5_SET_TX_DESC_IE_UP(txdesc_ie, value) \
  416. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 30, 1, value)
  417. #define IE5_GET_TX_DESC_IE_NUM(txdesc_ie) \
  418. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 24, 4)
  419. #define IE5_SET_TX_DESC_IE_NUM(txdesc_ie, value) \
  420. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 24, 4, value)
  421. #define IE5_GET_TX_DESC_LEN1_L(txdesc_ie) \
  422. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 17, 7)
  423. #define IE5_SET_TX_DESC_LEN1_L(txdesc_ie, value) \
  424. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 17, 7, value)
  425. #define IE5_GET_TX_DESC_LEN0(txdesc_ie) \
  426. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 4, 13)
  427. #define IE5_SET_TX_DESC_LEN0(txdesc_ie, value) \
  428. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 4, 13, value)
  429. #define IE5_GET_TX_DESC_PKT_NUM(txdesc_ie) \
  430. LE_BITS_TO_4BYTE(txdesc_ie + 0x00, 0, 4)
  431. #define IE5_SET_TX_DESC_PKT_NUM(txdesc_ie, value) \
  432. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x00, 0, 4, value)
  433. #define IE5_GET_TX_DESC_LEN3(txdesc_ie) \
  434. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 19, 13)
  435. #define IE5_SET_TX_DESC_LEN3(txdesc_ie, value) \
  436. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 19, 13, value)
  437. #define IE5_GET_TX_DESC_LEN2(txdesc_ie) \
  438. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 6, 13)
  439. #define IE5_SET_TX_DESC_LEN2(txdesc_ie, value) \
  440. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 6, 13, value)
  441. #define IE5_GET_TX_DESC_LEN1_H(txdesc_ie) \
  442. LE_BITS_TO_4BYTE(txdesc_ie + 0x04, 0, 6)
  443. #define IE5_SET_TX_DESC_LEN1_H(txdesc_ie, value) \
  444. SET_BITS_TO_LE_4BYTE(txdesc_ie + 0x04, 0, 6, value)
  445. #endif
  446. #endif