1 /****************************************************************************** 2 * 3 * Copyright(c) 2007 - 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 __RTL8723B_RECV_H__ 16 #define __RTL8723B_RECV_H__ 17 18 #define RECV_BLK_SZ 512 19 #define RECV_BLK_CNT 16 20 #define RECV_BLK_TH RECV_BLK_CNT 21 22 #if defined(CONFIG_USB_HCI) 23 24 #ifndef MAX_RECVBUF_SZ 25 #ifndef CONFIG_MINIMAL_MEMORY_USAGE 26 /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */ 27 /* #define MAX_RECVBUF_SZ (16384) */ /* 16K */ 28 /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ 29 #ifdef CONFIG_PLATFORM_MSTAR 30 #define MAX_RECVBUF_SZ (8192) /* 8K */ 31 #else 32 #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ 33 #endif 34 /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ 35 #else 36 #define MAX_RECVBUF_SZ (4000) /* about 4K */ 37 #endif 38 #endif /* !MAX_RECVBUF_SZ */ 39 40 #elif defined(CONFIG_PCI_HCI) 41 /* #ifndef CONFIG_MINIMAL_MEMORY_USAGE */ 42 /* #define MAX_RECVBUF_SZ (9100) */ 43 /* #else */ 44 #define MAX_RECVBUF_SZ (4000) /* about 4K 45 * #endif */ 46 47 48 #elif defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) 49 50 #define MAX_RECVBUF_SZ (RX_DMA_SIZE_8723B - RX_DMA_RESERVED_SIZE_8723B) 51 52 #endif 53 54 /* Rx smooth factor */ 55 #define Rx_Smooth_Factor (20) 56 57 #ifdef CONFIG_SDIO_HCI 58 #ifndef CONFIG_SDIO_RX_COPY 59 #undef MAX_RECVBUF_SZ 60 #define MAX_RECVBUF_SZ (RX_DMA_SIZE_8723B - RX_DMA_RESERVED_SIZE_8723B) 61 #endif /* !CONFIG_SDIO_RX_COPY */ 62 #endif /* CONFIG_SDIO_HCI */ 63 64 #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) 65 s32 rtl8723bs_init_recv_priv(PADAPTER padapter); 66 void rtl8723bs_free_recv_priv(PADAPTER padapter); 67 #endif 68 69 #ifdef CONFIG_USB_HCI 70 int rtl8723bu_init_recv_priv(_adapter *padapter); 71 void rtl8723bu_free_recv_priv(_adapter *padapter); 72 void rtl8723bu_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf); 73 #endif 74 75 #ifdef CONFIG_PCI_HCI 76 s32 rtl8723be_init_recv_priv(PADAPTER padapter); 77 void rtl8723be_free_recv_priv(PADAPTER padapter); 78 #endif 79 80 void rtl8723b_query_rx_desc_status(union recv_frame *precvframe, u8 *pdesc); 81 82 #endif /* __RTL8723B_RECV_H__ */ 83