xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8723bs/include/rtl8822bu_hal.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2015 - 2017 Realtek Corporation.
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 _RTL8822BU_HAL_H_
16 #define _RTL8822BU_HAL_H_
17 
18 #ifdef CONFIG_USB_HCI
19 	#include <drv_types.h>		/* PADAPTER */
20 
21 	#ifdef CONFIG_USB_HCI
22 		#ifdef USB_PACKET_OFFSET_SZ
23 			#define PACKET_OFFSET_SZ (USB_PACKET_OFFSET_SZ)
24 		#else
25 			#define PACKET_OFFSET_SZ (8)
26 		#endif
27 		#define TXDESC_OFFSET (TXDESC_SIZE + PACKET_OFFSET_SZ)
28 	#endif
29 
30 	/* undefine MAX_RECVBUF_SZ from rtl8822b_hal.h  */
31 	#ifdef MAX_RECVBUF_SZ
32 		#undef MAX_RECVBUF_SZ
33 	#endif
34 
35 	/* recv_buffer must be large than usb agg size */
36 	#ifndef MAX_RECVBUF_SZ
37 		#ifdef PLATFORM_OS_CE
38 			#define MAX_RECVBUF_SZ (8192+1024)
39 		#else /* !PLATFORM_OS_CE */
40 			#ifndef CONFIG_MINIMAL_MEMORY_USAGE
41 				#ifdef CONFIG_PLATFORM_NOVATEK_NT72668
42 				#define MAX_RECVBUF_SZ (15360) /* 15k */
43 				#elif defined(CONFIG_PLATFORM_HISILICON)
44 				/* use 16k to workaround for HISILICON platform */
45 				#define MAX_RECVBUF_SZ (16384)
46 				#else
47 				#define MAX_RECVBUF_SZ (32768)
48 				#endif
49 			#else
50 				#define MAX_RECVBUF_SZ (4000)
51 			#endif
52 		#endif /* PLATFORM_OS_CE */
53 	#endif /* !MAX_RECVBUF_SZ */
54 
55 	/* rtl8822bu_ops.c */
56 	void rtl8822bu_set_hal_ops(PADAPTER padapter);
57 	void rtl8822bu_set_hw_type(struct dvobj_priv *pdvobj);
58 
59 	/* rtl8822bu_io.c */
60 	void rtl8822bu_set_intf_ops(struct _io_ops *pops);
61 
62 #endif /* CONFIG_USB_HCI */
63 
64 
65 #endif /* _RTL8822BU_HAL_H_ */
66