OSDN Git Service

5bdcb783d31f240deea66e318888582a57f4b900
[android-x86/external-modules-rtl8723au.git] / include / xmit_osdep.h
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
23 #include <drv_conf.h>
24 #include <osdep_service.h>
25 #include <drv_types.h>
26
27 struct pkt_file {
28         _pkt *pkt;
29         __kernel_size_t pkt_len;         //the remainder length of the open_file
30         unsigned char *cur_buffer;
31         u8 *buf_start;
32         u8 *cur_addr;
33         __kernel_size_t buf_len;
34 };
35
36
37 #define NR_XMITFRAME    256
38
39 struct xmit_priv;
40 struct pkt_attrib;
41 struct sta_xmit_priv;
42 struct xmit_frame;
43 struct xmit_buf;
44
45 extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
46
47 void rtw_os_xmit_schedule(_adapter *padapter);
48
49 int rtw_os_xmit_resource_alloc(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 alloc_sz);
50 void rtw_os_xmit_resource_free(_adapter *padapter, struct xmit_buf *pxmitbuf,u32 free_sz);
51
52 extern void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib);
53
54 extern uint rtw_remainder_len(struct pkt_file *pfile);
55 extern void _rtw_open_pktfile(_pkt *pkt, struct pkt_file *pfile);
56 extern uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen);
57 extern int rtw_endofpktfile (struct pkt_file *pfile);
58
59 extern void rtw_os_pkt_complete(_adapter *padapter, _pkt *pkt);
60 extern void rtw_os_xmit_complete(_adapter *padapter, struct xmit_frame *pxframe);
61
62 #endif //__XMIT_OSDEP_H_