rtl8821a_xmit.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 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 __RTL8821A_XMIT_H__
  21. #define __RTL8821A_XMIT_H__
  22. #include <drv_types.h>
  23. typedef struct txdescriptor_8821a {
  24. /* Offset 0 */
  25. u32 pktlen:16;
  26. u32 offset:8;
  27. u32 bmc:1;
  28. u32 htc:1;
  29. u32 rsvd0026:1;
  30. u32 rsvd0027:1;
  31. u32 linip:1;
  32. u32 noacm:1;
  33. u32 gf:1;
  34. u32 rsvd0031:1;
  35. /* Offset 4 */
  36. u32 macid:7;
  37. u32 rsvd0407:1;
  38. u32 qsel:5;
  39. u32 rdg_nav_ext:1;
  40. u32 lsig_txop_en:1;
  41. u32 pifs:1;
  42. u32 rate_id:5;
  43. u32 en_desc_id:1;
  44. u32 sectype:2;
  45. u32 pkt_offset:5; /* unit: 8 bytes */
  46. u32 moredata:1;
  47. u32 txop_ps_cap:1;
  48. u32 txop_ps_mode:1;
  49. /* Offset 8 */
  50. u32 p_aid:9;
  51. u32 rsvd0809:1;
  52. u32 cca_rts:2;
  53. u32 agg_en:1;
  54. u32 rdg_en:1;
  55. u32 null_0:1;
  56. u32 null_1:1;
  57. u32 bk:1;
  58. u32 morefrag:1;
  59. u32 raw:1;
  60. u32 spe_rpt:1;
  61. u32 ampdu_density:3;
  62. u32 bt_null:1;
  63. u32 g_id:6;
  64. u32 rsvd0830:2;
  65. /* Offset 12 */
  66. u32 wheader_len:4;
  67. u32 chk_en:1;
  68. u32 early_rate:1;
  69. u32 hw_ssn_sel:2;
  70. u32 userate:1;
  71. u32 disrtsfb:1;
  72. u32 disdatafb:1;
  73. u32 cts2self:1;
  74. u32 rtsen:1;
  75. u32 hw_rts_en:1;
  76. u32 port_id:1;
  77. u32 navusehdr:1;
  78. u32 use_max_len:1;
  79. u32 max_agg_num:5;
  80. u32 ndpa:2;
  81. u32 ampdu_max_time:8;
  82. /* Offset 16 */
  83. u32 datarate:7;
  84. u32 try_rate:1;
  85. u32 data_ratefb_lmt:5;
  86. u32 rts_ratefb_lmt:4;
  87. u32 rty_lmt_en:1;
  88. u32 data_rt_lmt:6;
  89. u32 rtsrate:5;
  90. u32 pcts_en:1;
  91. u32 pcts_mask_idx:2;
  92. /* Offset 20 */
  93. u32 data_sc:4;
  94. u32 data_short:1;
  95. u32 data_bw:2;
  96. u32 data_ldpc:1;
  97. u32 data_stbc:2;
  98. u32 vcs_stbc:2;
  99. u32 rts_short:1;
  100. u32 rts_sc:4;
  101. u32 rsvd2016:7;
  102. u32 tx_ant:4;
  103. u32 txpwr_offset:3;
  104. u32 rsvd2031:1;
  105. /* Offset 24 */
  106. u32 sw_define:12;
  107. u32 mbssid:4;
  108. u32 antsel_A:3;
  109. u32 antsel_B:3;
  110. u32 antsel_C:3;
  111. u32 antsel_D:3;
  112. u32 rsvd2428:4;
  113. /* Offset 28 */
  114. u32 checksum:16;
  115. u32 rsvd2816:8;
  116. u32 usb_txagg_num:8;
  117. /* Offset 32 */
  118. u32 rts_rc:6;
  119. u32 bar_rty_th:2;
  120. u32 data_rc:6;
  121. u32 rsvd3214:1;
  122. u32 en_hwseq:1;
  123. u32 nextneadpage:8;
  124. u32 tailpage:8;
  125. /* Offset 36 */
  126. u32 padding_len:11;
  127. u32 txbf_path:1;
  128. u32 seq:12;
  129. u32 final_data_rate:8;
  130. } TXDESC_8821A, *PTXDESC_8821A;
  131. #ifdef CONFIG_SDIO_HCI
  132. s32 InitXmitPriv8821AS(PADAPTER padapter);
  133. void FreeXmitPriv8821AS(PADAPTER padapter);
  134. s32 XmitBufHandler8821AS(PADAPTER padapter);
  135. s32 MgntXmit8821AS(PADAPTER padapter, struct xmit_frame *pmgntframe);
  136. s32 HalXmitNoLock8821AS(PADAPTER padapter, struct xmit_frame *pxmitframe);
  137. s32 HalXmit8821AS(PADAPTER padapter, struct xmit_frame *pxmitframe);
  138. #ifndef CONFIG_SDIO_TX_TASKLET
  139. thread_return XmitThread8821AS(thread_context context);
  140. #endif /* !CONFIG_SDIO_TX_TASKLET */
  141. #endif /* CONFIG_SDIO_HCI */
  142. #if 0
  143. #ifdef CONFIG_USB_HCI
  144. s32 rtl8821au_init_xmit_priv(PADAPTER padapter);
  145. void rtl8821au_free_xmit_priv(PADAPTER padapter);
  146. s32 rtl8821au_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
  147. s32 rtl8821au_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
  148. s32 rtl8821au_hal_xmitframe_enqueue(PADAPTER padapter, struct xmit_frame *pxmitframe);
  149. s32 rtl8821au_xmit_buf_handler(PADAPTER padapter);
  150. void rtl8821au_xmit_tasklet(void *priv);
  151. s32 rtl8821au_xmitframe_complete(PADAPTER padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
  152. #endif /* CONFIG_USB_HCI */
  153. #ifdef CONFIG_PCI_HCI
  154. s32 rtl8821e_init_xmit_priv(PADAPTER padapter);
  155. void rtl8821e_free_xmit_priv(PADAPTER padapter);
  156. struct xmit_buf *rtl8821e_dequeue_xmitbuf(struct rtw_tx_ring *ring);
  157. void rtl8821e_xmitframe_resume(PADAPTER padapter);
  158. s32 rtl8821e_hal_xmit(PADAPTER padapter, struct xmit_frame *pxmitframe);
  159. s32 rtl8821e_mgnt_xmit(PADAPTER padapter, struct xmit_frame *pmgntframe);
  160. void rtl8821e_xmit_tasklet(void *priv);
  161. #endif /* CONFIG_PCI_HCI */
  162. #endif
  163. #endif /* __RTL8821_XMIT_H__ */