1 /****************************************************************************** 2 * 3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. 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 * You should have received a copy of the GNU General Public License along with 15 * this program; if not, write to the Free Software Foundation, Inc., 16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA 17 * 18 * 19 ******************************************************************************/ 20 #ifndef __RTL8703B_RECV_H__ 21 #define __RTL8703B_RECV_H__ 22 23 #define RECV_BLK_SZ 512 24 #define RECV_BLK_CNT 16 25 #define RECV_BLK_TH RECV_BLK_CNT 26 27 #if defined(CONFIG_USB_HCI) 28 29 #ifndef MAX_RECVBUF_SZ 30 #ifdef PLATFORM_OS_CE 31 #define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */ 32 #else 33 #ifndef CONFIG_MINIMAL_MEMORY_USAGE 34 /* #define MAX_RECVBUF_SZ (32768) */ /* 32k */ 35 /* #define MAX_RECVBUF_SZ (16384) */ /* 16K */ 36 /* #define MAX_RECVBUF_SZ (10240) */ /* 10K */ 37 #ifdef CONFIG_PLATFORM_MSTAR 38 #define MAX_RECVBUF_SZ (8192) /* 8K */ 39 #else 40 #define MAX_RECVBUF_SZ (15360) /* 15k < 16k */ 41 #endif 42 /* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */ 43 #else 44 #define MAX_RECVBUF_SZ (4000) /* about 4K */ 45 #endif 46 #endif 47 #endif /* !MAX_RECVBUF_SZ */ 48 49 #elif defined(CONFIG_PCI_HCI) 50 /* #ifndef CONFIG_MINIMAL_MEMORY_USAGE */ 51 /* #define MAX_RECVBUF_SZ (9100) */ 52 /* #else */ 53 #define MAX_RECVBUF_SZ (4000) /* about 4K 54 * #endif */ 55 56 57 #elif defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) 58 59 #define MAX_RECVBUF_SZ (RX_DMA_SIZE_8703B - RX_DMA_RESERVED_SIZE_8703B) 60 61 #endif 62 63 /* Rx smooth factor */ 64 #define Rx_Smooth_Factor (20) 65 66 #ifdef CONFIG_SDIO_HCI 67 #ifndef CONFIG_SDIO_RX_COPY 68 #undef MAX_RECVBUF_SZ 69 #define MAX_RECVBUF_SZ (RX_DMA_SIZE_8703B - RX_DMA_RESERVED_SIZE_8703B) 70 #endif /* !CONFIG_SDIO_RX_COPY */ 71 #endif /* CONFIG_SDIO_HCI */ 72 73 #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) 74 s32 rtl8703bs_init_recv_priv(PADAPTER padapter); 75 void rtl8703bs_free_recv_priv(PADAPTER padapter); 76 #endif 77 78 #ifdef CONFIG_USB_HCI 79 int rtl8703bu_init_recv_priv(_adapter *padapter); 80 void rtl8703bu_free_recv_priv(_adapter *padapter); 81 void rtl8703bu_init_recvbuf(_adapter *padapter, struct recv_buf *precvbuf); 82 #endif 83 84 #ifdef CONFIG_PCI_HCI 85 s32 rtl8703be_init_recv_priv(PADAPTER padapter); 86 void rtl8703be_free_recv_priv(PADAPTER padapter); 87 #endif 88 89 void rtl8703b_query_rx_desc_status(union recv_frame *precvframe, u8 *pdesc); 90 91 #endif /* __RTL8703B_RECV_H__ */ 92