rtl8192e_xmit.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2013 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. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #ifndef __RTL8192E_XMIT_H__
  21. #define __RTL8192E_XMIT_H__
  22. typedef struct txdescriptor_8192e
  23. {
  24. //Offset 0
  25. u32 pktlen:16;
  26. u32 offset:8;
  27. u32 bmc:1;
  28. u32 htc:1;
  29. u32 ls:1;
  30. u32 fs:1;
  31. u32 linip:1;
  32. u32 noacm:1;
  33. u32 gf:1;
  34. u32 own:1;
  35. //Offset 4
  36. u32 macid:6;
  37. u32 rsvd0406:2;
  38. u32 qsel:5;
  39. u32 rd_nav_ext:1;
  40. u32 lsig_txop_en:1;
  41. u32 pifs:1;
  42. u32 rate_id:4;
  43. u32 navusehdr:1;
  44. u32 en_desc_id:1;
  45. u32 sectype:2;
  46. u32 rsvd0424:2;
  47. u32 pkt_offset:5; // unit: 8 bytes
  48. u32 rsvd0431:1;
  49. //Offset 8
  50. u32 rts_rc:6;
  51. u32 data_rc:6;
  52. u32 agg_en:1;
  53. u32 rd_en:1;
  54. u32 bar_rty_th:2;
  55. u32 bk:1;
  56. u32 morefrag:1;
  57. u32 raw:1;
  58. u32 ccx:1;
  59. u32 ampdu_density:3;
  60. u32 bt_null:1;
  61. u32 ant_sel_a:1;
  62. u32 ant_sel_b:1;
  63. u32 tx_ant_cck:2;
  64. u32 tx_antl:2;
  65. u32 tx_ant_ht:2;
  66. //Offset 12
  67. u32 nextheadpage:8;
  68. u32 tailpage:8;
  69. u32 seq:12;
  70. u32 cpu_handle:1;
  71. u32 tag1:1;
  72. u32 trigger_int:1;
  73. u32 hwseq_en:1;
  74. //Offset 16
  75. u32 rtsrate:5;
  76. u32 ap_dcfe:1;
  77. u32 hwseq_sel:2;
  78. u32 userate:1;
  79. u32 disrtsfb:1;
  80. u32 disdatafb:1;
  81. u32 cts2self:1;
  82. u32 rtsen:1;
  83. u32 hw_rts_en:1;
  84. u32 port_id:1;
  85. u32 pwr_status:3;
  86. u32 wait_dcts:1;
  87. u32 cts2ap_en:1;
  88. u32 data_sc:2;
  89. u32 data_stbc:2;
  90. u32 data_short:1;
  91. u32 data_bw:1;
  92. u32 rts_short:1;
  93. u32 rts_bw:1;
  94. u32 rts_sc:2;
  95. u32 vcs_stbc:2;
  96. //Offset 20
  97. u32 datarate:6;
  98. u32 sgi:1;
  99. u32 try_rate:1;
  100. u32 data_ratefb_lmt:5;
  101. u32 rts_ratefb_lmt:4;
  102. u32 rty_lmt_en:1;
  103. u32 data_rt_lmt:6;
  104. u32 usb_txagg_num:8;
  105. //Offset 24
  106. u32 txagg_a:5;
  107. u32 txagg_b:5;
  108. u32 use_max_len:1;
  109. u32 max_agg_num:5;
  110. u32 mcsg1_max_len:4;
  111. u32 mcsg2_max_len:4;
  112. u32 mcsg3_max_len:4;
  113. u32 mcs7_sgi_max_len:4;
  114. //Offset 28
  115. u32 checksum:16; // TxBuffSize(PCIe)/CheckSum(USB)
  116. u32 mcsg4_max_len:4;
  117. u32 mcsg5_max_len:4;
  118. u32 mcsg6_max_len:4;
  119. u32 mcs15_sgi_max_len:4;
  120. }TXDESC_8192E, *PTXDESC_8192E;
  121. //
  122. // Queue Select Value in TxDesc
  123. //
  124. #define QSLT_BK 0x2//0x01
  125. #define QSLT_BE 0x0
  126. #define QSLT_VI 0x5//0x4
  127. #define QSLT_VO 0x7//0x6
  128. #define QSLT_BEACON 0x10
  129. #define QSLT_HIGH 0x11
  130. #define QSLT_MGNT 0x12
  131. #define QSLT_CMD 0x13
  132. //For 88e early mode
  133. #define SET_EARLYMODE_PKTNUM(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr, 0, 3, __Value)
  134. #define SET_EARLYMODE_LEN0(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr, 4, 12, __Value)
  135. #define SET_EARLYMODE_LEN1(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr, 16, 12, __Value)
  136. #define SET_EARLYMODE_LEN2_1(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr, 28, 4, __Value)
  137. #define SET_EARLYMODE_LEN2_2(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr+4, 0, 8, __Value)
  138. #define SET_EARLYMODE_LEN3(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr+4, 8, 12, __Value)
  139. #define SET_EARLYMODE_LEN4(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr+4, 20, 12, __Value)
  140. //
  141. //defined for TX DESC Operation
  142. //
  143. #define MAX_TID (15)
  144. //OFFSET 0
  145. #define OFFSET_SZ 0
  146. #define OFFSET_SHT 16
  147. #define BMC BIT(24)
  148. #define LSG BIT(26)
  149. #define FSG BIT(27)
  150. #define OWN BIT(31)
  151. //OFFSET 4
  152. #define PKT_OFFSET_SZ 0
  153. #define QSEL_SHT 8
  154. #define RATE_ID_SHT 16
  155. #define NAVUSEHDR BIT(20)
  156. #define SEC_TYPE_SHT 22
  157. #define PKT_OFFSET_SHT 26
  158. //OFFSET 8
  159. #define AGG_EN BIT(12)
  160. #define AGG_BK BIT(16)
  161. #define AMPDU_DENSITY_SHT 20
  162. #define ANTSEL_A BIT(24)
  163. #define ANTSEL_B BIT(25)
  164. #define TX_ANT_CCK_SHT 26
  165. #define TX_ANTL_SHT 28
  166. #define TX_ANT_HT_SHT 30
  167. //OFFSET 12
  168. #define SEQ_SHT 16
  169. #define EN_HWSEQ BIT(31)
  170. //OFFSET 16
  171. #define QOS BIT(6)
  172. #define HW_SSN BIT(7)
  173. #define USERATE BIT(8)
  174. #define DISDATAFB BIT(10)
  175. #define CTS_2_SELF BIT(11)
  176. #define RTS_EN BIT(12)
  177. #define HW_RTS_EN BIT(13)
  178. #define DATA_SHORT BIT(24)
  179. #define PWR_STATUS_SHT 15
  180. #define DATA_SC_SHT 20
  181. #define DATA_BW BIT(25)
  182. //OFFSET 20
  183. #define RTY_LMT_EN BIT(17)
  184. //OFFSET 20
  185. #define SGI BIT(6)
  186. #define USB_TXAGG_NUM_SHT 24
  187. //=====Desc content
  188. // Dword 0
  189. #define SET_TX_DESC_PKT_SIZE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc, 0, 16, __Value)
  190. #define SET_TX_DESC_OFFSET_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc, 16, 8, __Value)
  191. #define SET_TX_DESC_BMC_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc, 24, 1, __Value)
  192. #define SET_TX_DESC_HTC_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc, 25, 1, __Value)
  193. #define SET_TX_DESC_LINIP_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc, 28, 1, __Value)
  194. #define SET_TX_DESC_NO_ACM_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc, 29, 1, __Value)
  195. #define SET_TX_DESC_GF_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc, 30, 1, __Value)
  196. // Dword 1
  197. #define SET_TX_DESC_MACID_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+4, 0, 7, __Value)
  198. #define SET_TX_DESC_QUEUE_SEL_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+4, 8, 5, __Value)
  199. #define SET_TX_DESC_RDG_NAV_EXT_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+4, 13, 1, __Value)
  200. #define SET_TX_DESC_LSIG_TXOP_EN_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+4, 14, 1, __Value)
  201. #define SET_TX_DESC_PIFS_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+4, 15, 1, __Value)
  202. #define SET_TX_DESC_RATE_ID_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+4, 16, 5, __Value)
  203. #define SET_TX_DESC_EN_DESC_ID_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+4, 21, 1, __Value)
  204. #define SET_TX_DESC_SEC_TYPE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+4, 22, 2, __Value)
  205. #define SET_TX_DESC_PKT_OFFSET_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+4, 24, 5, __Value)
  206. #define SET_TX_DESC_MORE_DATA_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+4, 29, 1, __Value)
  207. #define SET_TX_DESC_TXOP_PS_CAP_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+4, 30, 1, __Value)
  208. #define SET_TX_DESC_TXOP_PS_MODE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+4, 31, 1, __Value)
  209. // Dword 2
  210. #define SET_TX_DESC_PAID_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 0, 9, __Value)
  211. #define SET_TX_DESC_CCA_RTS_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 10, 2, __Value)
  212. #define SET_TX_DESC_AGG_ENABLE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 12, 1, __Value)
  213. #define SET_TX_DESC_RDG_ENABLE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 13, 1, __Value)
  214. #define SET_TX_DESC_NULL_0_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 14, 1, __Value)
  215. #define SET_TX_DESC_NULL_1_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 15, 1, __Value)
  216. #define SET_TX_DESC_BK_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 16, 1, __Value)
  217. #define SET_TX_DESC_MORE_FRAG_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 17, 1, __Value)
  218. #define SET_TX_DESC_RAW_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 18, 1, __Value)
  219. #define GET_TX_DESC_MORE_FRAG_92E(__pTxDesc) LE_BITS_TO_4BYTE( __pTxDesc+8, 17, 1)
  220. #define SET_TX_DESC_SPE_RPT_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 19, 1, __Value)
  221. #define SET_TX_DESC_AMPDU_DENSITY_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 20, 3, __Value)
  222. #define SET_TX_DESC_BT_NULL_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 23, 1, __Value)
  223. #define SET_TX_DESC_GID_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+8, 24, 6, __Value)
  224. // Dword 3
  225. #define SET_TX_DESC_WHEADER_LEN_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 0, 4, __Value)
  226. #define SET_TX_DESC_CHK_EN_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 4, 1, __Value)
  227. #define SET_TX_DESC_EARLY_RATE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 5, 1, __Value)
  228. #define SET_TX_DESC_HWSEQ_SEL_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 6, 2, __Value)
  229. #define SET_TX_DESC_USE_RATE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 8, 1, __Value)
  230. #define SET_TX_DESC_DISABLE_RTS_FB_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 9, 1, __Value)
  231. #define SET_TX_DESC_DISABLE_FB_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 10, 1, __Value)
  232. #define SET_TX_DESC_CTS2SELF_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 11, 1, __Value)
  233. #define SET_TX_DESC_RTS_ENABLE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 12, 1, __Value)
  234. #define SET_TX_DESC_HW_RTS_ENABLE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 13, 1, __Value)
  235. #define SET_TX_DESC_HW_PORT_ID_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 14, 1, __Value)
  236. #define SET_TX_DESC_NAV_USE_HDR_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 15, 1, __Value)
  237. #define SET_TX_DESC_USE_MAX_LEN_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 16, 1, __Value)
  238. #define SET_TX_DESC_MAX_AGG_NUM_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 17, 5, __Value)
  239. #define SET_TX_DESC_NDPA_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 22, 2, __Value)
  240. #define SET_TX_DESC_AMPDU_MAX_TIME_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+12, 24, 8, __Value)
  241. // Dword 4
  242. #define SET_TX_DESC_TX_RATE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+16, 0, 7, __Value)
  243. #define SET_TX_DESC_TRY_RATE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+16, 7, 1, __Value)
  244. #define SET_TX_DESC_DATA_RATE_FB_LIMIT_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+16, 8, 5, __Value)
  245. #define SET_TX_DESC_RTS_RATE_FB_LIMIT_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+16, 13, 4, __Value)
  246. #define SET_TX_DESC_RETRY_LIMIT_ENABLE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+16, 17, 1, __Value)
  247. #define SET_TX_DESC_DATA_RETRY_LIMIT_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+16, 18, 6, __Value)
  248. #define SET_TX_DESC_RTS_RATE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+16, 24, 5, __Value)
  249. #define SET_TX_DESC_PCTS_ENABLE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+16, 29, 1, __Value)
  250. #define SET_TX_DESC_PCTS_MASK_IDX_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+16, 30, 2, __Value)
  251. // Dword 5
  252. #define SET_TX_DESC_DATA_SC_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+20, 0, 4, __Value)
  253. #define SET_TX_DESC_DATA_SHORT_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+20, 4, 1, __Value)
  254. #define SET_TX_DESC_DATA_BW_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+20, 5, 2, __Value)
  255. #define SET_TX_DESC_DATA_LDPC_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+20, 7, 1, __Value)
  256. #define SET_TX_DESC_DATA_STBC_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+20, 8, 2, __Value)
  257. #define SET_TX_DESC_VCS_STBC_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+20, 10, 2, __Value)
  258. #define SET_TX_DESC_RTS_SHORT_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+20, 12, 1, __Value)
  259. #define SET_TX_DESC_RTS_SC_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+20, 13, 4, __Value)
  260. #define SET_TX_DESC_TX_ANT_92E(__pTxDesc,__Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+20, 24, 4, __Value)
  261. #define SET_TX_DESC_TX_POWER_0_PSET_92E(__pTxDesc,__Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+20, 28, 3, __Value)
  262. // Dword 6
  263. #define SET_TX_DESC_SW_DEFINE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+24, 0, 12, __Value)
  264. #define SET_TX_DESC_MBSSID_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+24, 12, 4, __Value)
  265. #define SET_TX_DESC_ANTSEL_A_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+24, 16, 3, __Value)
  266. #define SET_TX_DESC_ANTSEL_B_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+24, 19, 3, __Value)
  267. #define SET_TX_DESC_ANTSEL_C_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+24, 22, 3, __Value)
  268. #define SET_TX_DESC_ANTSEL_D_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+24, 25, 3, __Value)
  269. // Dword 7
  270. #if(DEV_BUS_TYPE == RT_PCI_INTERFACE)
  271. #define SET_TX_DESC_TX_BUFFER_SIZE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+28, 0, 16, __Value)
  272. #else
  273. #define SET_TX_DESC_TX_DESC_CHECKSUM_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+28, 0, 16, __Value)
  274. #endif
  275. #define SET_TX_DESC_USB_TXAGG_NUM_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+28, 24, 8, __Value)
  276. //#define SET_TX_DESC_HWSEQ_EN_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+32, 15, 1, __Value)
  277. // Dword 8
  278. #define SET_TX_DESC_RTS_RC_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+32, 0, 6, __Value)
  279. #define SET_TX_DESC_BAR_RTY_TH_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+32, 6, 2, __Value)
  280. #define SET_TX_DESC_DATA_RC_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+32, 8, 6, __Value)
  281. #define SET_TX_DESC_EN_HWSEQ_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+32, 15, 1, __Value)
  282. #define SET_TX_DESC_NEXT_HEAD_PAGE_92E(__pTxDesc,__Value)(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+32, 16, 8, __Value)
  283. #define SET_TX_DESC_TAIL_PAGE_92E(__pTxDesc,__Value)(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+32, 24, 8, __Value)
  284. // Dword 9
  285. #define SET_TX_DESC_PADDING_LENGTH_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+36, 0, 11, __Value)
  286. #define SET_TX_DESC_TXBF_PATH_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+36, 11, 1, __Value)
  287. #define SET_TX_DESC_SEQ_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+36, 12, 12, __Value)
  288. #define SET_TX_DESC_FINAL_DATA_RATE_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+36, 24, 8, __Value)
  289. // Dword 10
  290. #define SET_TX_DESC_TX_BUFFER_ADDRESS_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+40, 0, 32, __Value)
  291. // Dword 11
  292. #define SET_TX_DESC_NEXT_DESC_ADDRESS_92E(__pTxDesc, __Value) SET_BITS_TO_LE_4BYTE(__pTxDesc+48, 0, 32, __Value)
  293. #define SET_EARLYMODE_PKTNUM_92E(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr, 0, 4, __Value)
  294. #define SET_EARLYMODE_LEN0_92E(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr, 4, 15, __Value)
  295. #define SET_EARLYMODE_LEN1_1_92E(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr, 19, 13, __Value)
  296. #define SET_EARLYMODE_LEN1_2_92E(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr+4, 0, 2, __Value)
  297. #define SET_EARLYMODE_LEN2_92E(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr+4, 2, 15, __Value)
  298. #define SET_EARLYMODE_LEN3_92E(__pAddr, __Value) SET_BITS_TO_LE_4BYTE(__pAddr+4, 17, 15, __Value)
  299. void rtl8192e_fill_fake_txdesc(PADAPTER padapter,u8*pDesc,u32 BufferLen,u8 IsPsPoll,u8 IsBTQosNull);
  300. #ifdef CONFIG_USB_HCI
  301. s32 rtl8192eu_init_xmit_priv(PADAPTER padapter);
  302. void rtl8192eu_free_xmit_priv(PADAPTER padapter);
  303. s32 rtl8192eu_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
  304. s32 rtl8192eu_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
  305. s32 rtl8192eu_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
  306. s32 rtl8192eu_xmit_buf_handler(PADAPTER padapter);
  307. #define hal_xmit_handler rtl8192eu_xmit_buf_handler
  308. void rtl8192eu_xmit_tasklet(void *priv);
  309. s32 rtl8192eu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
  310. #endif
  311. #ifdef CONFIG_PCI_HCI
  312. s32 rtl8192ee_init_xmit_priv(PADAPTER padapter);
  313. void rtl8192ee_free_xmit_priv(PADAPTER padapter);
  314. struct xmit_buf *rtl8192ee_dequeue_xmitbuf(struct rtw_tx_ring *ring);
  315. void rtl8192ee_xmitframe_resume(_adapter *padapter);
  316. s32 rtl8192ee_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
  317. s32 rtl8192ee_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
  318. void rtl8192ee_xmit_tasklet(void *priv);
  319. #endif
  320. struct txrpt_ccx_92e {
  321. /* offset 0 */
  322. u8 tag1:1;
  323. u8 pkt_num:3;
  324. u8 txdma_underflow:1;
  325. u8 int_bt:1;
  326. u8 int_tri:1;
  327. u8 int_ccx:1;
  328. /* offset 1 */
  329. u8 mac_id:6;
  330. u8 pkt_ok:1;
  331. u8 bmc:1;
  332. /* offset 2 */
  333. u8 retry_cnt:6;
  334. u8 lifetime_over:1;
  335. u8 retry_over:1;
  336. /* offset 3 */
  337. u8 ccx_qtime0;
  338. u8 ccx_qtime1;
  339. /* offset 5 */
  340. u8 final_data_rate;
  341. /* offset 6 */
  342. u8 sw1:4;
  343. u8 qsel:4;
  344. /* offset 7 */
  345. u8 sw0;
  346. };
  347. #ifdef CONFIG_XMIT_ACK
  348. void dump_txrpt_ccx_92e(void *buf);
  349. void handle_txrpt_ccx_92e(_adapter *adapter, u8 *buf);
  350. #endif //CONFIG_XMIT_ACK
  351. #ifdef CONFIG_TX_EARLY_MODE
  352. void UpdateEarlyModeInfo8192E(struct xmit_priv *pxmitpriv,struct xmit_buf *pxmitbuf );
  353. #endif
  354. void _dbg_dump_tx_info(_adapter *padapter,int frame_tag,u8 *ptxdesc);
  355. u8 BWMapping_92E(PADAPTER Adapter, struct pkt_attrib *pattrib);
  356. u8 SCMapping_92E(PADAPTER Adapter, struct pkt_attrib *pattrib);
  357. #endif //__RTL8192E_XMIT_H__