xmit_osdep.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 __XMIT_OSDEP_H_
  16. #define __XMIT_OSDEP_H_
  17. struct pkt_file {
  18. _pkt *pkt;
  19. SIZE_T pkt_len; /* the remainder length of the open_file */
  20. _buffer *cur_buffer;
  21. u8 *buf_start;
  22. u8 *cur_addr;
  23. SIZE_T buf_len;
  24. };
  25. #ifdef PLATFORM_WINDOWS
  26. #ifdef PLATFORM_OS_XP
  27. #ifdef CONFIG_USB_HCI
  28. #include <usb.h>
  29. #include <usbdlib.h>
  30. #include <usbioctl.h>
  31. #endif
  32. #endif
  33. #ifdef CONFIG_GSPI_HCI
  34. #define NR_XMITFRAME 64
  35. #else
  36. #define NR_XMITFRAME 128
  37. #endif
  38. #define ETH_ALEN 6
  39. extern NDIS_STATUS rtw_xmit_entry(
  40. IN _nic_hdl cnxt,
  41. IN NDIS_PACKET *pkt,
  42. IN UINT flags
  43. );
  44. #endif /* PLATFORM_WINDOWS */
  45. #ifdef PLATFORM_FREEBSD
  46. #define NR_XMITFRAME 256
  47. extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
  48. extern void rtw_xmit_entry_wrap(struct ifnet *pifp);
  49. #endif /* PLATFORM_FREEBSD */
  50. #ifdef PLATFORM_LINUX
  51. #define NR_XMITFRAME 256
  52. struct xmit_priv;
  53. struct pkt_attrib;
  54. struct sta_xmit_priv;
  55. struct xmit_frame;
  56. struct xmit_buf;
  57. extern int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
  58. extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
  59. #endif /* PLATFORM_LINUX */
  60. void rtw_os_xmit_schedule(_adapter *padapter);
  61. int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf, u32 alloc_sz, u8 flag);
  62. void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf, u32 free_sz, u8 flag);
  63. extern void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib);
  64. extern uint rtw_remainder_len(struct pkt_file *pfile);
  65. extern void _rtw_open_pktfile(_pkt *pkt, struct pkt_file *pfile);
  66. extern uint _rtw_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen);
  67. extern sint rtw_endofpktfile(struct pkt_file *pfile);
  68. extern void rtw_os_pkt_complete(_adapter *padapter, _pkt *pkt);
  69. extern void rtw_os_xmit_complete(_adapter *padapter, struct xmit_frame *pxframe);
  70. void rtw_os_wake_queue_at_free_stainfo(_adapter *padapter, int *qcnt_freed);
  71. void dump_os_queue(void *sel, _adapter *padapter);
  72. #endif /* __XMIT_OSDEP_H_ */