blob: 5de6d8d4f7fe36b73fb0fecc32bab8203643bea1 [file] [log] [blame]
hangtiana6f91ce2019-06-19 13:26:34 +08001/*
2 * Copyright (c) 2013-2019 The Linux Foundation. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#ifndef __WLAN_TGT_DEF_CONFIG_H__
20#define __WLAN_TGT_DEF_CONFIG_H__
21
22/*
23 * TODO: please help to consider if we need a separate config file from LL case.
24 */
25
26/*
27 * set of default target config , that can be over written by platform
28 */
29
30#ifdef QCA_SUPPORT_INTEGRATED_SOC
31#define CFG_TGT_NUM_VDEV 3 /*STA, P2P device, P2P GO/Cli*/
32#else
33/*
34 * default limit of VAPs per device.
35 */
36#define CFG_TGT_NUM_VDEV 3
37#endif
38/*
39 * We would need 1 AST entry per peer. Scale it by a factor of 2 to minimize
40 * hash collisions.
41 * TODO: This scaling factor would be taken care inside the WAL in the future.
42 */
43#define CFG_TGT_NUM_PEER_AST 2
44
45/* # of WDS entries to support.
46 */
47#define CFG_TGT_WDS_ENTRIES 2
48
49/* MAC DMA burst size. 0: 128B - default, 1: 256B, 2: 64B
50 */
51#define CFG_TGT_DEFAULT_DMA_BURST_SIZE 0
52
53/* Fixed delimiters to be inserted after every MPDU
54 */
55#define CFG_TGT_DEFAULT_MAC_AGGR_DELIM 0
56
57/*
58 * This value may need to be fine tuned, but a constant value will
59 * probably always be appropriate; it is probably not necessary to
60 * determine this value dynamically.
61 */
Nirav Shahd1fce912019-10-24 10:12:23 +053062#ifndef CFG_TGT_AST_SKID_LIMIT
hangtiana6f91ce2019-06-19 13:26:34 +080063#define CFG_TGT_AST_SKID_LIMIT 6
Nirav Shahd1fce912019-10-24 10:12:23 +053064#endif
hangtiana6f91ce2019-06-19 13:26:34 +080065/*
66 * total number of peers per device.
67 * currently set to 8 to bring up IP3.9 for memory size problem
68 */
69#define CFG_TGT_NUM_PEERS 8
70/*
71 * max number of peers per device.
72 */
73#define CFG_TGT_NUM_PEERS_MAX 8
74/*
75 * In offload mode target supports features like WOW, chatter and other
76 * protocol offloads. In order to support them some functionalities like
77 * reorder buffering, PN checking need to be done in target. This determines
78 * maximum number of peers supported by target in offload mode
79 */
80#define CFG_TGT_NUM_OFFLOAD_PEERS 0
81/*
82 * Number of reorder buffers used in offload mode
83 */
84#define CFG_TGT_NUM_OFFLOAD_REORDER_BUFFS 0
85/*
86 * keys per peer node
87 */
88#define CFG_TGT_NUM_PEER_KEYS 2
89/*
90 * total number of TX/RX data TIDs
91 */
92#define CFG_TGT_NUM_TIDS (2 * (CFG_TGT_NUM_PEERS + \
93 CFG_TGT_NUM_VDEV))
94/*
95 * max number of Tx TIDS
96 */
97#define CFG_TGT_NUM_TIDS_MAX (2 * (CFG_TGT_NUM_PEERS_MAX + \
98 CFG_TGT_NUM_VDEV))
99/*
100 * number of multicast keys.
101 */
102#define CFG_TGT_NUM_MCAST_KEYS 8
103/*
104 * A value of 3 would probably suffice - one for the control stack, one for
105 * the data stack, and one for debugging.
106 * This value may need to be fine tuned, but a constant value will
107 * probably always be appropriate; it is probably not necessary to
108 * determine this value dynamically.
109 */
110#define CFG_TGT_NUM_PDEV_HANDLERS 8
111/*
112 * A value of 3 would probably suffice - one for the control stack, one for
113 * the data stack, and one for debugging.
114 * This value may need to be fine tuned, but a constant value will
115 * probably always be appropriate; it is probably not necessary to
116 * determine this value dynamically.
117 */
118#define CFG_TGT_NUM_VDEV_HANDLERS 4
119/*
120 * set this to 8:
121 * one for WAL interals (connection pause)
122 * one for the control stack,
123 * one for the data stack
124 * and one for debugging
125 * This value may need to be fine tuned, but a constant value will
126 * probably always be appropriate; it is probably not necessary to
127 * determine this value dynamically.
128 */
129#define CFG_TGT_NUM_HANDLERS 14
130/*
131 * set this to 3: one for the control stack, one for
132 * the data stack, and one for debugging.
133 * This value may need to be fine tuned, but a constant value will
134 * probably always be appropriate; it is probably not necessary to
135 * determine this value dynamically.
136 */
137#define CFG_TGT_NUM_PEER_HANDLERS 32
138/*
139 * set this to 0x7 (Peregrine = 3 chains).
140 * need to be set dynamically based on the HW capability.
141 * this is rome
142 */
143#define CFG_TGT_DEFAULT_TX_CHAIN_MASK 0x3
144/*
145 * set this to 0x7 (Peregrine = 3 chains).
146 * need to be set dynamically based on the HW capability.
147 * this is rome
148 */
149#define CFG_TGT_DEFAULT_RX_CHAIN_MASK 0x3
150/* 100 ms for video, best-effort, and background */
151#define CFG_TGT_RX_TIMEOUT_LO_PRI 100
152/* 40 ms for voice*/
153#define CFG_TGT_RX_TIMEOUT_HI_PRI 40
154
155/* AR9888 unified is default in ethernet mode */
156#define CFG_TGT_RX_DECAP_MODE (0x2)
157/* Decap to native Wifi header */
158#define CFG_TGT_RX_DECAP_MODE_NWIFI (0x1)
159
160/* Decap to raw mode header */
161#define CFG_TGT_RX_DECAP_MODE_RAW (0x0)
162
163/* maximum number of pending scan requests */
164#define CFG_TGT_DEFAULT_SCAN_MAX_REQS 0x4
165
166/* maximum number of scan event handlers */
167#define CFG_TGT_DEFAULT_SCAN_MAX_HANDLERS 0x4
168
169/* maximum number of VDEV that could use BMISS offload */
170#define CFG_TGT_DEFAULT_BMISS_OFFLOAD_MAX_VDEV 0x2
171
172/* maximum number of VDEV offload Roaming to support */
173#ifndef CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_VDEV
174#define CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_VDEV 0x2
175#endif
176
177/* maximum number of STA VDEVs */
178#ifndef CFG_TGT_DEFAULT_MAX_STA_VDEVS
179#define CFG_TGT_DEFAULT_MAX_STA_VDEVS 0
180#endif
181
182/* maximum number of AP profiles pushed to offload Roaming */
183#define CFG_TGT_DEFAULT_ROAM_OFFLOAD_MAX_PROFILES 0x8
184
185/* maximum number of VDEV offload GTK to support */
186#ifndef CFG_TGT_DEFAULT_GTK_OFFLOAD_MAX_VDEV
187#define CFG_TGT_DEFAULT_GTK_OFFLOAD_MAX_VDEV 0x2
188#endif
189/* default: mcast->ucast disabled */
190
191#define CFG_TGT_DEFAULT_NUM_MCAST_GROUPS 0
192#define CFG_TGT_DEFAULT_NUM_MCAST_TABLE_ELEMS 0
193#define CFG_TGT_DEFAULT_MCAST2UCAST_MODE 0 /* disabled */
194
195/*
196 * Specify how much memory the target should allocate for a debug log of
197 * tx PPDU meta-information (how large the PPDU was, when it was sent,
198 * whether it was successful, etc.)
199 * The size of the log records is configurable, from a minimum of 28 bytes
200 * to a maximum of about 300 bytes. A typical configuration would result
201 * in each log record being about 124 bytes.
202 * Thus, 1KB of log space can hold about 30 small records, 3 large records,
203 * or about 8 typical-sized records.
204 */
205#define CFG_TGT_DEFAULT_TX_DBG_LOG_SIZE 1024 /* bytes */
206
207/* target based fragment timeout and MPDU duplicate detection */
208#define CFG_TGT_DEFAULT_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 0
209/* Default VoW configuration
210 */
211#define CFG_TGT_DEFAULT_VOW_CONFIG 0
212
213/*
214 * total number of descriptors to use in the target
215 */
216#ifndef CFG_TGT_NUM_MSDU_DESC
217#define CFG_TGT_NUM_MSDU_DESC (32)
218#endif
219/*
220 * Maximum number of frag table entries
221 */
222#define CFG_TGT_MAX_FRAG_TABLE_ENTRIES 2
223
224/*
225 * number of vdevs that can support tdls
226 */
227#define CFG_TGT_NUM_TDLS_VDEVS 1
228
229/*
230 * number of peers that each Tdls vdev can track
231 */
232#ifndef CFG_TGT_NUM_TDLS_CONN_TABLE_ENTRIES
233#define CFG_TGT_NUM_TDLS_CONN_TABLE_ENTRIES 8
234#endif
235/*
236 * number of TDLS concurrent sleep STAs
237 */
238#define CFG_TGT_NUM_TDLS_CONC_SLEEP_STAS 1
239
240/*
241 * number of TDLS concurrent buffer STAs
242 */
243#define CFG_TGT_NUM_TDLS_CONC_BUFFER_STAS 1
244
245#define CFG_TGT_MAX_MULTICAST_FILTER_ENTRIES 16
246
247/*
248 * Maximum number of VDEV that beacon tx offload will support
249 */
250#ifndef CFG_TGT_DEFAULT_BEACON_TX_OFFLOAD_MAX_VDEV
251/* For Naples/Rome/Tufello */
252#ifdef HIF_SDIO
253#define CFG_TGT_DEFAULT_BEACON_TX_OFFLOAD_MAX_VDEV 2
254#else
255#define CFG_TGT_DEFAULT_BEACON_TX_OFFLOAD_MAX_VDEV 1
256#endif
257#endif /* CFG_TGT_DEFAULT_BEACON_TX_OFFLOAD_MAX_VDEV */
258
259/*
260 * ht enable highest MCS by default
261 */
262#define CFG_TGT_DEFAULT_GTX_HT_MASK 0x8080
263/*
264 * vht enable highest MCS by default
265 */
266#define CFG_TGT_DEFAULT_GTX_VHT_MASK 0x80200
267/*
268 * threshold to enable GTX
269 */
270#define CFG_TGT_DEFAULT_GTX_PER_THRESHOLD 3
271/*
272 * margin to move back when per > margin + threshold
273 */
274#define CFG_TGT_DEFAULT_GTX_PER_MARGIN 2
275/*
276 * step for every move
277 */
278#define CFG_TGT_DEFAULT_GTX_TPC_STEP 1
279/*
280 * lowest TPC
281 */
282#define CFG_TGT_DEFAULT_GTX_TPC_MIN 0
283/*
284 * enable all BW 20/40/80/160
285 */
286#define CFG_TGT_DEFAULT_GTX_BW_MASK 0xf
287
288/*
289 * number of vdevs that can support OCB
290 */
291#define CFG_TGT_NUM_OCB_VDEVS 1
292
293/*
294 * maximum number of channels that can do OCB
295 */
296#define CFG_TGT_NUM_OCB_CHANNELS 2
297
298/*
299 * maximum number of channels in an OCB schedule
300 */
301#define CFG_TGT_NUM_OCB_SCHEDULES 2
302
303#endif /*__WLAN_TGT_DEF_CONFIG_H__ */