GNU Linux-libre 4.14.332-gnu1
[releases.git] / drivers / staging / rtl8723bs / 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  ******************************************************************************/
15 #ifndef __XMIT_OSDEP_H_
16 #define __XMIT_OSDEP_H_
17
18
19 struct pkt_file {
20         _pkt *pkt;
21         __kernel_size_t pkt_len;         /* the remainder length of the open_file */
22         _buffer *cur_buffer;
23         u8 *buf_start;
24         u8 *cur_addr;
25         __kernel_size_t buf_len;
26 };
27
28 #define NR_XMITFRAME    256
29
30 struct xmit_priv;
31 struct pkt_attrib;
32 struct sta_xmit_priv;
33 struct xmit_frame;
34 struct xmit_buf;
35
36 extern int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
37 extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
38
39 void rtw_os_xmit_schedule(struct adapter *padapter);
40
41 int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 alloc_sz, u8 flag);
42 void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 free_sz, u8 flag);
43
44 extern void rtw_set_tx_chksum_offload(_pkt *pkt, struct pkt_attrib *pattrib);
45
46 extern uint rtw_remainder_len(struct pkt_file *pfile);
47 extern void _rtw_open_pktfile(_pkt *pkt, struct pkt_file *pfile);
48 extern uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen);
49 extern sint rtw_endofpktfile (struct pkt_file *pfile);
50
51 extern void rtw_os_pkt_complete(struct adapter *padapter, _pkt *pkt);
52 extern void rtw_os_xmit_complete(struct adapter *padapter, struct xmit_frame *pxframe);
53
54 #endif /* __XMIT_OSDEP_H_ */