rtl8712_xmit.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2010 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. * Modifications for inclusion into the Linux staging tree are
  19. * Copyright(c) 2010 Larry Finger. All rights reserved.
  20. *
  21. * Contact information:
  22. * WLAN FAE <wlanfae@realtek.com>
  23. * Larry Finger <Larry.Finger@lwfinger.net>
  24. *
  25. ******************************************************************************/
  26. #ifndef _RTL8712_XMIT_H_
  27. #define _RTL8712_XMIT_H_
  28. #define HWXMIT_ENTRY 4
  29. #define VO_QUEUE_INX 0
  30. #define VI_QUEUE_INX 1
  31. #define BE_QUEUE_INX 2
  32. #define BK_QUEUE_INX 3
  33. #define TS_QUEUE_INX 4
  34. #define MGT_QUEUE_INX 5
  35. #define BMC_QUEUE_INX 6
  36. #define BCN_QUEUE_INX 7
  37. #define HW_QUEUE_ENTRY 8
  38. #define TXDESC_SIZE 32
  39. #define TXDESC_OFFSET TXDESC_SIZE
  40. #define NR_AMSDU_XMITFRAME 8
  41. #define NR_TXAGG_XMITFRAME 8
  42. #define MAX_AMSDU_XMITBUF_SZ 8704
  43. #define MAX_TXAGG_XMITBUF_SZ 16384 /*16k*/
  44. #define tx_cmd tx_desc
  45. /*
  46. *defined for TX DESC Operation
  47. */
  48. #define MAX_TID (15)
  49. /*OFFSET 0*/
  50. #define OFFSET_SZ (0)
  51. #define OFFSET_SHT (16)
  52. #define OWN BIT(31)
  53. #define FSG BIT(27)
  54. #define LSG BIT(26)
  55. #define TYPE_SHT (24)
  56. #define TYPE_MSK (0x03000000)
  57. /*OFFSET 4*/
  58. #define PKT_OFFSET_SZ (0)
  59. #define QSEL_SHT (8)
  60. #define HWPC BIT(31)
  61. /*OFFSET 8*/
  62. #define BMC BIT(7)
  63. #define BK BIT(30)
  64. #define AGG_EN BIT(29)
  65. #define RTS_RC_SHT (16)
  66. /*OFFSET 12*/
  67. #define SEQ_SHT (16)
  68. /*OFFSET 16*/
  69. #define TXBW BIT(18)
  70. /*OFFSET 20*/
  71. #define DISFB BIT(15)
  72. #define RSVD6_MSK (0x00E00000)
  73. #define RSVD6_SHT (21)
  74. struct tx_desc {
  75. /*DWORD 0*/
  76. unsigned int txdw0;
  77. unsigned int txdw1;
  78. unsigned int txdw2;
  79. unsigned int txdw3;
  80. unsigned int txdw4;
  81. unsigned int txdw5;
  82. unsigned int txdw6;
  83. unsigned int txdw7;
  84. };
  85. union txdesc {
  86. struct tx_desc txdesc;
  87. unsigned int value[TXDESC_SIZE>>2];
  88. };
  89. int r8712_xmitframe_complete(struct _adapter *padapter,
  90. struct xmit_priv *pxmitpriv,
  91. struct xmit_buf *pxmitbuf);
  92. void r8712_do_queue_select(struct _adapter *padapter,
  93. struct pkt_attrib *pattrib);
  94. #ifdef CONFIG_R8712_TX_AGGR
  95. u8 r8712_xmitframe_aggr_1st(struct xmit_buf *pxmitbuf,
  96. struct xmit_frame *pxmitframe);
  97. u8 r8712_dump_aggr_xframe(struct xmit_buf *pxmitbuf,
  98. struct xmit_frame *pxmitframe);
  99. #endif
  100. #endif