rtl8822bu_hal.h 1.9 KB

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