blob: 209f053129095772635e9ab583924b5fea17cbe8 [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 {
Juuso Oikarinenf876bb92010-03-26 12:53:11 +020069 CONF_HW_RXTX_RATE_MCS7 = 0,
70 CONF_HW_RXTX_RATE_MCS6,
71 CONF_HW_RXTX_RATE_MCS5,
72 CONF_HW_RXTX_RATE_MCS4,
73 CONF_HW_RXTX_RATE_MCS3,
74 CONF_HW_RXTX_RATE_MCS2,
75 CONF_HW_RXTX_RATE_MCS1,
76 CONF_HW_RXTX_RATE_MCS0,
77 CONF_HW_RXTX_RATE_54,
78 CONF_HW_RXTX_RATE_48,
79 CONF_HW_RXTX_RATE_36,
80 CONF_HW_RXTX_RATE_24,
81 CONF_HW_RXTX_RATE_22,
82 CONF_HW_RXTX_RATE_18,
83 CONF_HW_RXTX_RATE_12,
84 CONF_HW_RXTX_RATE_11,
85 CONF_HW_RXTX_RATE_9,
86 CONF_HW_RXTX_RATE_6,
87 CONF_HW_RXTX_RATE_5_5,
88 CONF_HW_RXTX_RATE_2,
89 CONF_HW_RXTX_RATE_1,
90 CONF_HW_RXTX_RATE_MAX,
91 CONF_HW_RXTX_RATE_UNSUPPORTED = 0xff
92};
93
Pontus Fuchsd2e2d762012-01-31 17:54:40 +020094/* Rates between and including these are MCS rates */
95#define CONF_HW_RXTX_RATE_MCS_MIN CONF_HW_RXTX_RATE_MCS7
96#define CONF_HW_RXTX_RATE_MCS_MAX CONF_HW_RXTX_RATE_MCS0
97
Juuso Oikarinenf876bb92010-03-26 12:53:11 +020098enum {
Juuso Oikarinen1b00f542010-03-18 12:26:30 +020099 CONF_SG_DISABLE = 0,
100 CONF_SG_PROTECTIVE,
101 CONF_SG_OPPORTUNISTIC
102};
103
104enum {
105 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300106 * Configure the min and max time BT gains the antenna
107 * in WLAN / BT master basic rate
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200108 *
Eliad Peller3be41122011-08-14 13:17:19 +0300109 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200110 */
Eliad Peller3be41122011-08-14 13:17:19 +0300111 CONF_SG_ACL_BT_MASTER_MIN_BR = 0,
112 CONF_SG_ACL_BT_MASTER_MAX_BR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200113
114 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300115 * Configure the min and max time BT gains the antenna
116 * in WLAN / BT slave basic rate
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200117 *
Eliad Peller3be41122011-08-14 13:17:19 +0300118 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200119 */
Eliad Peller3be41122011-08-14 13:17:19 +0300120 CONF_SG_ACL_BT_SLAVE_MIN_BR,
121 CONF_SG_ACL_BT_SLAVE_MAX_BR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200122
123 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300124 * Configure the min and max time BT gains the antenna
125 * in WLAN / BT master EDR
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200126 *
Eliad Peller3be41122011-08-14 13:17:19 +0300127 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200128 */
Eliad Peller3be41122011-08-14 13:17:19 +0300129 CONF_SG_ACL_BT_MASTER_MIN_EDR,
130 CONF_SG_ACL_BT_MASTER_MAX_EDR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200131
132 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300133 * Configure the min and max time BT gains the antenna
134 * in WLAN / BT slave EDR
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200135 *
Eliad Peller3be41122011-08-14 13:17:19 +0300136 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200137 */
Eliad Peller3be41122011-08-14 13:17:19 +0300138 CONF_SG_ACL_BT_SLAVE_MIN_EDR,
139 CONF_SG_ACL_BT_SLAVE_MAX_EDR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200140
141 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300142 * The maximum time WLAN can gain the antenna
143 * in WLAN PSM / BT master/slave BR
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200144 *
Eliad Peller3be41122011-08-14 13:17:19 +0300145 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200146 */
Eliad Peller3be41122011-08-14 13:17:19 +0300147 CONF_SG_ACL_WLAN_PS_MASTER_BR,
148 CONF_SG_ACL_WLAN_PS_SLAVE_BR,
149
150 /*
151 * The maximum time WLAN can gain the antenna
152 * in WLAN PSM / BT master/slave EDR
153 *
154 * Range: 0 - 255 (ms)
155 */
156 CONF_SG_ACL_WLAN_PS_MASTER_EDR,
157 CONF_SG_ACL_WLAN_PS_SLAVE_EDR,
158
159 /* TODO: explain these values */
160 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_BR,
161 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_BR,
162 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_BR,
163 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_BR,
164 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_EDR,
165 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_EDR,
166 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_EDR,
167 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_EDR,
168
169 CONF_SG_ACL_ACTIVE_SCAN_WLAN_BR,
170 CONF_SG_ACL_ACTIVE_SCAN_WLAN_EDR,
171 CONF_SG_ACL_PASSIVE_SCAN_BT_BR,
172 CONF_SG_ACL_PASSIVE_SCAN_WLAN_BR,
173 CONF_SG_ACL_PASSIVE_SCAN_BT_EDR,
174 CONF_SG_ACL_PASSIVE_SCAN_WLAN_EDR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200175
176 /*
177 * Compensation percentage of probe requests when scan initiated
178 * during BT voice/ACL link.
179 *
180 * Range: 0 - 255 (%)
181 */
182 CONF_SG_AUTO_SCAN_PROBE_REQ,
183
184 /*
185 * Compensation percentage of probe requests when active scan initiated
186 * during BT voice
187 *
188 * Range: 0 - 255 (%)
189 */
190 CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3,
191
192 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300193 * Compensation percentage of WLAN active scan window if initiated
194 * during BT A2DP
195 *
196 * Range: 0 - 1000 (%)
197 */
198 CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP,
199
200 /*
201 * Compensation percentage of WLAN passive scan window if initiated
202 * during BT A2DP BR
203 *
204 * Range: 0 - 1000 (%)
205 */
206 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_BR,
207
208 /*
209 * Compensation percentage of WLAN passive scan window if initiated
210 * during BT A2DP EDR
211 *
212 * Range: 0 - 1000 (%)
213 */
214 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_EDR,
215
216 /*
217 * Compensation percentage of WLAN passive scan window if initiated
218 * during BT voice
219 *
220 * Range: 0 - 1000 (%)
221 */
222 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3,
223
224 /* TODO: explain these values */
225 CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN,
226 CONF_SG_BCN_HV3_COLLISION_THRESH_IN_PASSIVE_SCAN,
227 CONF_SG_TX_RX_PROTECTION_BWIDTH_IN_PASSIVE_SCAN,
228
229 /*
230 * Defines whether the SG will force WLAN host to enter/exit PSM
231 *
232 * Range: 1 - SG can force, 0 - host handles PSM
233 */
234 CONF_SG_STA_FORCE_PS_IN_BT_SCO,
235
236 /*
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200237 * Defines antenna configuration (single/dual antenna)
238 *
239 * Range: 0 - single antenna, 1 - dual antenna
240 */
241 CONF_SG_ANTENNA_CONFIGURATION,
242
243 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300244 * The threshold (percent) of max consecutive beacon misses before
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200245 * increasing priority of beacon reception.
246 *
247 * Range: 0 - 100 (%)
248 */
249 CONF_SG_BEACON_MISS_PERCENT,
250
251 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300252 * Protection time of the DHCP procedure.
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200253 *
Eliad Peller3be41122011-08-14 13:17:19 +0300254 * Range: 0 - 100000 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200255 */
Eliad Peller3be41122011-08-14 13:17:19 +0300256 CONF_SG_DHCP_TIME,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200257
258 /*
259 * RX guard time before the beginning of a new BT voice frame during
260 * which no new WLAN trigger frame is transmitted.
261 *
262 * Range: 0 - 100000 (us)
263 */
264 CONF_SG_RXT,
265
266 /*
267 * TX guard time before the beginning of a new BT voice frame during
268 * which no new WLAN frame is transmitted.
269 *
270 * Range: 0 - 100000 (us)
271 */
272
273 CONF_SG_TXT,
274
275 /*
276 * Enable adaptive RXT/TXT algorithm. If disabled, the host values
277 * will be utilized.
278 *
279 * Range: 0 - disable, 1 - enable
280 */
281 CONF_SG_ADAPTIVE_RXT_TXT,
282
Eliad Peller3be41122011-08-14 13:17:19 +0300283 /* TODO: explain this value */
284 CONF_SG_GENERAL_USAGE_BIT_MAP,
285
286 /*
287 * Number of consecutive BT voice frames not interrupted by WLAN
288 *
289 * Range: 0 - 100
290 */
291 CONF_SG_HV3_MAX_SERVED,
292
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200293 /*
294 * The used WLAN legacy service period during active BT ACL link
295 *
296 * Range: 0 - 255 (ms)
297 */
298 CONF_SG_PS_POLL_TIMEOUT,
299
300 /*
301 * The used WLAN UPSD service period during active BT ACL link
302 *
303 * Range: 0 - 255 (ms)
304 */
305 CONF_SG_UPSD_TIMEOUT,
306
Eliad Peller3be41122011-08-14 13:17:19 +0300307 CONF_SG_CONSECUTIVE_CTS_THRESHOLD,
308 CONF_SG_STA_RX_WINDOW_AFTER_DTIM,
309 CONF_SG_STA_CONNECTION_PROTECTION_TIME,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200310
Eliad Peller3be41122011-08-14 13:17:19 +0300311 /* AP params */
312 CONF_AP_BEACON_MISS_TX,
313 CONF_AP_RX_WINDOW_AFTER_BEACON,
314 CONF_AP_BEACON_WINDOW_INTERVAL,
315 CONF_AP_CONNECTION_PROTECTION_TIME,
316 CONF_AP_BT_ACL_VAL_BT_SERVE_TIME,
317 CONF_AP_BT_ACL_VAL_WL_SERVE_TIME,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200318
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200319 CONF_SG_TEMP_PARAM_1,
320 CONF_SG_TEMP_PARAM_2,
321 CONF_SG_TEMP_PARAM_3,
322 CONF_SG_TEMP_PARAM_4,
323 CONF_SG_TEMP_PARAM_5,
Arik Nemtsov801f8702011-04-18 14:15:20 +0300324 CONF_SG_TEMP_PARAM_6,
325 CONF_SG_TEMP_PARAM_7,
326 CONF_SG_TEMP_PARAM_8,
327 CONF_SG_TEMP_PARAM_9,
328 CONF_SG_TEMP_PARAM_10,
329
Eliad Peller3be41122011-08-14 13:17:19 +0300330 CONF_SG_PARAMS_MAX,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200331 CONF_SG_PARAMS_ALL = 0xff
332};
333
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +0300334struct conf_sg_settings {
Eliad Peller3be41122011-08-14 13:17:19 +0300335 u32 params[CONF_SG_PARAMS_MAX];
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200336 u8 state;
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +0300337};
338
Juuso Oikarinen8793f9b2009-10-13 12:47:40 +0300339enum conf_rx_queue_type {
340 CONF_RX_QUEUE_TYPE_LOW_PRIORITY, /* All except the high priority */
341 CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */
342};
343
344struct conf_rx_settings {
345 /*
346 * The maximum amount of time, in TU, before the
347 * firmware discards the MSDU.
348 *
349 * Range: 0 - 0xFFFFFFFF
350 */
351 u32 rx_msdu_life_time;
352
353 /*
354 * Packet detection threshold in the PHY.
355 *
356 * FIXME: details unknown.
357 */
358 u32 packet_detection_threshold;
359
360 /*
361 * The longest time the STA will wait to receive traffic from the AP
362 * after a PS-poll has been transmitted.
363 *
364 * Range: 0 - 200000
365 */
366 u16 ps_poll_timeout;
367 /*
368 * The longest time the STA will wait to receive traffic from the AP
369 * after a frame has been sent from an UPSD enabled queue.
370 *
371 * Range: 0 - 200000
372 */
373 u16 upsd_timeout;
374
375 /*
376 * The number of octets in an MPDU, below which an RTS/CTS
377 * handshake is not performed.
378 *
379 * Range: 0 - 4096
380 */
381 u16 rts_threshold;
382
383 /*
384 * The RX Clear Channel Assessment threshold in the PHY
385 * (the energy threshold).
386 *
387 * Range: ENABLE_ENERGY_D == 0x140A
388 * DISABLE_ENERGY_D == 0xFFEF
389 */
390 u16 rx_cca_threshold;
391
392 /*
393 * Occupied Rx mem-blocks number which requires interrupting the host
394 * (0 = no buffering, 0xffff = disabled).
395 *
396 * Range: u16
397 */
398 u16 irq_blk_threshold;
399
400 /*
401 * Rx packets number which requires interrupting the host
402 * (0 = no buffering).
403 *
404 * Range: u16
405 */
406 u16 irq_pkt_threshold;
407
408 /*
409 * Max time in msec the FW may delay RX-Complete interrupt.
410 *
411 * Range: 1 - 100
412 */
413 u16 irq_timeout;
414
415 /*
416 * The RX queue type.
417 *
418 * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY,
419 */
420 u8 queue_type;
421};
422
Eliad Peller4b298862011-10-03 12:06:36 +0200423#define CONF_TX_MAX_RATE_CLASSES 10
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300424
425#define CONF_TX_RATE_MASK_UNSPECIFIED 0
Juuso Oikarinena6fe2312009-12-11 15:40:58 +0200426#define CONF_TX_RATE_MASK_BASIC (CONF_HW_BIT_RATE_1MBPS | \
427 CONF_HW_BIT_RATE_2MBPS)
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300428#define CONF_TX_RATE_RETRY_LIMIT 10
429
Eliad Peller4b298862011-10-03 12:06:36 +0200430/* basic rates for p2p operations (probe req/resp, etc.) */
431#define CONF_TX_RATE_MASK_BASIC_P2P (CONF_HW_BIT_RATE_6MBPS | \
432 CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS)
433
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200434/*
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300435 * Rates supported for data packets when operating as AP. Note the absence
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200436 * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop
437 * one. The rate dropped is not mandatory under any operating mode.
438 */
439#define CONF_TX_AP_ENABLED_RATES (CONF_HW_BIT_RATE_1MBPS | \
440 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
441 CONF_HW_BIT_RATE_6MBPS | CONF_HW_BIT_RATE_9MBPS | \
442 CONF_HW_BIT_RATE_11MBPS | CONF_HW_BIT_RATE_12MBPS | \
443 CONF_HW_BIT_RATE_18MBPS | CONF_HW_BIT_RATE_24MBPS | \
444 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
445 CONF_HW_BIT_RATE_54MBPS)
446
Guy Eilambfafba82011-11-01 09:23:51 +0200447#define CONF_TX_CCK_RATES (CONF_HW_BIT_RATE_1MBPS | \
448 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
449 CONF_HW_BIT_RATE_11MBPS)
450
Arik Nemtsov70f47422011-04-18 14:15:25 +0300451#define CONF_TX_OFDM_RATES (CONF_HW_BIT_RATE_6MBPS | \
452 CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS | \
453 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
454 CONF_HW_BIT_RATE_54MBPS)
455
Arik Nemtsov1a8adb62011-08-14 13:17:29 +0300456#define CONF_TX_MCS_RATES (CONF_HW_BIT_RATE_MCS_0 | \
457 CONF_HW_BIT_RATE_MCS_1 | CONF_HW_BIT_RATE_MCS_2 | \
458 CONF_HW_BIT_RATE_MCS_3 | CONF_HW_BIT_RATE_MCS_4 | \
459 CONF_HW_BIT_RATE_MCS_5 | CONF_HW_BIT_RATE_MCS_6 | \
460 CONF_HW_BIT_RATE_MCS_7)
Arik Nemtsov70f47422011-04-18 14:15:25 +0300461
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200462/*
463 * Default rates for management traffic when operating in AP mode. This
464 * should be configured according to the basic rate set of the AP
465 */
466#define CONF_TX_AP_DEFAULT_MGMT_RATES (CONF_HW_BIT_RATE_1MBPS | \
467 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS)
468
Shahar Levi06b660e2011-09-05 13:54:36 +0300469/* default rates for working as IBSS (11b and OFDM) */
Eliad Pellercb5ae052011-04-07 15:52:05 +0300470#define CONF_TX_IBSS_DEFAULT_RATES (CONF_HW_BIT_RATE_1MBPS | \
471 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
Shahar Levi06b660e2011-09-05 13:54:36 +0300472 CONF_HW_BIT_RATE_11MBPS | CONF_TX_OFDM_RATES);
Eliad Pellercb5ae052011-04-07 15:52:05 +0300473
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300474struct conf_tx_rate_class {
475
476 /*
477 * The rates enabled for this rate class.
478 *
479 * Range: CONF_HW_BIT_RATE_* bit mask
480 */
481 u32 enabled_rates;
482
483 /*
484 * The dot11 short retry limit used for TX retries.
485 *
486 * Range: u8
487 */
488 u8 short_retry_limit;
489
490 /*
491 * The dot11 long retry limit used for TX retries.
492 *
493 * Range: u8
494 */
495 u8 long_retry_limit;
496
497 /*
498 * Flags controlling the attributes of TX transmission.
499 *
500 * Range: bit 0: Truncate - when set, FW attempts to send a frame stop
501 * when the total valid per-rate attempts have
502 * been exhausted; otherwise transmissions
503 * will continue at the lowest available rate
504 * until the appropriate one of the
505 * short_retry_limit, long_retry_limit,
506 * dot11_max_transmit_msdu_life_time, or
507 * max_tx_life_time, is exhausted.
508 * 1: Preamble Override - indicates if the preamble type
509 * should be used in TX.
510 * 2: Preamble Type - the type of the preamble to be used by
511 * the policy (0 - long preamble, 1 - short preamble.
512 */
513 u8 aflags;
514};
515
516#define CONF_TX_MAX_AC_COUNT 4
517
518/* Slot number setting to start transmission at PIFS interval */
519#define CONF_TX_AIFS_PIFS 1
520/* Slot number setting to start transmission at DIFS interval normal
521 * DCF access */
522#define CONF_TX_AIFS_DIFS 2
523
524
525enum conf_tx_ac {
526 CONF_TX_AC_BE = 0, /* best effort / legacy */
527 CONF_TX_AC_BK = 1, /* background */
528 CONF_TX_AC_VI = 2, /* video */
529 CONF_TX_AC_VO = 3, /* voice */
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300530 CONF_TX_AC_CTS2SELF = 4, /* fictitious AC, follows AC_VO */
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300531 CONF_TX_AC_ANY_TID = 0x1f
532};
533
534struct conf_tx_ac_category {
535 /*
536 * The AC class identifier.
537 *
538 * Range: enum conf_tx_ac
539 */
540 u8 ac;
541
542 /*
543 * The contention window minimum size (in slots) for the access
544 * class.
545 *
546 * Range: u8
547 */
548 u8 cw_min;
549
550 /*
551 * The contention window maximum size (in slots) for the access
552 * class.
553 *
554 * Range: u8
555 */
556 u16 cw_max;
557
558 /*
559 * The AIF value (in slots) for the access class.
560 *
561 * Range: u8
562 */
563 u8 aifsn;
564
565 /*
566 * The TX Op Limit (in microseconds) for the access class.
567 *
568 * Range: u16
569 */
570 u16 tx_op_limit;
571};
572
Juuso Oikarinen9987a9d2010-09-01 11:31:12 +0200573#define CONF_TX_MAX_TID_COUNT 8
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300574
Arik Nemtsov0f9c8252011-08-17 10:45:49 +0300575/* Allow TX BA on all TIDs but 6,7. These are currently reserved in the FW */
576#define CONF_TX_BA_ENABLED_TID_BITMAP 0x3F
577
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300578enum {
579 CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/
580 CONF_CHANNEL_TYPE_EDCF = 1, /* EDCA*/
581 CONF_CHANNEL_TYPE_HCCA = 2, /* HCCA*/
582};
583
584enum {
585 CONF_PS_SCHEME_LEGACY = 0,
586 CONF_PS_SCHEME_UPSD_TRIGGER = 1,
587 CONF_PS_SCHEME_LEGACY_PSPOLL = 2,
588 CONF_PS_SCHEME_SAPSD = 3,
589};
590
591enum {
592 CONF_ACK_POLICY_LEGACY = 0,
593 CONF_ACK_POLICY_NO_ACK = 1,
594 CONF_ACK_POLICY_BLOCK = 2,
595};
596
597
598struct conf_tx_tid {
599 u8 queue_id;
600 u8 channel_type;
601 u8 tsid;
602 u8 ps_scheme;
603 u8 ack_policy;
604 u32 apsd_conf[2];
605};
606
607struct conf_tx_settings {
608 /*
609 * The TX ED value for TELEC Enable/Disable.
610 *
611 * Range: 0, 1
612 */
613 u8 tx_energy_detection;
614
615 /*
616 * Configuration for rate classes for TX (currently only one
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200617 * rate class supported). Used in non-AP mode.
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300618 */
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200619 struct conf_tx_rate_class sta_rc_conf;
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300620
621 /*
622 * Configuration for access categories for TX rate control.
623 */
624 u8 ac_conf_count;
625 struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT];
626
627 /*
Luciano Coelho25eaea302011-05-02 12:37:33 +0300628 * AP-mode - allow this number of TX retries to a station before an
Arik Nemtsov79b223f2010-10-16 17:52:59 +0200629 * event is triggered from FW.
Arik Nemtsov3618f302011-06-26 10:36:03 +0300630 * In AP-mode the hlids of unreachable stations are given in the
631 * "sta_tx_retry_exceeded" member in the event mailbox.
Arik Nemtsov79b223f2010-10-16 17:52:59 +0200632 */
Arik Nemtsov3618f302011-06-26 10:36:03 +0300633 u8 max_tx_retries;
634
635 /*
636 * AP-mode - after this number of seconds a connected station is
637 * considered inactive.
638 */
639 u16 ap_aging_period;
Arik Nemtsov79b223f2010-10-16 17:52:59 +0200640
641 /*
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300642 * Configuration for TID parameters.
643 */
644 u8 tid_conf_count;
645 struct conf_tx_tid tid_conf[CONF_TX_MAX_TID_COUNT];
646
647 /*
648 * The TX fragmentation threshold.
649 *
650 * Range: u16
651 */
652 u16 frag_threshold;
653
654 /*
655 * Max time in msec the FW may delay frame TX-Complete interrupt.
656 *
657 * Range: u16
658 */
659 u16 tx_compl_timeout;
660
661 /*
662 * Completed TX packet count which requires to issue the TX-Complete
663 * interrupt.
664 *
665 * Range: u16
666 */
667 u16 tx_compl_threshold;
668
Juuso Oikarinenebba60c2010-04-01 11:38:20 +0300669 /*
670 * The rate used for control messages and scanning on the 2.4GHz band
671 *
672 * Range: CONF_HW_BIT_RATE_* bit mask
673 */
674 u32 basic_rate;
675
676 /*
677 * The rate used for control messages and scanning on the 5GHz band
678 *
679 * Range: CONF_HW_BIT_RATE_* bit mask
680 */
681 u32 basic_rate_5;
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200682
683 /*
684 * TX retry limits for templates
685 */
686 u8 tmpl_short_retry_limit;
687 u8 tmpl_long_retry_limit;
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300688};
689
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300690enum {
691 CONF_WAKE_UP_EVENT_BEACON = 0x01, /* Wake on every Beacon*/
692 CONF_WAKE_UP_EVENT_DTIM = 0x02, /* Wake on every DTIM*/
693 CONF_WAKE_UP_EVENT_N_DTIM = 0x04, /* Wake every Nth DTIM */
694 CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */
695 CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F
696};
697
698#define CONF_MAX_BCN_FILT_IE_COUNT 32
699
700#define CONF_BCN_RULE_PASS_ON_CHANGE BIT(0)
701#define CONF_BCN_RULE_PASS_ON_APPEARANCE BIT(1)
702
703#define CONF_BCN_IE_OUI_LEN 3
704#define CONF_BCN_IE_VER_LEN 2
705
706struct conf_bcn_filt_rule {
707 /*
708 * IE number to which to associate a rule.
709 *
710 * Range: u8
711 */
712 u8 ie;
713
714 /*
715 * Rule to associate with the specific ie.
716 *
717 * Range: CONF_BCN_RULE_PASS_ON_*
718 */
719 u8 rule;
720
721 /*
722 * OUI for the vendor specifie IE (221)
723 */
724 u8 oui[CONF_BCN_IE_OUI_LEN];
725
726 /*
727 * Type for the vendor specifie IE (221)
728 */
729 u8 type;
730
731 /*
732 * Version for the vendor specifie IE (221)
733 */
734 u8 version[CONF_BCN_IE_VER_LEN];
735};
736
737#define CONF_MAX_RSSI_SNR_TRIGGERS 8
738
739enum {
740 CONF_TRIG_METRIC_RSSI_BEACON = 0,
741 CONF_TRIG_METRIC_RSSI_DATA,
742 CONF_TRIG_METRIC_SNR_BEACON,
743 CONF_TRIG_METRIC_SNR_DATA
744};
745
746enum {
747 CONF_TRIG_EVENT_TYPE_LEVEL = 0,
748 CONF_TRIG_EVENT_TYPE_EDGE
749};
750
751enum {
752 CONF_TRIG_EVENT_DIR_LOW = 0,
753 CONF_TRIG_EVENT_DIR_HIGH,
754 CONF_TRIG_EVENT_DIR_BIDIR
755};
756
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300757struct conf_sig_weights {
758
759 /*
760 * RSSI from beacons average weight.
761 *
762 * Range: u8
763 */
764 u8 rssi_bcn_avg_weight;
765
766 /*
767 * RSSI from data average weight.
768 *
769 * Range: u8
770 */
771 u8 rssi_pkt_avg_weight;
772
773 /*
774 * SNR from beacons average weight.
775 *
776 * Range: u8
777 */
778 u8 snr_bcn_avg_weight;
779
780 /*
781 * SNR from data average weight.
782 *
783 * Range: u8
784 */
785 u8 snr_pkt_avg_weight;
786};
787
788enum conf_bcn_filt_mode {
789 CONF_BCN_FILT_MODE_DISABLED = 0,
790 CONF_BCN_FILT_MODE_ENABLED = 1
791};
792
Juuso Oikarinen11f70f92009-10-13 12:47:46 +0300793enum conf_bet_mode {
794 CONF_BET_MODE_DISABLE = 0,
795 CONF_BET_MODE_ENABLE = 1,
796};
797
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300798struct conf_conn_settings {
799 /*
800 * Firmware wakeup conditions configuration. The host may set only
801 * one bit.
802 *
803 * Range: CONF_WAKE_UP_EVENT_*
804 */
805 u8 wake_up_event;
806
807 /*
808 * Listen interval for beacons or Dtims.
809 *
810 * Range: 0 for beacon and Dtim wakeup
811 * 1-10 for x Dtims
812 * 1-255 for x beacons
813 */
814 u8 listen_interval;
815
816 /*
817 * Enable or disable the beacon filtering.
818 *
819 * Range: CONF_BCN_FILT_MODE_*
820 */
821 enum conf_bcn_filt_mode bcn_filt_mode;
822
823 /*
824 * Configure Beacon filter pass-thru rules.
825 */
826 u8 bcn_filt_ie_count;
827 struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT];
828
829 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300830 * The number of consecutive beacons to lose, before the firmware
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300831 * becomes out of synch.
832 *
833 * Range: u32
834 */
835 u32 synch_fail_thold;
836
837 /*
838 * After out-of-synch, the number of TU's to wait without a further
839 * received beacon (or probe response) before issuing the BSS_EVENT_LOSE
840 * event.
841 *
842 * Range: u32
843 */
844 u32 bss_lose_timeout;
845
846 /*
847 * Beacon receive timeout.
848 *
849 * Range: u32
850 */
851 u32 beacon_rx_timeout;
852
853 /*
854 * Broadcast receive timeout.
855 *
856 * Range: u32
857 */
858 u32 broadcast_timeout;
859
860 /*
861 * Enable/disable reception of broadcast packets in power save mode
862 *
863 * Range: 1 - enable, 0 - disable
864 */
865 u8 rx_broadcast_in_ps;
866
867 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300868 * Consecutive PS Poll failures before sending event to driver
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300869 *
870 * Range: u8
871 */
872 u8 ps_poll_threshold;
873
874 /*
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300875 * Configuration of signal average weights.
876 */
877 struct conf_sig_weights sig_weights;
Juuso Oikarinen11f70f92009-10-13 12:47:46 +0300878
879 /*
880 * Specifies if beacon early termination procedure is enabled or
881 * disabled.
882 *
883 * Range: CONF_BET_MODE_*
884 */
885 u8 bet_enable;
886
887 /*
888 * Specifies the maximum number of consecutive beacons that may be
889 * early terminated. After this number is reached at least one full
890 * beacon must be correctly received in FW before beacon ET
891 * resumes.
892 *
893 * Range 0 - 255
894 */
895 u8 bet_max_consecutive;
Juuso Oikarinen19ad0712009-11-02 20:22:11 +0200896
897 /*
898 * Specifies the maximum number of times to try PSM entry if it fails
899 * (if sending the appropriate null-func message fails.)
900 *
901 * Range 0 - 255
902 */
903 u8 psm_entry_retries;
Juuso Oikarinenc1899552010-03-26 12:53:32 +0200904
905 /*
Eliad Pelleree608332011-02-02 09:59:34 +0200906 * Specifies the maximum number of times to try PSM exit if it fails
907 * (if sending the appropriate null-func message fails.)
908 *
909 * Range 0 - 255
910 */
911 u8 psm_exit_retries;
912
913 /*
Juuso Oikarinen8eab7b42010-09-24 03:10:11 +0200914 * Specifies the maximum number of times to try transmit the PSM entry
915 * null-func frame for each PSM entry attempt
916 *
917 * Range 0 - 255
918 */
919 u8 psm_entry_nullfunc_retries;
920
921 /*
Eyal Shapiraf1d63a52012-01-31 11:57:21 +0200922 * Specifies the dynamic PS timeout in ms that will be used
923 * by the FW when in AUTO_PS mode
924 */
925 u16 dynamic_ps_timeout;
926
927 /*
Juuso Oikarinenc1899552010-03-26 12:53:32 +0200928 *
929 * Specifies the interval of the connection keep-alive null-func
930 * frame in ms.
931 *
932 * Range: 1000 - 3600000
933 */
934 u32 keep_alive_interval;
Juuso Oikarinen50c500a2010-04-01 11:38:22 +0300935
936 /*
937 * Maximum listen interval supported by the driver in units of beacons.
938 *
939 * Range: u16
940 */
941 u8 max_listen_interval;
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300942};
943
Juuso Oikarinen47fab7d2009-10-13 12:47:43 +0300944enum {
945 CONF_REF_CLK_19_2_E,
946 CONF_REF_CLK_26_E,
947 CONF_REF_CLK_38_4_E,
Shahar Levi5aa42342011-03-06 16:32:07 +0200948 CONF_REF_CLK_52_E,
949 CONF_REF_CLK_38_4_M_XTAL,
950 CONF_REF_CLK_26_M_XTAL,
Juuso Oikarinen47fab7d2009-10-13 12:47:43 +0300951};
952
Teemu Paasikivi1ebec3d2009-10-13 12:47:48 +0300953enum single_dual_band_enum {
954 CONF_SINGLE_BAND,
955 CONF_DUAL_BAND
956};
957
Juuso Oikarinen47fab7d2009-10-13 12:47:43 +0300958#define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15
959#define CONF_NUMBER_OF_SUB_BANDS_5 7
960#define CONF_NUMBER_OF_RATE_GROUPS 6
961#define CONF_NUMBER_OF_CHANNELS_2_4 14
962#define CONF_NUMBER_OF_CHANNELS_5 35
963
Luciano Coelho6e92b412009-12-11 15:40:50 +0200964struct conf_itrim_settings {
965 /* enable dco itrim */
966 u8 enable;
967
968 /* moderation timeout in microsecs from the last TX */
969 u32 timeout;
970};
971
Juuso Oikarinen38ad2d82009-12-11 15:41:08 +0200972struct conf_pm_config_settings {
973 /*
974 * Host clock settling time
975 *
976 * Range: 0 - 30000 us
977 */
978 u32 host_clk_settling_time;
979
980 /*
981 * Host fast wakeup support
982 *
983 * Range: true, false
984 */
985 bool host_fast_wakeup_support;
986};
987
Juuso Oikarinen00236aed2010-04-09 11:07:30 +0300988struct conf_roam_trigger_settings {
989 /*
990 * The minimum interval between two trigger events.
991 *
992 * Range: 0 - 60000 ms
993 */
994 u16 trigger_pacing;
995
996 /*
997 * The weight for rssi/beacon average calculation
998 *
999 * Range: 0 - 255
1000 */
1001 u8 avg_weight_rssi_beacon;
1002
1003 /*
1004 * The weight for rssi/data frame average calculation
1005 *
1006 * Range: 0 - 255
1007 */
1008 u8 avg_weight_rssi_data;
1009
1010 /*
1011 * The weight for snr/beacon average calculation
1012 *
1013 * Range: 0 - 255
1014 */
1015 u8 avg_weight_snr_beacon;
1016
1017 /*
1018 * The weight for snr/data frame average calculation
1019 *
1020 * Range: 0 - 255
1021 */
1022 u8 avg_weight_snr_data;
1023};
1024
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001025struct conf_scan_settings {
1026 /*
1027 * The minimum time to wait on each channel for active scans
1028 *
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001029 * Range: u32 tu/1000
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001030 */
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001031 u32 min_dwell_time_active;
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001032
1033 /*
1034 * The maximum time to wait on each channel for active scans
1035 *
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001036 * Range: u32 tu/1000
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001037 */
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001038 u32 max_dwell_time_active;
1039
1040 /*
1041 * The minimum time to wait on each channel for passive scans
1042 *
1043 * Range: u32 tu/1000
1044 */
1045 u32 min_dwell_time_passive;
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001046
1047 /*
1048 * The maximum time to wait on each channel for passive scans
1049 *
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001050 * Range: u32 tu/1000
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001051 */
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001052 u32 max_dwell_time_passive;
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001053
1054 /*
1055 * Number of probe requests to transmit on each active scan channel
1056 *
1057 * Range: u8
1058 */
1059 u16 num_probe_reqs;
1060
1061};
1062
Luciano Coelho3a9d60e2011-05-10 14:06:31 +03001063struct conf_sched_scan_settings {
1064 /* minimum time to wait on the channel for active scans (in TUs) */
1065 u16 min_dwell_time_active;
1066
1067 /* maximum time to wait on the channel for active scans (in TUs) */
1068 u16 max_dwell_time_active;
1069
1070 /* time to wait on the channel for passive scans (in TUs) */
1071 u32 dwell_time_passive;
1072
Luciano Coelho50a66d72011-05-27 15:34:47 +03001073 /* time to wait on the channel for DFS scans (in TUs) */
1074 u32 dwell_time_dfs;
1075
Luciano Coelho3a9d60e2011-05-10 14:06:31 +03001076 /* number of probe requests to send on each channel in active scans */
1077 u8 num_probe_reqs;
1078
1079 /* RSSI threshold to be used for filtering */
1080 s8 rssi_threshold;
1081
1082 /* SNR threshold to be used for filtering */
1083 s8 snr_threshold;
1084};
1085
Juuso Oikarinen644a4862010-10-05 13:11:56 +02001086/* these are number of channels on the band divided by two, rounded up */
1087#define CONF_TX_PWR_COMPENSATION_LEN_2 7
1088#define CONF_TX_PWR_COMPENSATION_LEN_5 18
1089
1090struct conf_rf_settings {
1091 /*
1092 * Per channel power compensation for 2.4GHz
1093 *
1094 * Range: s8
1095 */
1096 u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2];
1097
1098 /*
1099 * Per channel power compensation for 5GHz
1100 *
1101 * Range: s8
1102 */
1103 u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5];
1104};
1105
Levi, Shahar4b7fac72011-01-23 07:27:22 +01001106struct conf_ht_setting {
Arik Nemtsov0f9c8252011-08-17 10:45:49 +03001107 u8 rx_ba_win_size;
1108 u8 tx_ba_win_size;
Levi, Shahar4b7fac72011-01-23 07:27:22 +01001109 u16 inactivity_timeout;
Arik Nemtsov0f9c8252011-08-17 10:45:49 +03001110
1111 /* bitmap of enabled TIDs for TX BA sessions */
1112 u8 tx_ba_tid_bitmap;
Levi, Shahar4b7fac72011-01-23 07:27:22 +01001113};
1114
Eliad Pellerc8bde242011-02-02 09:59:35 +02001115struct conf_memory_settings {
Eliad Pellerfe5ef092011-02-02 09:59:36 +02001116 /* Number of stations supported in IBSS mode */
1117 u8 num_stations;
1118
1119 /* Number of ssid profiles used in IBSS mode */
1120 u8 ssid_profiles;
1121
1122 /* Number of memory buffers allocated to rx pool */
1123 u8 rx_block_num;
1124
1125 /* Minimum number of blocks allocated to tx pool */
1126 u8 tx_min_block_num;
1127
Eliad Pellerc8bde242011-02-02 09:59:35 +02001128 /* Disable/Enable dynamic memory */
1129 u8 dynamic_memory;
1130
1131 /*
1132 * Minimum required free tx memory blocks in order to assure optimum
Lucas De Marchi25985ed2011-03-30 22:57:33 -03001133 * performance
Eliad Pellerc8bde242011-02-02 09:59:35 +02001134 *
1135 * Range: 0-120
1136 */
1137 u8 min_req_tx_blocks;
1138
1139 /*
1140 * Minimum required free rx memory blocks in order to assure optimum
Lucas De Marchi25985ed2011-03-30 22:57:33 -03001141 * performance
Eliad Pellerc8bde242011-02-02 09:59:35 +02001142 *
1143 * Range: 0-120
1144 */
1145 u8 min_req_rx_blocks;
1146
1147 /*
1148 * Minimum number of mem blocks (free+used) guaranteed for TX
1149 *
1150 * Range: 0-120
1151 */
1152 u8 tx_min;
1153};
1154
Shahar Leviff868432011-04-11 15:41:46 +03001155struct conf_fm_coex {
1156 u8 enable;
1157 u8 swallow_period;
1158 u8 n_divider_fref_set_1;
1159 u8 n_divider_fref_set_2;
1160 u16 m_divider_fref_set_1;
1161 u16 m_divider_fref_set_2;
1162 u32 coex_pll_stabilization_time;
1163 u16 ldo_stabilization_time;
1164 u8 fm_disturbed_band_margin;
1165 u8 swallow_clk_diff;
1166};
1167
Eliad Pellerf84673d2011-05-15 11:10:28 +03001168struct conf_rx_streaming_settings {
1169 /*
1170 * RX Streaming duration (in msec) from last tx/rx
1171 *
1172 * Range: u32
1173 */
1174 u32 duration;
1175
1176 /*
1177 * Bitmap of tids to be polled during RX streaming.
1178 * (Note: it doesn't look like it really matters)
1179 *
1180 * Range: 0x1-0xff
1181 */
1182 u8 queues;
1183
1184 /*
1185 * RX Streaming interval.
1186 * (Note:this value is also used as the rx streaming timeout)
1187 * Range: 0 (disabled), 10 - 100
1188 */
1189 u8 interval;
Eliad Peller77ddaa12011-05-15 11:10:29 +03001190
1191 /*
1192 * enable rx streaming also when there is no coex activity
1193 */
1194 u8 always;
Eliad Pellerf84673d2011-05-15 11:10:28 +03001195};
1196
Ido Yariv95dac04f2011-06-06 14:57:06 +03001197struct conf_fwlog {
1198 /* Continuous or on-demand */
1199 u8 mode;
1200
1201 /*
1202 * Number of memory blocks dedicated for the FW logger
1203 *
1204 * Range: 1-3, or 0 to disable the FW logger
1205 */
1206 u8 mem_blocks;
1207
1208 /* Minimum log level threshold */
1209 u8 severity;
1210
1211 /* Include/exclude timestamps from the log messages */
1212 u8 timestamp;
1213
1214 /* See enum wl1271_fwlogger_output */
1215 u8 output;
1216
1217 /* Regulates the frequency of log messages */
1218 u8 threshold;
1219};
1220
Eliad Pellerfa6ad9f2011-08-14 13:17:14 +03001221#define ACX_RATE_MGMT_NUM_OF_RATES 13
1222struct conf_rate_policy_settings {
1223 u16 rate_retry_score;
1224 u16 per_add;
1225 u16 per_th1;
1226 u16 per_th2;
1227 u16 max_per;
1228 u8 inverse_curiosity_factor;
1229 u8 tx_fail_low_th;
1230 u8 tx_fail_high_th;
1231 u8 per_alpha_shift;
1232 u8 per_add_shift;
1233 u8 per_beta1_shift;
1234 u8 per_beta2_shift;
1235 u8 rate_check_up;
1236 u8 rate_check_down;
1237 u8 rate_retry_policy[ACX_RATE_MGMT_NUM_OF_RATES];
1238};
1239
Eliad Peller94877752011-08-28 15:11:56 +03001240struct conf_hangover_settings {
1241 u32 recover_time;
1242 u8 hangover_period;
1243 u8 dynamic_mode;
1244 u8 early_termination_mode;
1245 u8 max_period;
1246 u8 min_period;
1247 u8 increase_delta;
1248 u8 decrease_delta;
1249 u8 quiet_time;
1250 u8 increase_time;
1251 u8 window_size;
1252};
1253
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +03001254struct conf_drv_settings {
1255 struct conf_sg_settings sg;
Juuso Oikarinen8793f9b2009-10-13 12:47:40 +03001256 struct conf_rx_settings rx;
Juuso Oikarinen45b531a2009-10-13 12:47:41 +03001257 struct conf_tx_settings tx;
Juuso Oikarinen51f2be22009-10-13 12:47:42 +03001258 struct conf_conn_settings conn;
Luciano Coelho6e92b412009-12-11 15:40:50 +02001259 struct conf_itrim_settings itrim;
Juuso Oikarinen38ad2d82009-12-11 15:41:08 +02001260 struct conf_pm_config_settings pm_config;
Juuso Oikarinen00236aed2010-04-09 11:07:30 +03001261 struct conf_roam_trigger_settings roam_trigger;
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001262 struct conf_scan_settings scan;
Luciano Coelho3a9d60e2011-05-10 14:06:31 +03001263 struct conf_sched_scan_settings sched_scan;
Juuso Oikarinen644a4862010-10-05 13:11:56 +02001264 struct conf_rf_settings rf;
Levi, Shahar4b7fac72011-01-23 07:27:22 +01001265 struct conf_ht_setting ht;
Shahar Levi13b107d2011-03-06 16:32:12 +02001266 struct conf_memory_settings mem_wl127x;
1267 struct conf_memory_settings mem_wl128x;
Shahar Leviff868432011-04-11 15:41:46 +03001268 struct conf_fm_coex fm_coex;
Eliad Pellerf84673d2011-05-15 11:10:28 +03001269 struct conf_rx_streaming_settings rx_streaming;
Ido Yariv95dac04f2011-06-06 14:57:06 +03001270 struct conf_fwlog fwlog;
Eliad Pellerfa6ad9f2011-08-14 13:17:14 +03001271 struct conf_rate_policy_settings rate;
Eliad Peller94877752011-08-28 15:11:56 +03001272 struct conf_hangover_settings hangover;
Luciano Coelhoafb7d3c2011-04-01 20:48:02 +03001273 u8 hci_io_ds;
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +03001274};
1275
1276#endif