rtl8192c_recv.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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_RECV_H_
  21. #define _RTL8192C_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. #ifdef PLATFORM_OS_CE
  27. #define MAX_RECVBUF_SZ (8192+1024) // 8K+1k
  28. #else
  29. #ifndef CONFIG_MINIMAL_MEMORY_USAGE
  30. //#define MAX_RECVBUF_SZ (32768) // 32k
  31. //#define MAX_RECVBUF_SZ (16384) //16K
  32. //#define MAX_RECVBUF_SZ (10240) //10K
  33. #ifdef CONFIG_PLATFORM_MSTAR_TITANIA12
  34. #define MAX_RECVBUF_SZ (8192) // 8K
  35. #else
  36. #define MAX_RECVBUF_SZ (15360) // 15k < 16k
  37. #endif
  38. //#define MAX_RECVBUF_SZ (8192+1024) // 8K+1k
  39. #else
  40. #define MAX_RECVBUF_SZ (4000) // about 4K
  41. #endif
  42. #endif
  43. #elif defined(CONFIG_PCI_HCI)
  44. //#ifndef CONFIG_MINIMAL_MEMORY_USAGE
  45. // #define MAX_RECVBUF_SZ (9100)
  46. //#else
  47. #define MAX_RECVBUF_SZ (4000) // about 4K
  48. //#endif
  49. #elif defined(CONFIG_SDIO_HCI)
  50. #define MAX_RECVBUF_SZ (10240)
  51. #endif
  52. struct phy_stat
  53. {
  54. unsigned int phydw0;
  55. unsigned int phydw1;
  56. unsigned int phydw2;
  57. unsigned int phydw3;
  58. unsigned int phydw4;
  59. unsigned int phydw5;
  60. unsigned int phydw6;
  61. unsigned int phydw7;
  62. };
  63. // Rx smooth factor
  64. #define Rx_Smooth_Factor (20)
  65. #ifdef CONFIG_USB_HCI
  66. typedef struct _INTERRUPT_MSG_FORMAT_EX{
  67. unsigned int C2H_MSG0;
  68. unsigned int C2H_MSG1;
  69. unsigned int C2H_MSG2;
  70. unsigned int C2H_MSG3;
  71. unsigned int HISR; // from HISR Reg0x124, read to clear
  72. unsigned int HISRE;// from HISRE Reg0x12c, read to clear
  73. unsigned int MSG_EX;
  74. }INTERRUPT_MSG_FORMAT_EX,*PINTERRUPT_MSG_FORMAT_EX;
  75. void rtl8192cu_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf);
  76. int rtl8192cu_init_recv_priv(_adapter * padapter);
  77. void rtl8192cu_free_recv_priv(_adapter * padapter);
  78. #endif
  79. #ifdef CONFIG_PCI_HCI
  80. int rtl8192ce_init_recv_priv(_adapter * padapter);
  81. void rtl8192ce_free_recv_priv(_adapter * padapter);
  82. #endif
  83. void rtl8192c_translate_rx_signal_stuff(union recv_frame *precvframe, struct phy_stat *pphy_status);
  84. void rtl8192c_query_rx_desc_status(union recv_frame *precvframe, struct recv_stat *pdesc);
  85. #endif