rtl8822bu_hal.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2015 - 2016 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 _RTL8822BU_HAL_H_
  21. #define _RTL8822BU_HAL_H_
  22. #ifdef CONFIG_USB_HCI
  23. #include <drv_types.h> /* PADAPTER */
  24. #ifdef CONFIG_USB_HCI
  25. #ifdef USB_PACKET_OFFSET_SZ
  26. #define PACKET_OFFSET_SZ (USB_PACKET_OFFSET_SZ)
  27. #else
  28. #define PACKET_OFFSET_SZ (8)
  29. #endif
  30. #define TXDESC_OFFSET (TXDESC_SIZE + PACKET_OFFSET_SZ)
  31. #endif
  32. /* undefine MAX_RECVBUF_SZ from rtl8822b_hal.h */
  33. #ifdef MAX_RECVBUF_SZ
  34. #undef MAX_RECVBUF_SZ
  35. #endif
  36. /* recv_buffer must be large than usb agg size */
  37. #ifndef MAX_RECVBUF_SZ
  38. #ifdef PLATFORM_OS_CE
  39. #define MAX_RECVBUF_SZ (8192+1024)
  40. #else /* !PLATFORM_OS_CE */
  41. #ifndef CONFIG_MINIMAL_MEMORY_USAGE
  42. #define MAX_RECVBUF_SZ (32768)
  43. #else
  44. #define MAX_RECVBUF_SZ (4000)
  45. #endif
  46. #endif /* PLATFORM_OS_CE */
  47. #endif /* !MAX_RECVBUF_SZ */
  48. /* rtl8822bu_ops.c */
  49. void rtl8822bu_set_hal_ops(PADAPTER padapter);
  50. void rtl8822bu_set_hw_type(struct dvobj_priv *pdvobj);
  51. /* rtl8822bu_io.c */
  52. void rtl8822bu_set_intf_ops(struct _io_ops *pops);
  53. #endif /* CONFIG_USB_HCI */
  54. #endif /* _RTL8822BU_HAL_H_ */