xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8188fu/include/rtl8188f_recv.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2017 Realtek Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of version 2 of the GNU General Public License as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  *****************************************************************************/
16 #ifndef __RTL8188F_RECV_H__
17 #define __RTL8188F_RECV_H__
18 
19 #if defined(CONFIG_USB_HCI)
20 	#ifndef MAX_RECVBUF_SZ
21 
22 		#ifdef CONFIG_MINIMAL_MEMORY_USAGE
23 			#define MAX_RECVBUF_SZ (4000) /* about 4K */
24 		#else
25 			#ifdef CONFIG_PLATFORM_HISILICON
26 				#define MAX_RECVBUF_SZ (16384) /* 16k */
27 			#else
28 				#define MAX_RECVBUF_SZ (32768) /* 32k */
29 			#endif
30 			/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
31 			/* #define MAX_RECVBUF_SZ (10240)  */ /* 10K */
32 			/* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */
33 			/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k		 */
34 		#endif
35 	#endif /* !MAX_RECVBUF_SZ */
36 #elif defined(CONFIG_PCI_HCI)
37 	#define MAX_RECVBUF_SZ (4000) /* about 4K */
38 #elif defined(CONFIG_SDIO_HCI)
39 	#define MAX_RECVBUF_SZ (RX_DMA_BOUNDARY_8188F + 1)
40 #endif /* CONFIG_SDIO_HCI */
41 
42 /* Rx smooth factor */
43 #define	Rx_Smooth_Factor (20)
44 
45 #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
46 s32 rtl8188fs_init_recv_priv(PADAPTER padapter);
47 void rtl8188fs_free_recv_priv(PADAPTER padapter);
48 s32 rtl8188fs_recv_hdl(_adapter *padapter);
49 #endif
50 
51 #ifdef CONFIG_USB_HCI
52 int rtl8188fu_init_recv_priv(_adapter *padapter);
53 void rtl8188fu_free_recv_priv(_adapter *padapter);
54 void rtl8188fu_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf);
55 #endif
56 
57 #ifdef CONFIG_PCI_HCI
58 s32 rtl8188fe_init_recv_priv(PADAPTER padapter);
59 void rtl8188fe_free_recv_priv(PADAPTER padapter);
60 #endif
61 
62 void rtl8188f_query_rx_desc_status(union recv_frame *precvframe, u8 *pdesc);
63 
64 #endif /* __RTL8188F_RECV_H__ */
65