1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5  *
6  ******************************************************************************/
7 #ifndef __XMIT_OSDEP_H_
8 #define __XMIT_OSDEP_H_
9 
10 
11 struct pkt_file {
12 	struct sk_buff *pkt;
13 	__kernel_size_t pkt_len;	 /* the remainder length of the open_file */
14 	unsigned char *cur_buffer;
15 	u8 *buf_start;
16 	u8 *cur_addr;
17 	__kernel_size_t buf_len;
18 };
19 
20 #define NR_XMITFRAME	256
21 
22 struct xmit_priv;
23 struct pkt_attrib;
24 struct sta_xmit_priv;
25 struct xmit_frame;
26 struct xmit_buf;
27 
28 extern void _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev);
29 extern netdev_tx_t rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev);
30 
31 void rtw_os_xmit_schedule(struct adapter *padapter);
32 
33 int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 alloc_sz, u8 flag);
34 void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf, u32 free_sz, u8 flag);
35 
36 extern uint rtw_remainder_len(struct pkt_file *pfile);
37 extern void _rtw_open_pktfile(struct sk_buff *pkt, struct pkt_file *pfile);
38 extern uint _rtw_pktfile_read(struct pkt_file *pfile, u8 *rmem, uint rlen);
39 extern signed int rtw_endofpktfile(struct pkt_file *pfile);
40 
41 extern void rtw_os_pkt_complete(struct adapter *padapter, struct sk_buff *pkt);
42 extern void rtw_os_xmit_complete(struct adapter *padapter, struct xmit_frame *pxframe);
43 
44 #endif /* __XMIT_OSDEP_H_ */
45