GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / et / sys / et_linux.h
blob4676188b03bc4ce9ccf3236c3ac4b565f6feb7d0
1 /*
2 * Linux device driver tunables for
3 * Broadcom BCM47XX 10/100Mbps Ethernet Device Driver
5 * Copyright (C) 2012, Broadcom Corporation. All Rights Reserved.
6 *
7 * Permission to use, copy, modify, and/or distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
14 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
16 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
17 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 * $Id: et_linux.h 373323 2012-12-07 04:06:16Z $
21 #ifndef _et_linux_h_
22 #define _et_linux_h_
24 /* tunables */
25 #define NTXD 512 /* # tx dma ring descriptors (must be ^2) */
26 #define NRXD 512 /* # rx dma ring descriptors (must be ^2) */
27 #if defined(CONFIG_RAM_SIZE) && ((CONFIG_RAM_SIZE > 0) && (CONFIG_RAM_SIZE <= 16))
28 #define NRXBUFPOST 256 /* try to keep this # rbufs posted to the chip */
29 #else
30 #define NRXBUFPOST 320 /* try to keep this # rbufs posted to the chip */
31 #endif
32 #define BUFSZ 2048 /* packet data buffer size */
33 #define RXBUFSZ (BUFSZ - 256) /* receive buffer size */
35 #ifndef RXBND
36 #define RXBND 32 /* max # rx frames to process in dpc */
37 #endif
39 #if defined(ILSIM) || defined(__arch_um__)
40 #undef NTXD
41 #define NTXD 16
42 #undef NRXD
43 #define NRXD 16
44 #undef NRXBUFPOST
45 #define NRXBUFPOST 2
46 #endif
48 #define PKTCBND 48
50 #if defined(CONFIG_RAM_SIZE) && ((CONFIG_RAM_SIZE > 0) && (CONFIG_RAM_SIZE <= 16))
51 #define CTFPOOLSZ 512
52 #else
53 #ifdef __ARM_ARCH_7A__
54 #define CTFPOOLSZ 1024
55 #else
56 #define CTFPOOLSZ 768
57 #endif
58 #endif /* CONFIG_RAM_SIZE */
60 #define PREFSZ 96
61 #ifndef PKTC
62 #define ETPREFHDRS(h, sz) OSL_PREF_RANGE_ST((h), (sz))
63 #else
64 #define ETPREFHDRS(h, sz)
65 #endif
67 /* dma tunables */
68 #ifndef TXMR
69 #define TXMR 2 /* number of outstanding reads */
70 #endif
72 #ifndef TXPREFTHRESH
73 #define TXPREFTHRESH 8 /* prefetch threshold */
74 #endif
76 #ifndef TXPREFCTL
77 #define TXPREFCTL 16 /* max descr allowed in prefetch request */
78 #endif
80 #ifndef TXBURSTLEN
81 #define TXBURSTLEN 128 /* burst length for dma reads */
82 #endif
84 #ifndef RXPREFTHRESH
85 #define RXPREFTHRESH 1 /* prefetch threshold */
86 #endif
88 #ifndef RXPREFCTL
89 #define RXPREFCTL 8 /* max descr allowed in prefetch request */
90 #endif
92 #ifndef RXBURSTLEN
93 #define RXBURSTLEN 128 /* burst length for dma writes */
94 #endif
96 #endif /* _et_linux_h_ */