blob: 1147396bf7ebfe8b43edacba229c178509a4d78d [file] [log] [blame]
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +03001/*
2 * This file is part of wl1271
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 *
6 * Contact: Luciano Coelho <luciano.coelho@nokia.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 *
22 */
23
Shahar Levi00d20102010-11-08 11:20:10 +000024#ifndef __CONF_H__
25#define __CONF_H__
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +030026
27enum {
28 CONF_HW_BIT_RATE_1MBPS = BIT(0),
29 CONF_HW_BIT_RATE_2MBPS = BIT(1),
30 CONF_HW_BIT_RATE_5_5MBPS = BIT(2),
31 CONF_HW_BIT_RATE_6MBPS = BIT(3),
32 CONF_HW_BIT_RATE_9MBPS = BIT(4),
33 CONF_HW_BIT_RATE_11MBPS = BIT(5),
34 CONF_HW_BIT_RATE_12MBPS = BIT(6),
35 CONF_HW_BIT_RATE_18MBPS = BIT(7),
36 CONF_HW_BIT_RATE_22MBPS = BIT(8),
37 CONF_HW_BIT_RATE_24MBPS = BIT(9),
38 CONF_HW_BIT_RATE_36MBPS = BIT(10),
39 CONF_HW_BIT_RATE_48MBPS = BIT(11),
40 CONF_HW_BIT_RATE_54MBPS = BIT(12),
41 CONF_HW_BIT_RATE_MCS_0 = BIT(13),
42 CONF_HW_BIT_RATE_MCS_1 = BIT(14),
43 CONF_HW_BIT_RATE_MCS_2 = BIT(15),
44 CONF_HW_BIT_RATE_MCS_3 = BIT(16),
45 CONF_HW_BIT_RATE_MCS_4 = BIT(17),
46 CONF_HW_BIT_RATE_MCS_5 = BIT(18),
47 CONF_HW_BIT_RATE_MCS_6 = BIT(19),
48 CONF_HW_BIT_RATE_MCS_7 = BIT(20)
49};
50
51enum {
52 CONF_HW_RATE_INDEX_1MBPS = 0,
53 CONF_HW_RATE_INDEX_2MBPS = 1,
54 CONF_HW_RATE_INDEX_5_5MBPS = 2,
55 CONF_HW_RATE_INDEX_6MBPS = 3,
56 CONF_HW_RATE_INDEX_9MBPS = 4,
57 CONF_HW_RATE_INDEX_11MBPS = 5,
58 CONF_HW_RATE_INDEX_12MBPS = 6,
59 CONF_HW_RATE_INDEX_18MBPS = 7,
60 CONF_HW_RATE_INDEX_22MBPS = 8,
61 CONF_HW_RATE_INDEX_24MBPS = 9,
62 CONF_HW_RATE_INDEX_36MBPS = 10,
63 CONF_HW_RATE_INDEX_48MBPS = 11,
64 CONF_HW_RATE_INDEX_54MBPS = 12,
65 CONF_HW_RATE_INDEX_MAX = CONF_HW_RATE_INDEX_54MBPS,
66};
67
Juuso Oikarinen1b00f542010-03-18 12:26:30 +020068enum {
Pontus Fuchsdefe02c2012-01-31 17:54:41 +020069 CONF_HW_RXTX_RATE_MCS7_SGI = 0,
70 CONF_HW_RXTX_RATE_MCS7,
Juuso Oikarinenf876bb92010-03-26 12:53:11 +020071 CONF_HW_RXTX_RATE_MCS6,
72 CONF_HW_RXTX_RATE_MCS5,
73 CONF_HW_RXTX_RATE_MCS4,
74 CONF_HW_RXTX_RATE_MCS3,
75 CONF_HW_RXTX_RATE_MCS2,
76 CONF_HW_RXTX_RATE_MCS1,
77 CONF_HW_RXTX_RATE_MCS0,
78 CONF_HW_RXTX_RATE_54,
79 CONF_HW_RXTX_RATE_48,
80 CONF_HW_RXTX_RATE_36,
81 CONF_HW_RXTX_RATE_24,
82 CONF_HW_RXTX_RATE_22,
83 CONF_HW_RXTX_RATE_18,
84 CONF_HW_RXTX_RATE_12,
85 CONF_HW_RXTX_RATE_11,
86 CONF_HW_RXTX_RATE_9,
87 CONF_HW_RXTX_RATE_6,
88 CONF_HW_RXTX_RATE_5_5,
89 CONF_HW_RXTX_RATE_2,
90 CONF_HW_RXTX_RATE_1,
91 CONF_HW_RXTX_RATE_MAX,
92 CONF_HW_RXTX_RATE_UNSUPPORTED = 0xff
93};
94
Pontus Fuchsd2e2d762012-01-31 17:54:40 +020095/* Rates between and including these are MCS rates */
Pontus Fuchsdefe02c2012-01-31 17:54:41 +020096#define CONF_HW_RXTX_RATE_MCS_MIN CONF_HW_RXTX_RATE_MCS7_SGI
Pontus Fuchsd2e2d762012-01-31 17:54:40 +020097#define CONF_HW_RXTX_RATE_MCS_MAX CONF_HW_RXTX_RATE_MCS0
98
Juuso Oikarinenf876bb92010-03-26 12:53:11 +020099enum {
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200100 CONF_SG_DISABLE = 0,
101 CONF_SG_PROTECTIVE,
102 CONF_SG_OPPORTUNISTIC
103};
104
105enum {
106 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300107 * Configure the min and max time BT gains the antenna
108 * in WLAN / BT master basic rate
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200109 *
Eliad Peller3be41122011-08-14 13:17:19 +0300110 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200111 */
Eliad Peller3be41122011-08-14 13:17:19 +0300112 CONF_SG_ACL_BT_MASTER_MIN_BR = 0,
113 CONF_SG_ACL_BT_MASTER_MAX_BR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200114
115 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300116 * Configure the min and max time BT gains the antenna
117 * in WLAN / BT slave basic rate
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200118 *
Eliad Peller3be41122011-08-14 13:17:19 +0300119 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200120 */
Eliad Peller3be41122011-08-14 13:17:19 +0300121 CONF_SG_ACL_BT_SLAVE_MIN_BR,
122 CONF_SG_ACL_BT_SLAVE_MAX_BR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200123
124 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300125 * Configure the min and max time BT gains the antenna
126 * in WLAN / BT master EDR
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200127 *
Eliad Peller3be41122011-08-14 13:17:19 +0300128 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200129 */
Eliad Peller3be41122011-08-14 13:17:19 +0300130 CONF_SG_ACL_BT_MASTER_MIN_EDR,
131 CONF_SG_ACL_BT_MASTER_MAX_EDR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200132
133 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300134 * Configure the min and max time BT gains the antenna
135 * in WLAN / BT slave EDR
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200136 *
Eliad Peller3be41122011-08-14 13:17:19 +0300137 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200138 */
Eliad Peller3be41122011-08-14 13:17:19 +0300139 CONF_SG_ACL_BT_SLAVE_MIN_EDR,
140 CONF_SG_ACL_BT_SLAVE_MAX_EDR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200141
142 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300143 * The maximum time WLAN can gain the antenna
144 * in WLAN PSM / BT master/slave BR
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200145 *
Eliad Peller3be41122011-08-14 13:17:19 +0300146 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200147 */
Eliad Peller3be41122011-08-14 13:17:19 +0300148 CONF_SG_ACL_WLAN_PS_MASTER_BR,
149 CONF_SG_ACL_WLAN_PS_SLAVE_BR,
150
151 /*
152 * The maximum time WLAN can gain the antenna
153 * in WLAN PSM / BT master/slave EDR
154 *
155 * Range: 0 - 255 (ms)
156 */
157 CONF_SG_ACL_WLAN_PS_MASTER_EDR,
158 CONF_SG_ACL_WLAN_PS_SLAVE_EDR,
159
160 /* TODO: explain these values */
161 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_BR,
162 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_BR,
163 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_BR,
164 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_BR,
165 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_EDR,
166 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_EDR,
167 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_EDR,
168 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_EDR,
169
170 CONF_SG_ACL_ACTIVE_SCAN_WLAN_BR,
171 CONF_SG_ACL_ACTIVE_SCAN_WLAN_EDR,
172 CONF_SG_ACL_PASSIVE_SCAN_BT_BR,
173 CONF_SG_ACL_PASSIVE_SCAN_WLAN_BR,
174 CONF_SG_ACL_PASSIVE_SCAN_BT_EDR,
175 CONF_SG_ACL_PASSIVE_SCAN_WLAN_EDR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200176
177 /*
178 * Compensation percentage of probe requests when scan initiated
179 * during BT voice/ACL link.
180 *
181 * Range: 0 - 255 (%)
182 */
183 CONF_SG_AUTO_SCAN_PROBE_REQ,
184
185 /*
186 * Compensation percentage of probe requests when active scan initiated
187 * during BT voice
188 *
189 * Range: 0 - 255 (%)
190 */
191 CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3,
192
193 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300194 * Compensation percentage of WLAN active scan window if initiated
195 * during BT A2DP
196 *
197 * Range: 0 - 1000 (%)
198 */
199 CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP,
200
201 /*
202 * Compensation percentage of WLAN passive scan window if initiated
203 * during BT A2DP BR
204 *
205 * Range: 0 - 1000 (%)
206 */
207 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_BR,
208
209 /*
210 * Compensation percentage of WLAN passive scan window if initiated
211 * during BT A2DP EDR
212 *
213 * Range: 0 - 1000 (%)
214 */
215 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_EDR,
216
217 /*
218 * Compensation percentage of WLAN passive scan window if initiated
219 * during BT voice
220 *
221 * Range: 0 - 1000 (%)
222 */
223 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3,
224
225 /* TODO: explain these values */
226 CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN,
227 CONF_SG_BCN_HV3_COLLISION_THRESH_IN_PASSIVE_SCAN,
228 CONF_SG_TX_RX_PROTECTION_BWIDTH_IN_PASSIVE_SCAN,
229
230 /*
231 * Defines whether the SG will force WLAN host to enter/exit PSM
232 *
233 * Range: 1 - SG can force, 0 - host handles PSM
234 */
235 CONF_SG_STA_FORCE_PS_IN_BT_SCO,
236
237 /*
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200238 * Defines antenna configuration (single/dual antenna)
239 *
240 * Range: 0 - single antenna, 1 - dual antenna
241 */
242 CONF_SG_ANTENNA_CONFIGURATION,
243
244 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300245 * The threshold (percent) of max consecutive beacon misses before
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200246 * increasing priority of beacon reception.
247 *
248 * Range: 0 - 100 (%)
249 */
250 CONF_SG_BEACON_MISS_PERCENT,
251
252 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300253 * Protection time of the DHCP procedure.
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200254 *
Eliad Peller3be41122011-08-14 13:17:19 +0300255 * Range: 0 - 100000 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200256 */
Eliad Peller3be41122011-08-14 13:17:19 +0300257 CONF_SG_DHCP_TIME,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200258
259 /*
260 * RX guard time before the beginning of a new BT voice frame during
261 * which no new WLAN trigger frame is transmitted.
262 *
263 * Range: 0 - 100000 (us)
264 */
265 CONF_SG_RXT,
266
267 /*
268 * TX guard time before the beginning of a new BT voice frame during
269 * which no new WLAN frame is transmitted.
270 *
271 * Range: 0 - 100000 (us)
272 */
273
274 CONF_SG_TXT,
275
276 /*
277 * Enable adaptive RXT/TXT algorithm. If disabled, the host values
278 * will be utilized.
279 *
280 * Range: 0 - disable, 1 - enable
281 */
282 CONF_SG_ADAPTIVE_RXT_TXT,
283
Eliad Peller3be41122011-08-14 13:17:19 +0300284 /* TODO: explain this value */
285 CONF_SG_GENERAL_USAGE_BIT_MAP,
286
287 /*
288 * Number of consecutive BT voice frames not interrupted by WLAN
289 *
290 * Range: 0 - 100
291 */
292 CONF_SG_HV3_MAX_SERVED,
293
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200294 /*
295 * The used WLAN legacy service period during active BT ACL link
296 *
297 * Range: 0 - 255 (ms)
298 */
299 CONF_SG_PS_POLL_TIMEOUT,
300
301 /*
302 * The used WLAN UPSD service period during active BT ACL link
303 *
304 * Range: 0 - 255 (ms)
305 */
306 CONF_SG_UPSD_TIMEOUT,
307
Eliad Peller3be41122011-08-14 13:17:19 +0300308 CONF_SG_CONSECUTIVE_CTS_THRESHOLD,
309 CONF_SG_STA_RX_WINDOW_AFTER_DTIM,
310 CONF_SG_STA_CONNECTION_PROTECTION_TIME,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200311
Eliad Peller3be41122011-08-14 13:17:19 +0300312 /* AP params */
313 CONF_AP_BEACON_MISS_TX,
314 CONF_AP_RX_WINDOW_AFTER_BEACON,
315 CONF_AP_BEACON_WINDOW_INTERVAL,
316 CONF_AP_CONNECTION_PROTECTION_TIME,
317 CONF_AP_BT_ACL_VAL_BT_SERVE_TIME,
318 CONF_AP_BT_ACL_VAL_WL_SERVE_TIME,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200319
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200320 CONF_SG_TEMP_PARAM_1,
321 CONF_SG_TEMP_PARAM_2,
322 CONF_SG_TEMP_PARAM_3,
323 CONF_SG_TEMP_PARAM_4,
324 CONF_SG_TEMP_PARAM_5,
Arik Nemtsov801f8702011-04-18 14:15:20 +0300325 CONF_SG_TEMP_PARAM_6,
326 CONF_SG_TEMP_PARAM_7,
327 CONF_SG_TEMP_PARAM_8,
328 CONF_SG_TEMP_PARAM_9,
329 CONF_SG_TEMP_PARAM_10,
330
Eliad Peller3be41122011-08-14 13:17:19 +0300331 CONF_SG_PARAMS_MAX,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200332 CONF_SG_PARAMS_ALL = 0xff
333};
334
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +0300335struct conf_sg_settings {
Eliad Peller3be41122011-08-14 13:17:19 +0300336 u32 params[CONF_SG_PARAMS_MAX];
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200337 u8 state;
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +0300338};
339
Juuso Oikarinen8793f9b2009-10-13 12:47:40 +0300340enum conf_rx_queue_type {
341 CONF_RX_QUEUE_TYPE_LOW_PRIORITY, /* All except the high priority */
342 CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */
343};
344
345struct conf_rx_settings {
346 /*
347 * The maximum amount of time, in TU, before the
348 * firmware discards the MSDU.
349 *
350 * Range: 0 - 0xFFFFFFFF
351 */
352 u32 rx_msdu_life_time;
353
354 /*
355 * Packet detection threshold in the PHY.
356 *
357 * FIXME: details unknown.
358 */
359 u32 packet_detection_threshold;
360
361 /*
362 * The longest time the STA will wait to receive traffic from the AP
363 * after a PS-poll has been transmitted.
364 *
365 * Range: 0 - 200000
366 */
367 u16 ps_poll_timeout;
368 /*
369 * The longest time the STA will wait to receive traffic from the AP
370 * after a frame has been sent from an UPSD enabled queue.
371 *
372 * Range: 0 - 200000
373 */
374 u16 upsd_timeout;
375
376 /*
377 * The number of octets in an MPDU, below which an RTS/CTS
378 * handshake is not performed.
379 *
380 * Range: 0 - 4096
381 */
382 u16 rts_threshold;
383
384 /*
385 * The RX Clear Channel Assessment threshold in the PHY
386 * (the energy threshold).
387 *
388 * Range: ENABLE_ENERGY_D == 0x140A
389 * DISABLE_ENERGY_D == 0xFFEF
390 */
391 u16 rx_cca_threshold;
392
393 /*
394 * Occupied Rx mem-blocks number which requires interrupting the host
395 * (0 = no buffering, 0xffff = disabled).
396 *
397 * Range: u16
398 */
399 u16 irq_blk_threshold;
400
401 /*
402 * Rx packets number which requires interrupting the host
403 * (0 = no buffering).
404 *
405 * Range: u16
406 */
407 u16 irq_pkt_threshold;
408
409 /*
410 * Max time in msec the FW may delay RX-Complete interrupt.
411 *
412 * Range: 1 - 100
413 */
414 u16 irq_timeout;
415
416 /*
417 * The RX queue type.
418 *
419 * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY,
420 */
421 u8 queue_type;
422};
423
Eliad Peller4b298862011-10-03 12:06:36 +0200424#define CONF_TX_MAX_RATE_CLASSES 10
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300425
426#define CONF_TX_RATE_MASK_UNSPECIFIED 0
Juuso Oikarinena6fe2312009-12-11 15:40:58 +0200427#define CONF_TX_RATE_MASK_BASIC (CONF_HW_BIT_RATE_1MBPS | \
428 CONF_HW_BIT_RATE_2MBPS)
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300429#define CONF_TX_RATE_RETRY_LIMIT 10
430
Eliad Peller4b298862011-10-03 12:06:36 +0200431/* basic rates for p2p operations (probe req/resp, etc.) */
432#define CONF_TX_RATE_MASK_BASIC_P2P (CONF_HW_BIT_RATE_6MBPS | \
433 CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS)
434
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200435/*
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300436 * Rates supported for data packets when operating as AP. Note the absence
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200437 * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop
438 * one. The rate dropped is not mandatory under any operating mode.
439 */
440#define CONF_TX_AP_ENABLED_RATES (CONF_HW_BIT_RATE_1MBPS | \
441 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
442 CONF_HW_BIT_RATE_6MBPS | CONF_HW_BIT_RATE_9MBPS | \
443 CONF_HW_BIT_RATE_11MBPS | CONF_HW_BIT_RATE_12MBPS | \
444 CONF_HW_BIT_RATE_18MBPS | CONF_HW_BIT_RATE_24MBPS | \
445 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
446 CONF_HW_BIT_RATE_54MBPS)
447
Guy Eilambfafba82011-11-01 09:23:51 +0200448#define CONF_TX_CCK_RATES (CONF_HW_BIT_RATE_1MBPS | \
449 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
450 CONF_HW_BIT_RATE_11MBPS)
451
Arik Nemtsov70f47422011-04-18 14:15:25 +0300452#define CONF_TX_OFDM_RATES (CONF_HW_BIT_RATE_6MBPS | \
453 CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS | \
454 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
455 CONF_HW_BIT_RATE_54MBPS)
456
Arik Nemtsov1a8adb62011-08-14 13:17:29 +0300457#define CONF_TX_MCS_RATES (CONF_HW_BIT_RATE_MCS_0 | \
458 CONF_HW_BIT_RATE_MCS_1 | CONF_HW_BIT_RATE_MCS_2 | \
459 CONF_HW_BIT_RATE_MCS_3 | CONF_HW_BIT_RATE_MCS_4 | \
460 CONF_HW_BIT_RATE_MCS_5 | CONF_HW_BIT_RATE_MCS_6 | \
461 CONF_HW_BIT_RATE_MCS_7)
Arik Nemtsov70f47422011-04-18 14:15:25 +0300462
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200463/*
464 * Default rates for management traffic when operating in AP mode. This
465 * should be configured according to the basic rate set of the AP
466 */
467#define CONF_TX_AP_DEFAULT_MGMT_RATES (CONF_HW_BIT_RATE_1MBPS | \
468 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS)
469
Shahar Levi06b660e2011-09-05 13:54:36 +0300470/* default rates for working as IBSS (11b and OFDM) */
Eliad Pellercb5ae052011-04-07 15:52:05 +0300471#define CONF_TX_IBSS_DEFAULT_RATES (CONF_HW_BIT_RATE_1MBPS | \
472 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
Shahar Levi06b660e2011-09-05 13:54:36 +0300473 CONF_HW_BIT_RATE_11MBPS | CONF_TX_OFDM_RATES);
Eliad Pellercb5ae052011-04-07 15:52:05 +0300474
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300475struct conf_tx_rate_class {
476
477 /*
478 * The rates enabled for this rate class.
479 *
480 * Range: CONF_HW_BIT_RATE_* bit mask
481 */
482 u32 enabled_rates;
483
484 /*
485 * The dot11 short retry limit used for TX retries.
486 *
487 * Range: u8
488 */
489 u8 short_retry_limit;
490
491 /*
492 * The dot11 long retry limit used for TX retries.
493 *
494 * Range: u8
495 */
496 u8 long_retry_limit;
497
498 /*
499 * Flags controlling the attributes of TX transmission.
500 *
501 * Range: bit 0: Truncate - when set, FW attempts to send a frame stop
502 * when the total valid per-rate attempts have
503 * been exhausted; otherwise transmissions
504 * will continue at the lowest available rate
505 * until the appropriate one of the
506 * short_retry_limit, long_retry_limit,
507 * dot11_max_transmit_msdu_life_time, or
508 * max_tx_life_time, is exhausted.
509 * 1: Preamble Override - indicates if the preamble type
510 * should be used in TX.
511 * 2: Preamble Type - the type of the preamble to be used by
512 * the policy (0 - long preamble, 1 - short preamble.
513 */
514 u8 aflags;
515};
516
517#define CONF_TX_MAX_AC_COUNT 4
518
519/* Slot number setting to start transmission at PIFS interval */
520#define CONF_TX_AIFS_PIFS 1
521/* Slot number setting to start transmission at DIFS interval normal
522 * DCF access */
523#define CONF_TX_AIFS_DIFS 2
524
525
526enum conf_tx_ac {
527 CONF_TX_AC_BE = 0, /* best effort / legacy */
528 CONF_TX_AC_BK = 1, /* background */
529 CONF_TX_AC_VI = 2, /* video */
530 CONF_TX_AC_VO = 3, /* voice */
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300531 CONF_TX_AC_CTS2SELF = 4, /* fictitious AC, follows AC_VO */
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300532 CONF_TX_AC_ANY_TID = 0x1f
533};
534
535struct conf_tx_ac_category {
536 /*
537 * The AC class identifier.
538 *
539 * Range: enum conf_tx_ac
540 */
541 u8 ac;
542
543 /*
544 * The contention window minimum size (in slots) for the access
545 * class.
546 *
547 * Range: u8
548 */
549 u8 cw_min;
550
551 /*
552 * The contention window maximum size (in slots) for the access
553 * class.
554 *
555 * Range: u8
556 */
557 u16 cw_max;
558
559 /*
560 * The AIF value (in slots) for the access class.
561 *
562 * Range: u8
563 */
564 u8 aifsn;
565
566 /*
567 * The TX Op Limit (in microseconds) for the access class.
568 *
569 * Range: u16
570 */
571 u16 tx_op_limit;
572};
573
Juuso Oikarinen9987a9d2010-09-01 11:31:12 +0200574#define CONF_TX_MAX_TID_COUNT 8
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300575
Arik Nemtsov0f9c8252011-08-17 10:45:49 +0300576/* Allow TX BA on all TIDs but 6,7. These are currently reserved in the FW */
577#define CONF_TX_BA_ENABLED_TID_BITMAP 0x3F
578
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300579enum {
580 CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/
581 CONF_CHANNEL_TYPE_EDCF = 1, /* EDCA*/
582 CONF_CHANNEL_TYPE_HCCA = 2, /* HCCA*/
583};
584
585enum {
586 CONF_PS_SCHEME_LEGACY = 0,
587 CONF_PS_SCHEME_UPSD_TRIGGER = 1,
588 CONF_PS_SCHEME_LEGACY_PSPOLL = 2,
589 CONF_PS_SCHEME_SAPSD = 3,
590};
591
592enum {
593 CONF_ACK_POLICY_LEGACY = 0,
594 CONF_ACK_POLICY_NO_ACK = 1,
595 CONF_ACK_POLICY_BLOCK = 2,
596};
597
598
599struct conf_tx_tid {
600 u8 queue_id;
601 u8 channel_type;
602 u8 tsid;
603 u8 ps_scheme;
604 u8 ack_policy;
605 u32 apsd_conf[2];
606};
607
608struct conf_tx_settings {
609 /*
610 * The TX ED value for TELEC Enable/Disable.
611 *
612 * Range: 0, 1
613 */
614 u8 tx_energy_detection;
615
616 /*
617 * Configuration for rate classes for TX (currently only one
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200618 * rate class supported). Used in non-AP mode.
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300619 */
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200620 struct conf_tx_rate_class sta_rc_conf;
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300621
622 /*
623 * Configuration for access categories for TX rate control.
624 */
625 u8 ac_conf_count;
626 struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT];
627
628 /*
Luciano Coelho25eaea302011-05-02 12:37:33 +0300629 * AP-mode - allow this number of TX retries to a station before an
Arik Nemtsov79b223f2010-10-16 17:52:59 +0200630 * event is triggered from FW.
Arik Nemtsov3618f302011-06-26 10:36:03 +0300631 * In AP-mode the hlids of unreachable stations are given in the
632 * "sta_tx_retry_exceeded" member in the event mailbox.
Arik Nemtsov79b223f2010-10-16 17:52:59 +0200633 */
Arik Nemtsov3618f302011-06-26 10:36:03 +0300634 u8 max_tx_retries;
635
636 /*
637 * AP-mode - after this number of seconds a connected station is
638 * considered inactive.
639 */
640 u16 ap_aging_period;
Arik Nemtsov79b223f2010-10-16 17:52:59 +0200641
642 /*
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300643 * Configuration for TID parameters.
644 */
645 u8 tid_conf_count;
646 struct conf_tx_tid tid_conf[CONF_TX_MAX_TID_COUNT];
647
648 /*
649 * The TX fragmentation threshold.
650 *
651 * Range: u16
652 */
653 u16 frag_threshold;
654
655 /*
656 * Max time in msec the FW may delay frame TX-Complete interrupt.
657 *
658 * Range: u16
659 */
660 u16 tx_compl_timeout;
661
662 /*
663 * Completed TX packet count which requires to issue the TX-Complete
664 * interrupt.
665 *
666 * Range: u16
667 */
668 u16 tx_compl_threshold;
669
Juuso Oikarinenebba60c2010-04-01 11:38:20 +0300670 /*
671 * The rate used for control messages and scanning on the 2.4GHz band
672 *
673 * Range: CONF_HW_BIT_RATE_* bit mask
674 */
675 u32 basic_rate;
676
677 /*
678 * The rate used for control messages and scanning on the 5GHz band
679 *
680 * Range: CONF_HW_BIT_RATE_* bit mask
681 */
682 u32 basic_rate_5;
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200683
684 /*
685 * TX retry limits for templates
686 */
687 u8 tmpl_short_retry_limit;
688 u8 tmpl_long_retry_limit;
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300689};
690
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300691enum {
692 CONF_WAKE_UP_EVENT_BEACON = 0x01, /* Wake on every Beacon*/
693 CONF_WAKE_UP_EVENT_DTIM = 0x02, /* Wake on every DTIM*/
694 CONF_WAKE_UP_EVENT_N_DTIM = 0x04, /* Wake every Nth DTIM */
695 CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */
696 CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F
697};
698
699#define CONF_MAX_BCN_FILT_IE_COUNT 32
700
701#define CONF_BCN_RULE_PASS_ON_CHANGE BIT(0)
702#define CONF_BCN_RULE_PASS_ON_APPEARANCE BIT(1)
703
704#define CONF_BCN_IE_OUI_LEN 3
705#define CONF_BCN_IE_VER_LEN 2
706
707struct conf_bcn_filt_rule {
708 /*
709 * IE number to which to associate a rule.
710 *
711 * Range: u8
712 */
713 u8 ie;
714
715 /*
716 * Rule to associate with the specific ie.
717 *
718 * Range: CONF_BCN_RULE_PASS_ON_*
719 */
720 u8 rule;
721
722 /*
723 * OUI for the vendor specifie IE (221)
724 */
725 u8 oui[CONF_BCN_IE_OUI_LEN];
726
727 /*
728 * Type for the vendor specifie IE (221)
729 */
730 u8 type;
731
732 /*
733 * Version for the vendor specifie IE (221)
734 */
735 u8 version[CONF_BCN_IE_VER_LEN];
736};
737
738#define CONF_MAX_RSSI_SNR_TRIGGERS 8
739
740enum {
741 CONF_TRIG_METRIC_RSSI_BEACON = 0,
742 CONF_TRIG_METRIC_RSSI_DATA,
743 CONF_TRIG_METRIC_SNR_BEACON,
744 CONF_TRIG_METRIC_SNR_DATA
745};
746
747enum {
748 CONF_TRIG_EVENT_TYPE_LEVEL = 0,
749 CONF_TRIG_EVENT_TYPE_EDGE
750};
751
752enum {
753 CONF_TRIG_EVENT_DIR_LOW = 0,
754 CONF_TRIG_EVENT_DIR_HIGH,
755 CONF_TRIG_EVENT_DIR_BIDIR
756};
757
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300758struct conf_sig_weights {
759
760 /*
761 * RSSI from beacons average weight.
762 *
763 * Range: u8
764 */
765 u8 rssi_bcn_avg_weight;
766
767 /*
768 * RSSI from data average weight.
769 *
770 * Range: u8
771 */
772 u8 rssi_pkt_avg_weight;
773
774 /*
775 * SNR from beacons average weight.
776 *
777 * Range: u8
778 */
779 u8 snr_bcn_avg_weight;
780
781 /*
782 * SNR from data average weight.
783 *
784 * Range: u8
785 */
786 u8 snr_pkt_avg_weight;
787};
788
789enum conf_bcn_filt_mode {
790 CONF_BCN_FILT_MODE_DISABLED = 0,
791 CONF_BCN_FILT_MODE_ENABLED = 1
792};
793
Juuso Oikarinen11f70f92009-10-13 12:47:46 +0300794enum conf_bet_mode {
795 CONF_BET_MODE_DISABLE = 0,
796 CONF_BET_MODE_ENABLE = 1,
797};
798
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300799struct conf_conn_settings {
800 /*
801 * Firmware wakeup conditions configuration. The host may set only
802 * one bit.
803 *
804 * Range: CONF_WAKE_UP_EVENT_*
805 */
806 u8 wake_up_event;
807
808 /*
809 * Listen interval for beacons or Dtims.
810 *
811 * Range: 0 for beacon and Dtim wakeup
812 * 1-10 for x Dtims
813 * 1-255 for x beacons
814 */
815 u8 listen_interval;
816
817 /*
818 * Enable or disable the beacon filtering.
819 *
820 * Range: CONF_BCN_FILT_MODE_*
821 */
822 enum conf_bcn_filt_mode bcn_filt_mode;
823
824 /*
825 * Configure Beacon filter pass-thru rules.
826 */
827 u8 bcn_filt_ie_count;
828 struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT];
829
830 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300831 * The number of consecutive beacons to lose, before the firmware
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300832 * becomes out of synch.
833 *
834 * Range: u32
835 */
836 u32 synch_fail_thold;
837
838 /*
839 * After out-of-synch, the number of TU's to wait without a further
840 * received beacon (or probe response) before issuing the BSS_EVENT_LOSE
841 * event.
842 *
843 * Range: u32
844 */
845 u32 bss_lose_timeout;
846
847 /*
848 * Beacon receive timeout.
849 *
850 * Range: u32
851 */
852 u32 beacon_rx_timeout;
853
854 /*
855 * Broadcast receive timeout.
856 *
857 * Range: u32
858 */
859 u32 broadcast_timeout;
860
861 /*
862 * Enable/disable reception of broadcast packets in power save mode
863 *
864 * Range: 1 - enable, 0 - disable
865 */
866 u8 rx_broadcast_in_ps;
867
868 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300869 * Consecutive PS Poll failures before sending event to driver
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300870 *
871 * Range: u8
872 */
873 u8 ps_poll_threshold;
874
875 /*
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300876 * Configuration of signal average weights.
877 */
878 struct conf_sig_weights sig_weights;
Juuso Oikarinen11f70f92009-10-13 12:47:46 +0300879
880 /*
881 * Specifies if beacon early termination procedure is enabled or
882 * disabled.
883 *
884 * Range: CONF_BET_MODE_*
885 */
886 u8 bet_enable;
887
888 /*
889 * Specifies the maximum number of consecutive beacons that may be
890 * early terminated. After this number is reached at least one full
891 * beacon must be correctly received in FW before beacon ET
892 * resumes.
893 *
894 * Range 0 - 255
895 */
896 u8 bet_max_consecutive;
Juuso Oikarinen19ad0712009-11-02 20:22:11 +0200897
898 /*
899 * Specifies the maximum number of times to try PSM entry if it fails
900 * (if sending the appropriate null-func message fails.)
901 *
902 * Range 0 - 255
903 */
904 u8 psm_entry_retries;
Juuso Oikarinenc1899552010-03-26 12:53:32 +0200905
906 /*
Eliad Pelleree608332011-02-02 09:59:34 +0200907 * Specifies the maximum number of times to try PSM exit if it fails
908 * (if sending the appropriate null-func message fails.)
909 *
910 * Range 0 - 255
911 */
912 u8 psm_exit_retries;
913
914 /*
Juuso Oikarinen8eab7b42010-09-24 03:10:11 +0200915 * Specifies the maximum number of times to try transmit the PSM entry
916 * null-func frame for each PSM entry attempt
917 *
918 * Range 0 - 255
919 */
920 u8 psm_entry_nullfunc_retries;
921
922 /*
Eyal Shapiraf1d63a52012-01-31 11:57:21 +0200923 * Specifies the dynamic PS timeout in ms that will be used
924 * by the FW when in AUTO_PS mode
925 */
926 u16 dynamic_ps_timeout;
927
928 /*
Juuso Oikarinenc1899552010-03-26 12:53:32 +0200929 *
930 * Specifies the interval of the connection keep-alive null-func
931 * frame in ms.
932 *
933 * Range: 1000 - 3600000
934 */
935 u32 keep_alive_interval;
Juuso Oikarinen50c500a2010-04-01 11:38:22 +0300936
937 /*
938 * Maximum listen interval supported by the driver in units of beacons.
939 *
940 * Range: u16
941 */
942 u8 max_listen_interval;
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300943};
944
Juuso Oikarinen47fab7d2009-10-13 12:47:43 +0300945enum {
946 CONF_REF_CLK_19_2_E,
947 CONF_REF_CLK_26_E,
948 CONF_REF_CLK_38_4_E,
Shahar Levi5aa42342011-03-06 16:32:07 +0200949 CONF_REF_CLK_52_E,
950 CONF_REF_CLK_38_4_M_XTAL,
951 CONF_REF_CLK_26_M_XTAL,
Juuso Oikarinen47fab7d2009-10-13 12:47:43 +0300952};
953
Teemu Paasikivi1ebec3d2009-10-13 12:47:48 +0300954enum single_dual_band_enum {
955 CONF_SINGLE_BAND,
956 CONF_DUAL_BAND
957};
958
Juuso Oikarinen47fab7d2009-10-13 12:47:43 +0300959#define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15
960#define CONF_NUMBER_OF_SUB_BANDS_5 7
961#define CONF_NUMBER_OF_RATE_GROUPS 6
962#define CONF_NUMBER_OF_CHANNELS_2_4 14
963#define CONF_NUMBER_OF_CHANNELS_5 35
964
Luciano Coelho6e92b412009-12-11 15:40:50 +0200965struct conf_itrim_settings {
966 /* enable dco itrim */
967 u8 enable;
968
969 /* moderation timeout in microsecs from the last TX */
970 u32 timeout;
971};
972
Juuso Oikarinen38ad2d82009-12-11 15:41:08 +0200973struct conf_pm_config_settings {
974 /*
975 * Host clock settling time
976 *
977 * Range: 0 - 30000 us
978 */
979 u32 host_clk_settling_time;
980
981 /*
982 * Host fast wakeup support
983 *
984 * Range: true, false
985 */
986 bool host_fast_wakeup_support;
987};
988
Juuso Oikarinen00236aed2010-04-09 11:07:30 +0300989struct conf_roam_trigger_settings {
990 /*
991 * The minimum interval between two trigger events.
992 *
993 * Range: 0 - 60000 ms
994 */
995 u16 trigger_pacing;
996
997 /*
998 * The weight for rssi/beacon average calculation
999 *
1000 * Range: 0 - 255
1001 */
1002 u8 avg_weight_rssi_beacon;
1003
1004 /*
1005 * The weight for rssi/data frame average calculation
1006 *
1007 * Range: 0 - 255
1008 */
1009 u8 avg_weight_rssi_data;
1010
1011 /*
1012 * The weight for snr/beacon average calculation
1013 *
1014 * Range: 0 - 255
1015 */
1016 u8 avg_weight_snr_beacon;
1017
1018 /*
1019 * The weight for snr/data frame average calculation
1020 *
1021 * Range: 0 - 255
1022 */
1023 u8 avg_weight_snr_data;
1024};
1025
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001026struct conf_scan_settings {
1027 /*
1028 * The minimum time to wait on each channel for active scans
1029 *
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001030 * Range: u32 tu/1000
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001031 */
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001032 u32 min_dwell_time_active;
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001033
1034 /*
1035 * The maximum time to wait on each channel for active scans
1036 *
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001037 * Range: u32 tu/1000
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001038 */
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001039 u32 max_dwell_time_active;
1040
1041 /*
1042 * The minimum time to wait on each channel for passive scans
1043 *
1044 * Range: u32 tu/1000
1045 */
1046 u32 min_dwell_time_passive;
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001047
1048 /*
1049 * The maximum time to wait on each channel for passive scans
1050 *
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001051 * Range: u32 tu/1000
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001052 */
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001053 u32 max_dwell_time_passive;
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001054
1055 /*
1056 * Number of probe requests to transmit on each active scan channel
1057 *
1058 * Range: u8
1059 */
1060 u16 num_probe_reqs;
1061
1062};
1063
Luciano Coelho3a9d60e2011-05-10 14:06:31 +03001064struct conf_sched_scan_settings {
1065 /* minimum time to wait on the channel for active scans (in TUs) */
1066 u16 min_dwell_time_active;
1067
1068 /* maximum time to wait on the channel for active scans (in TUs) */
1069 u16 max_dwell_time_active;
1070
1071 /* time to wait on the channel for passive scans (in TUs) */
1072 u32 dwell_time_passive;
1073
Luciano Coelho50a66d72011-05-27 15:34:47 +03001074 /* time to wait on the channel for DFS scans (in TUs) */
1075 u32 dwell_time_dfs;
1076
Luciano Coelho3a9d60e2011-05-10 14:06:31 +03001077 /* number of probe requests to send on each channel in active scans */
1078 u8 num_probe_reqs;
1079
1080 /* RSSI threshold to be used for filtering */
1081 s8 rssi_threshold;
1082
1083 /* SNR threshold to be used for filtering */
1084 s8 snr_threshold;
1085};
1086
Juuso Oikarinen644a4862010-10-05 13:11:56 +02001087/* these are number of channels on the band divided by two, rounded up */
1088#define CONF_TX_PWR_COMPENSATION_LEN_2 7
1089#define CONF_TX_PWR_COMPENSATION_LEN_5 18
1090
1091struct conf_rf_settings {
1092 /*
1093 * Per channel power compensation for 2.4GHz
1094 *
1095 * Range: s8
1096 */
1097 u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2];
1098
1099 /*
1100 * Per channel power compensation for 5GHz
1101 *
1102 * Range: s8
1103 */
1104 u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5];
1105};
1106
Levi, Shahar4b7fac72011-01-23 07:27:22 +01001107struct conf_ht_setting {
Arik Nemtsov0f9c8252011-08-17 10:45:49 +03001108 u8 rx_ba_win_size;
1109 u8 tx_ba_win_size;
Levi, Shahar4b7fac72011-01-23 07:27:22 +01001110 u16 inactivity_timeout;
Arik Nemtsov0f9c8252011-08-17 10:45:49 +03001111
1112 /* bitmap of enabled TIDs for TX BA sessions */
1113 u8 tx_ba_tid_bitmap;
Levi, Shahar4b7fac72011-01-23 07:27:22 +01001114};
1115
Eliad Pellerc8bde242011-02-02 09:59:35 +02001116struct conf_memory_settings {
Eliad Pellerfe5ef092011-02-02 09:59:36 +02001117 /* Number of stations supported in IBSS mode */
1118 u8 num_stations;
1119
1120 /* Number of ssid profiles used in IBSS mode */
1121 u8 ssid_profiles;
1122
1123 /* Number of memory buffers allocated to rx pool */
1124 u8 rx_block_num;
1125
1126 /* Minimum number of blocks allocated to tx pool */
1127 u8 tx_min_block_num;
1128
Eliad Pellerc8bde242011-02-02 09:59:35 +02001129 /* Disable/Enable dynamic memory */
1130 u8 dynamic_memory;
1131
1132 /*
1133 * Minimum required free tx memory blocks in order to assure optimum
Lucas De Marchi25985ed2011-03-30 22:57:33 -03001134 * performance
Eliad Pellerc8bde242011-02-02 09:59:35 +02001135 *
1136 * Range: 0-120
1137 */
1138 u8 min_req_tx_blocks;
1139
1140 /*
1141 * Minimum required free rx memory blocks in order to assure optimum
Lucas De Marchi25985ed2011-03-30 22:57:33 -03001142 * performance
Eliad Pellerc8bde242011-02-02 09:59:35 +02001143 *
1144 * Range: 0-120
1145 */
1146 u8 min_req_rx_blocks;
1147
1148 /*
1149 * Minimum number of mem blocks (free+used) guaranteed for TX
1150 *
1151 * Range: 0-120
1152 */
1153 u8 tx_min;
1154};
1155
Shahar Leviff868432011-04-11 15:41:46 +03001156struct conf_fm_coex {
1157 u8 enable;
1158 u8 swallow_period;
1159 u8 n_divider_fref_set_1;
1160 u8 n_divider_fref_set_2;
1161 u16 m_divider_fref_set_1;
1162 u16 m_divider_fref_set_2;
1163 u32 coex_pll_stabilization_time;
1164 u16 ldo_stabilization_time;
1165 u8 fm_disturbed_band_margin;
1166 u8 swallow_clk_diff;
1167};
1168
Eliad Pellerf84673d2011-05-15 11:10:28 +03001169struct conf_rx_streaming_settings {
1170 /*
1171 * RX Streaming duration (in msec) from last tx/rx
1172 *
1173 * Range: u32
1174 */
1175 u32 duration;
1176
1177 /*
1178 * Bitmap of tids to be polled during RX streaming.
1179 * (Note: it doesn't look like it really matters)
1180 *
1181 * Range: 0x1-0xff
1182 */
1183 u8 queues;
1184
1185 /*
1186 * RX Streaming interval.
1187 * (Note:this value is also used as the rx streaming timeout)
1188 * Range: 0 (disabled), 10 - 100
1189 */
1190 u8 interval;
Eliad Peller77ddaa12011-05-15 11:10:29 +03001191
1192 /*
1193 * enable rx streaming also when there is no coex activity
1194 */
1195 u8 always;
Eliad Pellerf84673d2011-05-15 11:10:28 +03001196};
1197
Ido Yariv95dac04f2011-06-06 14:57:06 +03001198struct conf_fwlog {
1199 /* Continuous or on-demand */
1200 u8 mode;
1201
1202 /*
1203 * Number of memory blocks dedicated for the FW logger
1204 *
1205 * Range: 1-3, or 0 to disable the FW logger
1206 */
1207 u8 mem_blocks;
1208
1209 /* Minimum log level threshold */
1210 u8 severity;
1211
1212 /* Include/exclude timestamps from the log messages */
1213 u8 timestamp;
1214
1215 /* See enum wl1271_fwlogger_output */
1216 u8 output;
1217
1218 /* Regulates the frequency of log messages */
1219 u8 threshold;
1220};
1221
Eliad Pellerfa6ad9f2011-08-14 13:17:14 +03001222#define ACX_RATE_MGMT_NUM_OF_RATES 13
1223struct conf_rate_policy_settings {
1224 u16 rate_retry_score;
1225 u16 per_add;
1226 u16 per_th1;
1227 u16 per_th2;
1228 u16 max_per;
1229 u8 inverse_curiosity_factor;
1230 u8 tx_fail_low_th;
1231 u8 tx_fail_high_th;
1232 u8 per_alpha_shift;
1233 u8 per_add_shift;
1234 u8 per_beta1_shift;
1235 u8 per_beta2_shift;
1236 u8 rate_check_up;
1237 u8 rate_check_down;
1238 u8 rate_retry_policy[ACX_RATE_MGMT_NUM_OF_RATES];
1239};
1240
Eliad Peller94877752011-08-28 15:11:56 +03001241struct conf_hangover_settings {
1242 u32 recover_time;
1243 u8 hangover_period;
1244 u8 dynamic_mode;
1245 u8 early_termination_mode;
1246 u8 max_period;
1247 u8 min_period;
1248 u8 increase_delta;
1249 u8 decrease_delta;
1250 u8 quiet_time;
1251 u8 increase_time;
1252 u8 window_size;
1253};
1254
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +03001255struct conf_drv_settings {
1256 struct conf_sg_settings sg;
Juuso Oikarinen8793f9b2009-10-13 12:47:40 +03001257 struct conf_rx_settings rx;
Juuso Oikarinen45b531a2009-10-13 12:47:41 +03001258 struct conf_tx_settings tx;
Juuso Oikarinen51f2be22009-10-13 12:47:42 +03001259 struct conf_conn_settings conn;
Luciano Coelho6e92b412009-12-11 15:40:50 +02001260 struct conf_itrim_settings itrim;
Juuso Oikarinen38ad2d82009-12-11 15:41:08 +02001261 struct conf_pm_config_settings pm_config;
Juuso Oikarinen00236aed2010-04-09 11:07:30 +03001262 struct conf_roam_trigger_settings roam_trigger;
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001263 struct conf_scan_settings scan;
Luciano Coelho3a9d60e2011-05-10 14:06:31 +03001264 struct conf_sched_scan_settings sched_scan;
Juuso Oikarinen644a4862010-10-05 13:11:56 +02001265 struct conf_rf_settings rf;
Levi, Shahar4b7fac72011-01-23 07:27:22 +01001266 struct conf_ht_setting ht;
Shahar Levi13b107d2011-03-06 16:32:12 +02001267 struct conf_memory_settings mem_wl127x;
1268 struct conf_memory_settings mem_wl128x;
Shahar Leviff868432011-04-11 15:41:46 +03001269 struct conf_fm_coex fm_coex;
Eliad Pellerf84673d2011-05-15 11:10:28 +03001270 struct conf_rx_streaming_settings rx_streaming;
Ido Yariv95dac04f2011-06-06 14:57:06 +03001271 struct conf_fwlog fwlog;
Eliad Pellerfa6ad9f2011-08-14 13:17:14 +03001272 struct conf_rate_policy_settings rate;
Eliad Peller94877752011-08-28 15:11:56 +03001273 struct conf_hangover_settings hangover;
Luciano Coelhoafb7d3c2011-04-01 20:48:02 +03001274 u8 hci_io_ds;
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +03001275};
1276
1277#endif