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 /* minmum 4K, multiple of 8-byte is required, multiple of sdio block size is prefered */ 40 #define MAX_RECVBUF_SZ _RND(RX_DMA_BOUNDARY_8188F + 1, 8) 41 #endif /* CONFIG_SDIO_HCI */ 42 43 /* Rx smooth factor */ 44 #define Rx_Smooth_Factor (20) 45 46 #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) 47 s32 rtl8188fs_init_recv_priv(PADAPTER padapter); 48 void rtl8188fs_free_recv_priv(PADAPTER padapter); 49 s32 rtl8188fs_recv_hdl(_adapter *padapter); 50 #endif 51 52 #ifdef CONFIG_USB_HCI 53 int rtl8188fu_init_recv_priv(_adapter *padapter); 54 void rtl8188fu_free_recv_priv(_adapter *padapter); 55 void rtl8188fu_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf); 56 #endif 57 58 #ifdef CONFIG_PCI_HCI 59 s32 rtl8188fe_init_recv_priv(PADAPTER padapter); 60 void rtl8188fe_free_recv_priv(PADAPTER padapter); 61 #endif 62 63 void rtl8188f_query_rx_desc_status(union recv_frame *precvframe, u8 *pdesc); 64 65 #endif /* __RTL8188F_RECV_H__ */ 66