xmit_osdep.h 2.8 KB

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