xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8723ds/include/rtw_mem.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2019 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 __RTW_MEM_H__
17 #define __RTW_MEM_H__
18 
19 #include <drv_conf.h>
20 #include <basic_types.h>
21 #include <osdep_service.h>
22 
23 #ifdef CONFIG_SDIO_HCI
24 #define MAX_RTKM_RECVBUF_SZ		MAX_RECVBUF_SZ
25 #define MAX_RTKM_NR_PREALLOC_RECV_SKB	NR_RECVBUFF
26 #else /* !CONFIG_SDIO_HCI */
27 #ifdef CONFIG_PLATFORM_MSTAR_HIGH
28 	#define MAX_RTKM_RECVBUF_SZ (31744) /* 31k */
29 #else
30 	#define MAX_RTKM_RECVBUF_SZ (15360) /* 15k */
31 #endif /* CONFIG_PLATFORM_MSTAR_HIGH */
32 #define MAX_RTKM_NR_PREALLOC_RECV_SKB 16
33 #endif /* !CONFIG_SDIO_HCI */
34 
35 u16 rtw_rtkm_get_buff_size(void);
36 u8 rtw_rtkm_get_nr_recv_skb(void);
37 struct u8 *rtw_alloc_revcbuf_premem(void);
38 struct sk_buff *rtw_alloc_skb_premem(u16 in_size);
39 int rtw_free_skb_premem(struct sk_buff *pskb);
40 
41 
42 #endif /* __RTW_MEM_H__ */
43