1 /******************************************************************************
3 * Copyright(c) 2007 - 2017 Realtek Corporation.
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.
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
14 *****************************************************************************/
15 #ifndef __XMIT_OSDEP_H_
16 #define __XMIT_OSDEP_H_
21 SIZE_T pkt_len; /* the remainder length of the open_file */
28 #ifdef PLATFORM_WINDOWS
38 #ifdef CONFIG_GSPI_HCI
39 #define NR_XMITFRAME 64
41 #define NR_XMITFRAME 128
46 extern NDIS_STATUS rtw_xmit_entry(
52 #endif /* PLATFORM_WINDOWS */
54 #ifdef PLATFORM_FREEBSD
55 #define NR_XMITFRAME 256
56 extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
57 extern void rtw_xmit_entry_wrap(struct ifnet *pifp);
58 #endif /* PLATFORM_FREEBSD */
62 #define NR_XMITFRAME 256
70 extern int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
71 extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
73 #endif /* PLATFORM_LINUX */
75 void rtw_os_xmit_schedule(_adapter *padapter);
77 int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf, u32 alloc_sz, u8 flag);
78 void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf, u32 free_sz, u8 flag);
80 extern void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib);
82 extern uint rtw_remainder_len(struct pkt_file *pfile);
83 extern void _rtw_open_pktfile(_pkt *pkt, struct pkt_file *pfile);
84 extern uint _rtw_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen);
85 extern sint rtw_endofpktfile(struct pkt_file *pfile);
87 extern void rtw_os_pkt_complete(_adapter *padapter, _pkt *pkt);
88 extern void rtw_os_xmit_complete(_adapter *padapter, struct xmit_frame *pxframe);
90 void rtw_os_wake_queue_at_free_stainfo(_adapter *padapter, int *qcnt_freed);
92 void dump_os_queue(void *sel, _adapter *padapter);
94 #endif /* __XMIT_OSDEP_H_ */