Linux-libre 4.9.88-gnu
[librecmc/linux-libre.git] / drivers / staging / rtl8188eu / 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 #include <osdep_service.h>
19 #include <drv_types.h>
20
21 struct pkt_file {
22         struct sk_buff *pkt;
23         size_t pkt_len;  /* the remainder length of the open_file */
24         unsigned char *cur_buffer;
25         u8 *buf_start;
26         u8 *cur_addr;
27         size_t buf_len;
28 };
29
30 #define NR_XMITFRAME    256
31
32 struct xmit_priv;
33 struct pkt_attrib;
34 struct sta_xmit_priv;
35 struct xmit_frame;
36 struct xmit_buf;
37
38 int rtw_xmit_entry(struct sk_buff *pkt, struct  net_device *pnetdev);
39
40 void rtw_os_xmit_schedule(struct adapter *padapter);
41
42 int rtw_os_xmit_resource_alloc(struct adapter *padapter,
43                                struct xmit_buf *pxmitbuf, u32 alloc_sz);
44 void rtw_os_xmit_resource_free(struct adapter *padapter,
45                                struct xmit_buf *pxmitbuf, u32 free_sz);
46
47 uint rtw_remainder_len(struct pkt_file *pfile);
48 void _rtw_open_pktfile(struct sk_buff *pkt, struct pkt_file *pfile);
49 uint _rtw_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen);
50 int rtw_endofpktfile(struct pkt_file *pfile);
51
52 void rtw_os_pkt_complete(struct adapter *padapter, struct sk_buff *pkt);
53 void rtw_os_xmit_complete(struct adapter *padapter,
54                           struct xmit_frame *pxframe);
55
56 #endif /* __XMIT_OSDEP_H_ */