blob: 2bcf796f9efe3dca9fd9b26d4d9260f61f8925ed [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
2 * Copyright (c) 2011, 2014 The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28#ifndef __WLAN_TGT_DEF_CONFIG_H__
29#define __WLAN_TGT_DEF_CONFIG_H__
30
31/*
32 * set of default target config , that can be over written by platform
33 */
34
35/*
36 * default limit of 8 VAPs per device.
37 */
38/* Rome PRD support 3 vdevs */
39#define CFG_TGT_NUM_VDEV 3
40
41/*
42 * We would need 1 AST entry per peer. Scale it by a factor of 2 to minimize hash collisions.
43 * TODO: This scaling factor would be taken care inside the WAL in the future.
44 */
45#define CFG_TGT_NUM_PEER_AST 2
46
47/* # of WDS entries to support.
48 */
49#define CFG_TGT_WDS_ENTRIES 0
50
51/* MAC DMA burst size. 0: 128B - default, 1: 256B, 2: 64B
52 */
53#define CFG_TGT_DEFAULT_DMA_BURST_SIZE 0
54
55/* Fixed delimiters to be inserted after every MPDU
56 */
57#define CFG_TGT_DEFAULT_MAC_AGGR_DELIM 0
58
59/*
60 * This value may need to be fine tuned, but a constant value will
61 * probably always be appropriate; it is probably not necessary to
62 * determine this value dynamically.
63 */
64#define CFG_TGT_AST_SKID_LIMIT 16
65
66/*
67 * total number of peers per device.
68 */
69#define CFG_TGT_NUM_PEERS 14
70
71/*
72 * In offload mode target supports features like WOW, chatter and other
73 * protocol offloads. In order to support them some functionalities like
74 * reorder buffering, PN checking need to be done in target. This determines
75 * maximum number of peers suported by target in offload mode
76 */
77
78/*
79 * The current firmware implementation requires the number of offload peers
80 * should be (number of vdevs + 1).
81
82 * The reason for this is the firmware clubbed the self peer and offload peer
83 * in the same pool. So if the firmware wanted to support n vdevs then the
84 * number of offload peer must be n+1 of which n buffers will be used for
85 * self peer and the remaining 1 is used for offload peer to support chatter
86 * mode for single STA.
87
88 * Technically the macro should be 1 however the current firmware requires n+1.
89
90 * TODO: This MACRO need to be modified in the future, if the firmware modified
91 * to allocate buffers for self peer and offload peer independently.
92 */
93
94#define CFG_TGT_NUM_OFFLOAD_PEERS (CFG_TGT_NUM_VDEV+1)
95
96/*
97 * Number of reorder buffers used in offload mode
98 */
99#define CFG_TGT_NUM_OFFLOAD_REORDER_BUFFS 4
100
101/*
102 * keys per peer node
103 */
104#define CFG_TGT_NUM_PEER_KEYS 2
105/*
106 * total number of data TX and RX TIDs
107 */
108#define CFG_TGT_NUM_TIDS (2 * (CFG_TGT_NUM_PEERS + CFG_TGT_NUM_VDEV + 2))
109/*
110 * set this to 0x7 (Peregrine = 3 chains).
111 * need to be set dynamically based on the HW capability.
112 */
113#define CFG_TGT_DEFAULT_TX_CHAIN_MASK 0x7
114/*
115 * set this to 0x7 (Peregrine = 3 chains).
116 * need to be set dynamically based on the HW capability.
117 */
118#define CFG_TGT_DEFAULT_RX_CHAIN_MASK 0x7
119/* 100 ms for video, best-effort, and background */
120#define CFG_TGT_RX_TIMEOUT_LO_PRI 100
121/* 40 ms for voice*/
122#define CFG_TGT_RX_TIMEOUT_HI_PRI 40
123
124/* AR9888 unified is default in ethernet mode */
125#define CFG_TGT_RX_DECAP_MODE (0x2)
126/* Decap to native Wifi header */
127#define CFG_TGT_RX_DECAP_MODE_NWIFI (0x1)
128
129/* maximum number of pending scan requests */
130#define CFG_TGT_DEFAULT_SCAN_MAX_REQS 0x4
131
132/* maximum number of VDEV that could use BMISS offload */
133#define CFG_TGT_DEFAULT_BMISS_OFFLOAD_MAX_VDEV 0x2
134
135/* maximum number of VDEV offload Roaming to support */
136#define CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_VDEV 0x2
137
138/* maximum number of AP profiles pushed to offload Roaming */
139#define CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_PROFILES 0x8
140
141/* maximum number of VDEV offload GTK to support */
142#define CFG_TGT_DEFAULT_GTK_OFFLOAD_MAX_VDEV 0x2
143
144/* default: mcast->ucast disabled if ATH_SUPPORT_MCAST2UCAST not defined */
145#ifndef ATH_SUPPORT_MCAST2UCAST
146#define CFG_TGT_DEFAULT_NUM_MCAST_GROUPS 0
147#define CFG_TGT_DEFAULT_NUM_MCAST_TABLE_ELEMS 0
148#define CFG_TGT_DEFAULT_MCAST2UCAST_MODE 0 /* disabled */
149#else
150/* (for testing) small multicast group membership table enabled */
151#define CFG_TGT_DEFAULT_NUM_MCAST_GROUPS 4
152#define CFG_TGT_DEFAULT_NUM_MCAST_TABLE_ELEMS 16
153#define CFG_TGT_DEFAULT_MCAST2UCAST_MODE 2
154#endif
155
156#define CFG_TGT_MAX_MULTICAST_FILTER_ENTRIES 5
157/*
158 * Specify how much memory the target should allocate for a debug log of
159 * tx PPDU meta-information (how large the PPDU was, when it was sent,
160 * whether it was successful, etc.)
161 * The size of the log records is configurable, from a minimum of 28 bytes
162 * to a maximum of about 300 bytes. A typical configuration would result
163 * in each log record being about 124 bytes.
164 * Thus, 1KB of log space can hold about 30 small records, 3 large records,
165 * or about 8 typical-sized records.
166 */
167#define CFG_TGT_DEFAULT_TX_DBG_LOG_SIZE 1024 /* bytes */
168
169/* target based fragment timeout and MPDU duplicate detection */
170#define CFG_TGT_DEFAULT_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 0
171
172/* Default VoW configuration
173 */
174#define CFG_TGT_DEFAULT_VOW_CONFIG 0
175
176/*
177 * total number of descriptors to use in the target
178 */
179#define CFG_TGT_NUM_MSDU_DESC (1024 + 32)
180
181/*
182 * Maximum number of frag table entries
183 */
184#define CFG_TGT_MAX_FRAG_TABLE_ENTRIES 10
185
186/*
187 * Maximum number of VDEV that beacon tx offload will support
188 */
189#define CFG_TGT_DEFAULT_BEACON_TX_OFFLOAD_MAX_VDEV 2
190
191/*
192 * number of vdevs that can support tdls
193 */
194#define CFG_TGT_NUM_TDLS_VDEVS 1
195
196/*
197 * number of peers that each Tdls vdev can track
198 */
199#define CFG_TGT_NUM_TDLS_CONN_TABLE_ENTRIES 32
200
201/*
202 * number of TDLS concurrent sleep STAs
203 */
204#define CFG_TGT_NUM_TDLS_CONC_SLEEP_STAS 1
205
206/*
207 * number of TDLS concurrent buffer STAs
208 */
209#define CFG_TGT_NUM_TDLS_CONC_BUFFER_STAS 1
210
211/*
212 * ht enable highest MCS by default
213 */
214#define CFG_TGT_DEFAULT_GTX_HT_MASK 0x8080
215/*
216 * vht enable highest MCS by default
217 */
218#define CFG_TGT_DEFAULT_GTX_VHT_MASK 0x80200
219/*
220 * resv for furture use, bit 30 is used for fix tpc, bit0-3 for Power save balance
221 */
222#define CFG_TGT_DEFAULT_GTX_USR_CFG 0xa
223/*
224 * threshold to enable GTX
225 */
226#define CFG_TGT_DEFAULT_GTX_PER_THRESHOLD 3
227/*
228 * margin to move back when per > margin + threshold
229 */
230#define CFG_TGT_DEFAULT_GTX_PER_MARGIN 2
231/*
232 * step for every move
233 */
234#define CFG_TGT_DEFAULT_GTX_TPC_STEP 1
235/*
236 * lowest TPC
237 */
238#define CFG_TGT_DEFAULT_GTX_TPC_MIN 0
239/*
240 * enable all BW 20/40/80/160
241 */
242#define CFG_TGT_DEFAULT_GTX_BW_MASK 0xf
243
244/*
245 * number of vdevs that can support OCB
246 */
247#define CFG_TGT_NUM_OCB_VDEVS 1
248
249/*
250 * maximum number of channels that can do OCB
251 */
252#define CFG_TGT_NUM_OCB_CHANNELS 2
253
254/*
255 * maximum number of channels in an OCB schedule
256 */
257#define CFG_TGT_NUM_OCB_SCHEDULES 2
258
259#endif /*__WLAN_TGT_DEF_CONFIG_H__ */