rtl8192c_xmit.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 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 _RTL8192C_XMIT_H_
  21. #define _RTL8192C_XMIT_H_
  22. //
  23. //defined for TX DESC Operation
  24. //
  25. #define MAX_TID (15)
  26. //OFFSET 0
  27. #define OFFSET_SZ 0
  28. #define OFFSET_SHT 16
  29. #define BMC BIT(24)
  30. #define LSG BIT(26)
  31. #define FSG BIT(27)
  32. #define OWN BIT(31)
  33. //OFFSET 4
  34. #define PKT_OFFSET_SZ 0
  35. #define BK BIT(6)
  36. #define QSEL_SHT 8
  37. #define Rate_ID_SHT 16
  38. #define NAVUSEHDR BIT(20)
  39. #define PKT_OFFSET_SHT 26
  40. #define HWPC BIT(31)
  41. //OFFSET 8
  42. #define AGG_EN BIT(29)
  43. //OFFSET 12
  44. #define SEQ_SHT 16
  45. //OFFSET 16
  46. #define QoS BIT(6)
  47. #define HW_SEQ_EN BIT(7)
  48. #define USERATE BIT(8)
  49. #define DISDATAFB BIT(10)
  50. #define DATA_SHORT BIT(24)
  51. #define DATA_BW BIT(25)
  52. //OFFSET 20
  53. #define SGI BIT(6)
  54. //
  55. // Queue Select Value in TxDesc
  56. //
  57. #define QSLT_BK 0x2//0x01
  58. #define QSLT_BE 0x0
  59. #define QSLT_VI 0x5//0x4
  60. #define QSLT_VO 0x7//0x6
  61. #define QSLT_BEACON 0x10
  62. #define QSLT_HIGH 0x11
  63. #define QSLT_MGNT 0x12
  64. #define QSLT_CMD 0x13
  65. struct txrpt_ccx_8192c {
  66. /* offset 0 */
  67. u8 retry_cnt:6;
  68. u8 rsvd_0:2;
  69. /* offset 1 */
  70. u8 rts_retry_cnt:6;
  71. u8 rsvd_1:2;
  72. /* offset 2 */
  73. u8 ccx_qtime0;
  74. u8 ccx_qtime1;
  75. /* offset 4 */
  76. u8 missed_pkt_num:5;
  77. u8 rsvd_4:3;
  78. /* offset 5 */
  79. u8 mac_id:5;
  80. u8 des1_fragssn:3;
  81. /* offset 6 */
  82. u8 rpt_pkt_num:5;
  83. u8 pkt_drop:1;
  84. u8 lifetime_over:1;
  85. u8 retry_over:1;
  86. /* offset 7*/
  87. u8 edca_tx_queue:4;
  88. u8 rsvd_7:1;
  89. u8 bmc:1;
  90. u8 pkt_ok:1;
  91. u8 int_ccx:1;
  92. };
  93. #define txrpt_ccx_qtime_8192c(txrpt_ccx) ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8))
  94. #ifdef CONFIG_XMIT_ACK
  95. void dump_txrpt_ccx_8192c(void *buf);
  96. void handle_txrpt_ccx_8192c(_adapter *adapter, void *buf);
  97. #else
  98. #define dump_txrpt_ccx_8192c(buf) do {} while(0)
  99. #define handle_txrpt_ccx_8192c(adapter, buf) do {} while(0)
  100. #endif
  101. #ifdef CONFIG_USB_HCI
  102. s32 rtl8192cu_init_xmit_priv(_adapter * padapter);
  103. void rtl8192cu_free_xmit_priv(_adapter * padapter);
  104. void rtl8192cu_cal_txdesc_chksum(struct tx_desc *ptxdesc);
  105. s32 rtl8192cu_xmitframe_complete(_adapter *padapter, struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf);
  106. s32 rtl8192cu_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe);
  107. s32 rtl8192cu_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe);
  108. s32 rtl8192cu_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
  109. #ifdef CONFIG_HOSTAPD_MLME
  110. s32 rtl8192cu_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt);
  111. #endif
  112. #endif
  113. #ifdef CONFIG_PCI_HCI
  114. s32 rtl8192ce_init_xmit_priv(_adapter * padapter);
  115. void rtl8192ce_free_xmit_priv(_adapter * padapter);
  116. s32 rtl8192ce_enqueue_xmitbuf(struct rtw_tx_ring *ring, struct xmit_buf *pxmitbuf);
  117. struct xmit_buf *rtl8192ce_dequeue_xmitbuf(struct rtw_tx_ring *ring);
  118. void rtl8192ce_xmitframe_resume(_adapter *padapter);
  119. s32 rtl8192ce_mgnt_xmit(_adapter *padapter, struct xmit_frame *pmgntframe);
  120. s32 rtl8192ce_hal_xmit(_adapter *padapter, struct xmit_frame *pxmitframe);
  121. s32 rtl8192ce_hal_xmitframe_enqueue(_adapter *padapter, struct xmit_frame *pxmitframe);
  122. #ifdef CONFIG_HOSTAPD_MLME
  123. s32 rtl8192ce_hostap_mgnt_xmit_entry(_adapter *padapter, _pkt *pkt);
  124. #endif
  125. #endif
  126. #endif