rtl8188e_recv.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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 __RTL8188E_RECV_H__
  21. #define __RTL8188E_RECV_H__
  22. #define RECV_BLK_SZ 512
  23. #define RECV_BLK_CNT 16
  24. #define RECV_BLK_TH RECV_BLK_CNT
  25. #if defined(CONFIG_USB_HCI)
  26. #ifndef MAX_RECVBUF_SZ
  27. #ifdef PLATFORM_OS_CE
  28. #define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
  29. #else
  30. #ifndef CONFIG_MINIMAL_MEMORY_USAGE
  31. /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
  32. /* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
  33. /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
  34. #ifdef CONFIG_PLATFORM_MSTAR
  35. #define MAX_RECVBUF_SZ (8192) /* 8K */
  36. #else
  37. #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
  38. #endif
  39. /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
  40. #else
  41. #define MAX_RECVBUF_SZ (4000) /* about 4K */
  42. #endif
  43. #endif
  44. #endif /* !MAX_RECVBUF_SZ */
  45. #elif defined(CONFIG_PCI_HCI)
  46. /* #ifndef CONFIG_MINIMAL_MEMORY_USAGE */
  47. /* #define MAX_RECVBUF_SZ (9100) */
  48. /* #else */
  49. #define MAX_RECVBUF_SZ (4000) /* about 4K
  50. * #endif */
  51. #elif defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
  52. #define MAX_RECVBUF_SZ (10240)
  53. #endif
  54. /* Rx smooth factor */
  55. #define Rx_Smooth_Factor (20)
  56. #define TX_RPT1_PKT_LEN 8
  57. typedef struct rxreport_8188e {
  58. /* Offset 0 */
  59. u32 pktlen:14;
  60. u32 crc32:1;
  61. u32 icverr:1;
  62. u32 drvinfosize:4;
  63. u32 security:3;
  64. u32 qos:1;
  65. u32 shift:2;
  66. u32 physt:1;
  67. u32 swdec:1;
  68. u32 ls:1;
  69. u32 fs:1;
  70. u32 eor:1;
  71. u32 own:1;
  72. /* Offset 4 */
  73. u32 macid:5;
  74. u32 tid:4;
  75. u32 hwrsvd:4;
  76. u32 amsdu:1;
  77. u32 paggr:1;
  78. u32 faggr:1;
  79. u32 a1fit:4;
  80. u32 a2fit:4;
  81. u32 pam:1;
  82. u32 pwr:1;
  83. u32 md:1;
  84. u32 mf:1;
  85. u32 type:2;
  86. u32 mc:1;
  87. u32 bc:1;
  88. /* Offset 8 */
  89. u32 seq:12;
  90. u32 frag:4;
  91. u32 nextpktlen:14;
  92. u32 nextind:1;
  93. u32 rsvd0831:1;
  94. /* Offset 12 */
  95. u32 rxmcs:6;
  96. u32 rxht:1;
  97. u32 gf:1;
  98. u32 splcp:1;
  99. u32 bw:1;
  100. u32 htc:1;
  101. u32 eosp:1;
  102. u32 bssidfit:2;
  103. u32 rpt_sel:2;
  104. u32 rsvd1216:13;
  105. u32 pattern_match:1;
  106. u32 unicastwake:1;
  107. u32 magicwake:1;
  108. /* Offset 16 */
  109. /*
  110. u32 pattern0match:1;
  111. u32 pattern1match:1;
  112. u32 pattern2match:1;
  113. u32 pattern3match:1;
  114. u32 pattern4match:1;
  115. u32 pattern5match:1;
  116. u32 pattern6match:1;
  117. u32 pattern7match:1;
  118. u32 pattern8match:1;
  119. u32 pattern9match:1;
  120. u32 patternamatch:1;
  121. u32 patternbmatch:1;
  122. u32 patterncmatch:1;
  123. u32 rsvd1613:19;
  124. */
  125. u32 rsvd16;
  126. /* Offset 20 */
  127. u32 tsfl;
  128. /* Offset 24 */
  129. u32 bassn:12;
  130. u32 bavld:1;
  131. u32 rsvd2413:19;
  132. } RXREPORT, *PRXREPORT;
  133. #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
  134. s32 rtl8188es_init_recv_priv(PADAPTER padapter);
  135. void rtl8188es_free_recv_priv(PADAPTER padapter);
  136. #endif
  137. #ifdef CONFIG_USB_HCI
  138. void rtl8188eu_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf);
  139. s32 rtl8188eu_init_recv_priv(PADAPTER padapter);
  140. void rtl8188eu_free_recv_priv(PADAPTER padapter);
  141. #endif
  142. #ifdef CONFIG_PCI_HCI
  143. s32 rtl8188ee_init_recv_priv(PADAPTER padapter);
  144. void rtl8188ee_free_recv_priv(PADAPTER padapter);
  145. #endif
  146. void rtl8188e_query_rx_desc_status(union recv_frame *precvframe, struct recv_stat *prxstat);
  147. #endif /* __RTL8188E_RECV_H__ */