rtl8723b_recv.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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 __RTL8723B_RECV_H__
  21. #define __RTL8723B_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 (RX_DMA_SIZE_8723B - RX_DMA_RESERVED_SIZE_8723B)
  53. #endif
  54. /* Rx smooth factor */
  55. #define Rx_Smooth_Factor (20)
  56. #ifdef CONFIG_SDIO_HCI
  57. #ifndef CONFIG_SDIO_RX_COPY
  58. #undef MAX_RECVBUF_SZ
  59. #define MAX_RECVBUF_SZ (RX_DMA_SIZE_8723B - RX_DMA_RESERVED_SIZE_8723B)
  60. #endif /* !CONFIG_SDIO_RX_COPY */
  61. #endif /* CONFIG_SDIO_HCI */
  62. #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
  63. s32 rtl8723bs_init_recv_priv(PADAPTER padapter);
  64. void rtl8723bs_free_recv_priv(PADAPTER padapter);
  65. #endif
  66. #ifdef CONFIG_USB_HCI
  67. int rtl8723bu_init_recv_priv(_adapter *padapter);
  68. void rtl8723bu_free_recv_priv(_adapter *padapter);
  69. void rtl8723bu_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf);
  70. #endif
  71. #ifdef CONFIG_PCI_HCI
  72. s32 rtl8723be_init_recv_priv(PADAPTER padapter);
  73. void rtl8723be_free_recv_priv(PADAPTER padapter);
  74. #endif
  75. void rtl8723b_query_rx_desc_status(union recv_frame *precvframe, u8 *pdesc);
  76. #endif /* __RTL8723B_RECV_H__ */