rtl8188e_recv.h 3.5 KB

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