blob: fef0db4213bc4c83d3cf51b5092d8fbe004bfe0e [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
Arik Nemtsov43a8bc52011-12-08 00:43:48 +020068#define CONF_HW_RXTX_RATE_UNSUPPORTED 0xff
Pontus Fuchsd2e2d762012-01-31 17:54:40 +020069
Juuso Oikarinenf876bb92010-03-26 12:53:11 +020070enum {
Juuso Oikarinen1b00f542010-03-18 12:26:30 +020071 CONF_SG_DISABLE = 0,
72 CONF_SG_PROTECTIVE,
73 CONF_SG_OPPORTUNISTIC
74};
75
76enum {
77 /*
Eliad Peller3be41122011-08-14 13:17:19 +030078 * Configure the min and max time BT gains the antenna
79 * in WLAN / BT master basic rate
Juuso Oikarinen1b00f542010-03-18 12:26:30 +020080 *
Eliad Peller3be41122011-08-14 13:17:19 +030081 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +020082 */
Eliad Peller3be41122011-08-14 13:17:19 +030083 CONF_SG_ACL_BT_MASTER_MIN_BR = 0,
84 CONF_SG_ACL_BT_MASTER_MAX_BR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +020085
86 /*
Eliad Peller3be41122011-08-14 13:17:19 +030087 * Configure the min and max time BT gains the antenna
88 * in WLAN / BT slave basic rate
Juuso Oikarinen1b00f542010-03-18 12:26:30 +020089 *
Eliad Peller3be41122011-08-14 13:17:19 +030090 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +020091 */
Eliad Peller3be41122011-08-14 13:17:19 +030092 CONF_SG_ACL_BT_SLAVE_MIN_BR,
93 CONF_SG_ACL_BT_SLAVE_MAX_BR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +020094
95 /*
Eliad Peller3be41122011-08-14 13:17:19 +030096 * Configure the min and max time BT gains the antenna
97 * in WLAN / BT master EDR
Juuso Oikarinen1b00f542010-03-18 12:26:30 +020098 *
Eliad Peller3be41122011-08-14 13:17:19 +030099 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200100 */
Eliad Peller3be41122011-08-14 13:17:19 +0300101 CONF_SG_ACL_BT_MASTER_MIN_EDR,
102 CONF_SG_ACL_BT_MASTER_MAX_EDR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200103
104 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300105 * Configure the min and max time BT gains the antenna
106 * in WLAN / BT slave EDR
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200107 *
Eliad Peller3be41122011-08-14 13:17:19 +0300108 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200109 */
Eliad Peller3be41122011-08-14 13:17:19 +0300110 CONF_SG_ACL_BT_SLAVE_MIN_EDR,
111 CONF_SG_ACL_BT_SLAVE_MAX_EDR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200112
113 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300114 * The maximum time WLAN can gain the antenna
115 * in WLAN PSM / BT master/slave BR
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200116 *
Eliad Peller3be41122011-08-14 13:17:19 +0300117 * Range: 0 - 255 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200118 */
Eliad Peller3be41122011-08-14 13:17:19 +0300119 CONF_SG_ACL_WLAN_PS_MASTER_BR,
120 CONF_SG_ACL_WLAN_PS_SLAVE_BR,
121
122 /*
123 * The maximum time WLAN can gain the antenna
124 * in WLAN PSM / BT master/slave EDR
125 *
126 * Range: 0 - 255 (ms)
127 */
128 CONF_SG_ACL_WLAN_PS_MASTER_EDR,
129 CONF_SG_ACL_WLAN_PS_SLAVE_EDR,
130
131 /* TODO: explain these values */
132 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_BR,
133 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_BR,
134 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_BR,
135 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_BR,
136 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_EDR,
137 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_EDR,
138 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_EDR,
139 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_EDR,
140
141 CONF_SG_ACL_ACTIVE_SCAN_WLAN_BR,
142 CONF_SG_ACL_ACTIVE_SCAN_WLAN_EDR,
143 CONF_SG_ACL_PASSIVE_SCAN_BT_BR,
144 CONF_SG_ACL_PASSIVE_SCAN_WLAN_BR,
145 CONF_SG_ACL_PASSIVE_SCAN_BT_EDR,
146 CONF_SG_ACL_PASSIVE_SCAN_WLAN_EDR,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200147
148 /*
149 * Compensation percentage of probe requests when scan initiated
150 * during BT voice/ACL link.
151 *
152 * Range: 0 - 255 (%)
153 */
154 CONF_SG_AUTO_SCAN_PROBE_REQ,
155
156 /*
157 * Compensation percentage of probe requests when active scan initiated
158 * during BT voice
159 *
160 * Range: 0 - 255 (%)
161 */
162 CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3,
163
164 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300165 * Compensation percentage of WLAN active scan window if initiated
166 * during BT A2DP
167 *
168 * Range: 0 - 1000 (%)
169 */
170 CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP,
171
172 /*
173 * Compensation percentage of WLAN passive scan window if initiated
174 * during BT A2DP BR
175 *
176 * Range: 0 - 1000 (%)
177 */
178 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_BR,
179
180 /*
181 * Compensation percentage of WLAN passive scan window if initiated
182 * during BT A2DP EDR
183 *
184 * Range: 0 - 1000 (%)
185 */
186 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_EDR,
187
188 /*
189 * Compensation percentage of WLAN passive scan window if initiated
190 * during BT voice
191 *
192 * Range: 0 - 1000 (%)
193 */
194 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3,
195
196 /* TODO: explain these values */
197 CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN,
198 CONF_SG_BCN_HV3_COLLISION_THRESH_IN_PASSIVE_SCAN,
199 CONF_SG_TX_RX_PROTECTION_BWIDTH_IN_PASSIVE_SCAN,
200
201 /*
202 * Defines whether the SG will force WLAN host to enter/exit PSM
203 *
204 * Range: 1 - SG can force, 0 - host handles PSM
205 */
206 CONF_SG_STA_FORCE_PS_IN_BT_SCO,
207
208 /*
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200209 * Defines antenna configuration (single/dual antenna)
210 *
211 * Range: 0 - single antenna, 1 - dual antenna
212 */
213 CONF_SG_ANTENNA_CONFIGURATION,
214
215 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300216 * The threshold (percent) of max consecutive beacon misses before
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200217 * increasing priority of beacon reception.
218 *
219 * Range: 0 - 100 (%)
220 */
221 CONF_SG_BEACON_MISS_PERCENT,
222
223 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300224 * Protection time of the DHCP procedure.
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200225 *
Eliad Peller3be41122011-08-14 13:17:19 +0300226 * Range: 0 - 100000 (ms)
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200227 */
Eliad Peller3be41122011-08-14 13:17:19 +0300228 CONF_SG_DHCP_TIME,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200229
230 /*
231 * RX guard time before the beginning of a new BT voice frame during
232 * which no new WLAN trigger frame is transmitted.
233 *
234 * Range: 0 - 100000 (us)
235 */
236 CONF_SG_RXT,
237
238 /*
239 * TX guard time before the beginning of a new BT voice frame during
240 * which no new WLAN frame is transmitted.
241 *
242 * Range: 0 - 100000 (us)
243 */
244
245 CONF_SG_TXT,
246
247 /*
248 * Enable adaptive RXT/TXT algorithm. If disabled, the host values
249 * will be utilized.
250 *
251 * Range: 0 - disable, 1 - enable
252 */
253 CONF_SG_ADAPTIVE_RXT_TXT,
254
Eliad Peller3be41122011-08-14 13:17:19 +0300255 /* TODO: explain this value */
256 CONF_SG_GENERAL_USAGE_BIT_MAP,
257
258 /*
259 * Number of consecutive BT voice frames not interrupted by WLAN
260 *
261 * Range: 0 - 100
262 */
263 CONF_SG_HV3_MAX_SERVED,
264
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200265 /*
266 * The used WLAN legacy service period during active BT ACL link
267 *
268 * Range: 0 - 255 (ms)
269 */
270 CONF_SG_PS_POLL_TIMEOUT,
271
272 /*
273 * The used WLAN UPSD service period during active BT ACL link
274 *
275 * Range: 0 - 255 (ms)
276 */
277 CONF_SG_UPSD_TIMEOUT,
278
Eliad Peller3be41122011-08-14 13:17:19 +0300279 CONF_SG_CONSECUTIVE_CTS_THRESHOLD,
280 CONF_SG_STA_RX_WINDOW_AFTER_DTIM,
281 CONF_SG_STA_CONNECTION_PROTECTION_TIME,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200282
Eliad Peller3be41122011-08-14 13:17:19 +0300283 /* AP params */
284 CONF_AP_BEACON_MISS_TX,
285 CONF_AP_RX_WINDOW_AFTER_BEACON,
286 CONF_AP_BEACON_WINDOW_INTERVAL,
287 CONF_AP_CONNECTION_PROTECTION_TIME,
288 CONF_AP_BT_ACL_VAL_BT_SERVE_TIME,
289 CONF_AP_BT_ACL_VAL_WL_SERVE_TIME,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200290
Eliad Peller26612c42012-01-31 17:54:43 +0200291 /* CTS Diluting params */
292 CONF_SG_CTS_DILUTED_BAD_RX_PACKETS_TH,
293 CONF_SG_CTS_CHOP_IN_DUAL_ANT_SCO_MASTER,
294
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200295 CONF_SG_TEMP_PARAM_1,
296 CONF_SG_TEMP_PARAM_2,
297 CONF_SG_TEMP_PARAM_3,
298 CONF_SG_TEMP_PARAM_4,
299 CONF_SG_TEMP_PARAM_5,
Arik Nemtsov801f8702011-04-18 14:15:20 +0300300 CONF_SG_TEMP_PARAM_6,
301 CONF_SG_TEMP_PARAM_7,
302 CONF_SG_TEMP_PARAM_8,
303 CONF_SG_TEMP_PARAM_9,
304 CONF_SG_TEMP_PARAM_10,
305
Eliad Peller3be41122011-08-14 13:17:19 +0300306 CONF_SG_PARAMS_MAX,
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200307 CONF_SG_PARAMS_ALL = 0xff
308};
309
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +0300310struct conf_sg_settings {
Eliad Peller3be41122011-08-14 13:17:19 +0300311 u32 params[CONF_SG_PARAMS_MAX];
Juuso Oikarinen1b00f542010-03-18 12:26:30 +0200312 u8 state;
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +0300313};
314
Juuso Oikarinen8793f9b2009-10-13 12:47:40 +0300315enum conf_rx_queue_type {
316 CONF_RX_QUEUE_TYPE_LOW_PRIORITY, /* All except the high priority */
317 CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */
318};
319
320struct conf_rx_settings {
321 /*
322 * The maximum amount of time, in TU, before the
323 * firmware discards the MSDU.
324 *
325 * Range: 0 - 0xFFFFFFFF
326 */
327 u32 rx_msdu_life_time;
328
329 /*
330 * Packet detection threshold in the PHY.
331 *
332 * FIXME: details unknown.
333 */
334 u32 packet_detection_threshold;
335
336 /*
337 * The longest time the STA will wait to receive traffic from the AP
338 * after a PS-poll has been transmitted.
339 *
340 * Range: 0 - 200000
341 */
342 u16 ps_poll_timeout;
343 /*
344 * The longest time the STA will wait to receive traffic from the AP
345 * after a frame has been sent from an UPSD enabled queue.
346 *
347 * Range: 0 - 200000
348 */
349 u16 upsd_timeout;
350
351 /*
352 * The number of octets in an MPDU, below which an RTS/CTS
353 * handshake is not performed.
354 *
355 * Range: 0 - 4096
356 */
357 u16 rts_threshold;
358
359 /*
360 * The RX Clear Channel Assessment threshold in the PHY
361 * (the energy threshold).
362 *
363 * Range: ENABLE_ENERGY_D == 0x140A
364 * DISABLE_ENERGY_D == 0xFFEF
365 */
366 u16 rx_cca_threshold;
367
368 /*
369 * Occupied Rx mem-blocks number which requires interrupting the host
370 * (0 = no buffering, 0xffff = disabled).
371 *
372 * Range: u16
373 */
374 u16 irq_blk_threshold;
375
376 /*
377 * Rx packets number which requires interrupting the host
378 * (0 = no buffering).
379 *
380 * Range: u16
381 */
382 u16 irq_pkt_threshold;
383
384 /*
385 * Max time in msec the FW may delay RX-Complete interrupt.
386 *
387 * Range: 1 - 100
388 */
389 u16 irq_timeout;
390
391 /*
392 * The RX queue type.
393 *
394 * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY,
395 */
396 u8 queue_type;
397};
398
Eliad Peller4b298862011-10-03 12:06:36 +0200399#define CONF_TX_MAX_RATE_CLASSES 10
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300400
401#define CONF_TX_RATE_MASK_UNSPECIFIED 0
Juuso Oikarinena6fe2312009-12-11 15:40:58 +0200402#define CONF_TX_RATE_MASK_BASIC (CONF_HW_BIT_RATE_1MBPS | \
403 CONF_HW_BIT_RATE_2MBPS)
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300404#define CONF_TX_RATE_RETRY_LIMIT 10
405
Eliad Peller4b298862011-10-03 12:06:36 +0200406/* basic rates for p2p operations (probe req/resp, etc.) */
407#define CONF_TX_RATE_MASK_BASIC_P2P (CONF_HW_BIT_RATE_6MBPS | \
408 CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS)
409
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200410/*
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300411 * Rates supported for data packets when operating as AP. Note the absence
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200412 * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop
413 * one. The rate dropped is not mandatory under any operating mode.
414 */
415#define CONF_TX_AP_ENABLED_RATES (CONF_HW_BIT_RATE_1MBPS | \
416 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
417 CONF_HW_BIT_RATE_6MBPS | CONF_HW_BIT_RATE_9MBPS | \
418 CONF_HW_BIT_RATE_11MBPS | CONF_HW_BIT_RATE_12MBPS | \
419 CONF_HW_BIT_RATE_18MBPS | CONF_HW_BIT_RATE_24MBPS | \
420 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
421 CONF_HW_BIT_RATE_54MBPS)
422
Guy Eilambfafba82011-11-01 09:23:51 +0200423#define CONF_TX_CCK_RATES (CONF_HW_BIT_RATE_1MBPS | \
424 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
425 CONF_HW_BIT_RATE_11MBPS)
426
Arik Nemtsov70f47422011-04-18 14:15:25 +0300427#define CONF_TX_OFDM_RATES (CONF_HW_BIT_RATE_6MBPS | \
428 CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS | \
429 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
430 CONF_HW_BIT_RATE_54MBPS)
431
Arik Nemtsov1a8adb62011-08-14 13:17:29 +0300432#define CONF_TX_MCS_RATES (CONF_HW_BIT_RATE_MCS_0 | \
433 CONF_HW_BIT_RATE_MCS_1 | CONF_HW_BIT_RATE_MCS_2 | \
434 CONF_HW_BIT_RATE_MCS_3 | CONF_HW_BIT_RATE_MCS_4 | \
435 CONF_HW_BIT_RATE_MCS_5 | CONF_HW_BIT_RATE_MCS_6 | \
436 CONF_HW_BIT_RATE_MCS_7)
Arik Nemtsov70f47422011-04-18 14:15:25 +0300437
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200438/*
439 * Default rates for management traffic when operating in AP mode. This
440 * should be configured according to the basic rate set of the AP
441 */
442#define CONF_TX_AP_DEFAULT_MGMT_RATES (CONF_HW_BIT_RATE_1MBPS | \
443 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS)
444
Shahar Levi06b660e2011-09-05 13:54:36 +0300445/* default rates for working as IBSS (11b and OFDM) */
Eliad Pellercb5ae052011-04-07 15:52:05 +0300446#define CONF_TX_IBSS_DEFAULT_RATES (CONF_HW_BIT_RATE_1MBPS | \
447 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
Shahar Levi06b660e2011-09-05 13:54:36 +0300448 CONF_HW_BIT_RATE_11MBPS | CONF_TX_OFDM_RATES);
Eliad Pellercb5ae052011-04-07 15:52:05 +0300449
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300450struct conf_tx_rate_class {
451
452 /*
453 * The rates enabled for this rate class.
454 *
455 * Range: CONF_HW_BIT_RATE_* bit mask
456 */
457 u32 enabled_rates;
458
459 /*
460 * The dot11 short retry limit used for TX retries.
461 *
462 * Range: u8
463 */
464 u8 short_retry_limit;
465
466 /*
467 * The dot11 long retry limit used for TX retries.
468 *
469 * Range: u8
470 */
471 u8 long_retry_limit;
472
473 /*
474 * Flags controlling the attributes of TX transmission.
475 *
476 * Range: bit 0: Truncate - when set, FW attempts to send a frame stop
477 * when the total valid per-rate attempts have
478 * been exhausted; otherwise transmissions
479 * will continue at the lowest available rate
480 * until the appropriate one of the
481 * short_retry_limit, long_retry_limit,
482 * dot11_max_transmit_msdu_life_time, or
483 * max_tx_life_time, is exhausted.
484 * 1: Preamble Override - indicates if the preamble type
485 * should be used in TX.
486 * 2: Preamble Type - the type of the preamble to be used by
487 * the policy (0 - long preamble, 1 - short preamble.
488 */
489 u8 aflags;
490};
491
492#define CONF_TX_MAX_AC_COUNT 4
493
494/* Slot number setting to start transmission at PIFS interval */
495#define CONF_TX_AIFS_PIFS 1
496/* Slot number setting to start transmission at DIFS interval normal
497 * DCF access */
498#define CONF_TX_AIFS_DIFS 2
499
500
501enum conf_tx_ac {
502 CONF_TX_AC_BE = 0, /* best effort / legacy */
503 CONF_TX_AC_BK = 1, /* background */
504 CONF_TX_AC_VI = 2, /* video */
505 CONF_TX_AC_VO = 3, /* voice */
Lucas De Marchi25985ed2011-03-30 22:57:33 -0300506 CONF_TX_AC_CTS2SELF = 4, /* fictitious AC, follows AC_VO */
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300507 CONF_TX_AC_ANY_TID = 0x1f
508};
509
510struct conf_tx_ac_category {
511 /*
512 * The AC class identifier.
513 *
514 * Range: enum conf_tx_ac
515 */
516 u8 ac;
517
518 /*
519 * The contention window minimum size (in slots) for the access
520 * class.
521 *
522 * Range: u8
523 */
524 u8 cw_min;
525
526 /*
527 * The contention window maximum size (in slots) for the access
528 * class.
529 *
530 * Range: u8
531 */
532 u16 cw_max;
533
534 /*
535 * The AIF value (in slots) for the access class.
536 *
537 * Range: u8
538 */
539 u8 aifsn;
540
541 /*
542 * The TX Op Limit (in microseconds) for the access class.
543 *
544 * Range: u16
545 */
546 u16 tx_op_limit;
547};
548
Juuso Oikarinen9987a9d2010-09-01 11:31:12 +0200549#define CONF_TX_MAX_TID_COUNT 8
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300550
Arik Nemtsov0f9c8252011-08-17 10:45:49 +0300551/* Allow TX BA on all TIDs but 6,7. These are currently reserved in the FW */
552#define CONF_TX_BA_ENABLED_TID_BITMAP 0x3F
553
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300554enum {
555 CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/
556 CONF_CHANNEL_TYPE_EDCF = 1, /* EDCA*/
557 CONF_CHANNEL_TYPE_HCCA = 2, /* HCCA*/
558};
559
560enum {
561 CONF_PS_SCHEME_LEGACY = 0,
562 CONF_PS_SCHEME_UPSD_TRIGGER = 1,
563 CONF_PS_SCHEME_LEGACY_PSPOLL = 2,
564 CONF_PS_SCHEME_SAPSD = 3,
565};
566
567enum {
568 CONF_ACK_POLICY_LEGACY = 0,
569 CONF_ACK_POLICY_NO_ACK = 1,
570 CONF_ACK_POLICY_BLOCK = 2,
571};
572
573
574struct conf_tx_tid {
575 u8 queue_id;
576 u8 channel_type;
577 u8 tsid;
578 u8 ps_scheme;
579 u8 ack_policy;
580 u32 apsd_conf[2];
581};
582
583struct conf_tx_settings {
584 /*
585 * The TX ED value for TELEC Enable/Disable.
586 *
587 * Range: 0, 1
588 */
589 u8 tx_energy_detection;
590
591 /*
592 * Configuration for rate classes for TX (currently only one
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200593 * rate class supported). Used in non-AP mode.
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300594 */
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200595 struct conf_tx_rate_class sta_rc_conf;
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300596
597 /*
598 * Configuration for access categories for TX rate control.
599 */
600 u8 ac_conf_count;
601 struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT];
602
603 /*
Luciano Coelho25eaea302011-05-02 12:37:33 +0300604 * AP-mode - allow this number of TX retries to a station before an
Arik Nemtsov79b223f2010-10-16 17:52:59 +0200605 * event is triggered from FW.
Arik Nemtsov3618f302011-06-26 10:36:03 +0300606 * In AP-mode the hlids of unreachable stations are given in the
607 * "sta_tx_retry_exceeded" member in the event mailbox.
Arik Nemtsov79b223f2010-10-16 17:52:59 +0200608 */
Arik Nemtsov3618f302011-06-26 10:36:03 +0300609 u8 max_tx_retries;
610
611 /*
612 * AP-mode - after this number of seconds a connected station is
613 * considered inactive.
614 */
615 u16 ap_aging_period;
Arik Nemtsov79b223f2010-10-16 17:52:59 +0200616
617 /*
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300618 * Configuration for TID parameters.
619 */
620 u8 tid_conf_count;
621 struct conf_tx_tid tid_conf[CONF_TX_MAX_TID_COUNT];
622
623 /*
624 * The TX fragmentation threshold.
625 *
626 * Range: u16
627 */
628 u16 frag_threshold;
629
630 /*
631 * Max time in msec the FW may delay frame TX-Complete interrupt.
632 *
633 * Range: u16
634 */
635 u16 tx_compl_timeout;
636
637 /*
638 * Completed TX packet count which requires to issue the TX-Complete
639 * interrupt.
640 *
641 * Range: u16
642 */
643 u16 tx_compl_threshold;
644
Juuso Oikarinenebba60c2010-04-01 11:38:20 +0300645 /*
646 * The rate used for control messages and scanning on the 2.4GHz band
647 *
648 * Range: CONF_HW_BIT_RATE_* bit mask
649 */
650 u32 basic_rate;
651
652 /*
653 * The rate used for control messages and scanning on the 5GHz band
654 *
655 * Range: CONF_HW_BIT_RATE_* bit mask
656 */
657 u32 basic_rate_5;
Arik Nemtsov1e05a812010-10-16 17:44:51 +0200658
659 /*
660 * TX retry limits for templates
661 */
662 u8 tmpl_short_retry_limit;
663 u8 tmpl_long_retry_limit;
Arik Nemtsov55df5af2012-03-03 22:18:00 +0200664
665 /* Time in ms for Tx watchdog timer to expire */
666 u32 tx_watchdog_timeout;
Juuso Oikarinen45b531a2009-10-13 12:47:41 +0300667};
668
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300669enum {
670 CONF_WAKE_UP_EVENT_BEACON = 0x01, /* Wake on every Beacon*/
671 CONF_WAKE_UP_EVENT_DTIM = 0x02, /* Wake on every DTIM*/
672 CONF_WAKE_UP_EVENT_N_DTIM = 0x04, /* Wake every Nth DTIM */
673 CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */
674 CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F
675};
676
677#define CONF_MAX_BCN_FILT_IE_COUNT 32
678
679#define CONF_BCN_RULE_PASS_ON_CHANGE BIT(0)
680#define CONF_BCN_RULE_PASS_ON_APPEARANCE BIT(1)
681
682#define CONF_BCN_IE_OUI_LEN 3
683#define CONF_BCN_IE_VER_LEN 2
684
685struct conf_bcn_filt_rule {
686 /*
687 * IE number to which to associate a rule.
688 *
689 * Range: u8
690 */
691 u8 ie;
692
693 /*
694 * Rule to associate with the specific ie.
695 *
696 * Range: CONF_BCN_RULE_PASS_ON_*
697 */
698 u8 rule;
699
700 /*
701 * OUI for the vendor specifie IE (221)
702 */
703 u8 oui[CONF_BCN_IE_OUI_LEN];
704
705 /*
706 * Type for the vendor specifie IE (221)
707 */
708 u8 type;
709
710 /*
711 * Version for the vendor specifie IE (221)
712 */
713 u8 version[CONF_BCN_IE_VER_LEN];
714};
715
716#define CONF_MAX_RSSI_SNR_TRIGGERS 8
717
718enum {
719 CONF_TRIG_METRIC_RSSI_BEACON = 0,
720 CONF_TRIG_METRIC_RSSI_DATA,
721 CONF_TRIG_METRIC_SNR_BEACON,
722 CONF_TRIG_METRIC_SNR_DATA
723};
724
725enum {
726 CONF_TRIG_EVENT_TYPE_LEVEL = 0,
727 CONF_TRIG_EVENT_TYPE_EDGE
728};
729
730enum {
731 CONF_TRIG_EVENT_DIR_LOW = 0,
732 CONF_TRIG_EVENT_DIR_HIGH,
733 CONF_TRIG_EVENT_DIR_BIDIR
734};
735
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300736struct conf_sig_weights {
737
738 /*
739 * RSSI from beacons average weight.
740 *
741 * Range: u8
742 */
743 u8 rssi_bcn_avg_weight;
744
745 /*
746 * RSSI from data average weight.
747 *
748 * Range: u8
749 */
750 u8 rssi_pkt_avg_weight;
751
752 /*
753 * SNR from beacons average weight.
754 *
755 * Range: u8
756 */
757 u8 snr_bcn_avg_weight;
758
759 /*
760 * SNR from data average weight.
761 *
762 * Range: u8
763 */
764 u8 snr_pkt_avg_weight;
765};
766
767enum conf_bcn_filt_mode {
768 CONF_BCN_FILT_MODE_DISABLED = 0,
769 CONF_BCN_FILT_MODE_ENABLED = 1
770};
771
Juuso Oikarinen11f70f92009-10-13 12:47:46 +0300772enum conf_bet_mode {
773 CONF_BET_MODE_DISABLE = 0,
774 CONF_BET_MODE_ENABLE = 1,
775};
776
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300777struct conf_conn_settings {
778 /*
779 * Firmware wakeup conditions configuration. The host may set only
780 * one bit.
781 *
782 * Range: CONF_WAKE_UP_EVENT_*
783 */
784 u8 wake_up_event;
785
786 /*
787 * Listen interval for beacons or Dtims.
788 *
789 * Range: 0 for beacon and Dtim wakeup
790 * 1-10 for x Dtims
791 * 1-255 for x beacons
792 */
793 u8 listen_interval;
794
795 /*
Eyal Shapiradae728f2012-02-02 12:03:39 +0200796 * Firmware wakeup conditions during suspend
797 * Range: CONF_WAKE_UP_EVENT_*
798 */
799 u8 suspend_wake_up_event;
800
801 /*
802 * Listen interval during suspend.
803 * Currently will be in DTIMs (1-10)
804 *
805 */
806 u8 suspend_listen_interval;
807
808 /*
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300809 * Enable or disable the beacon filtering.
810 *
811 * Range: CONF_BCN_FILT_MODE_*
812 */
813 enum conf_bcn_filt_mode bcn_filt_mode;
814
815 /*
816 * Configure Beacon filter pass-thru rules.
817 */
818 u8 bcn_filt_ie_count;
819 struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT];
820
821 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300822 * The number of consecutive beacons to lose, before the firmware
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300823 * becomes out of synch.
824 *
825 * Range: u32
826 */
827 u32 synch_fail_thold;
828
829 /*
830 * After out-of-synch, the number of TU's to wait without a further
831 * received beacon (or probe response) before issuing the BSS_EVENT_LOSE
832 * event.
833 *
834 * Range: u32
835 */
836 u32 bss_lose_timeout;
837
838 /*
839 * Beacon receive timeout.
840 *
841 * Range: u32
842 */
843 u32 beacon_rx_timeout;
844
845 /*
846 * Broadcast receive timeout.
847 *
848 * Range: u32
849 */
850 u32 broadcast_timeout;
851
852 /*
853 * Enable/disable reception of broadcast packets in power save mode
854 *
855 * Range: 1 - enable, 0 - disable
856 */
857 u8 rx_broadcast_in_ps;
858
859 /*
Eliad Peller3be41122011-08-14 13:17:19 +0300860 * Consecutive PS Poll failures before sending event to driver
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300861 *
862 * Range: u8
863 */
864 u8 ps_poll_threshold;
865
866 /*
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300867 * Configuration of signal average weights.
868 */
869 struct conf_sig_weights sig_weights;
Juuso Oikarinen11f70f92009-10-13 12:47:46 +0300870
871 /*
872 * Specifies if beacon early termination procedure is enabled or
873 * disabled.
874 *
875 * Range: CONF_BET_MODE_*
876 */
877 u8 bet_enable;
878
879 /*
880 * Specifies the maximum number of consecutive beacons that may be
881 * early terminated. After this number is reached at least one full
882 * beacon must be correctly received in FW before beacon ET
883 * resumes.
884 *
885 * Range 0 - 255
886 */
887 u8 bet_max_consecutive;
Juuso Oikarinen19ad0712009-11-02 20:22:11 +0200888
889 /*
890 * Specifies the maximum number of times to try PSM entry if it fails
891 * (if sending the appropriate null-func message fails.)
892 *
893 * Range 0 - 255
894 */
895 u8 psm_entry_retries;
Juuso Oikarinenc1899552010-03-26 12:53:32 +0200896
897 /*
Eliad Pelleree608332011-02-02 09:59:34 +0200898 * Specifies the maximum number of times to try PSM exit if it fails
899 * (if sending the appropriate null-func message fails.)
900 *
901 * Range 0 - 255
902 */
903 u8 psm_exit_retries;
904
905 /*
Juuso Oikarinen8eab7b42010-09-24 03:10:11 +0200906 * Specifies the maximum number of times to try transmit the PSM entry
907 * null-func frame for each PSM entry attempt
908 *
909 * Range 0 - 255
910 */
911 u8 psm_entry_nullfunc_retries;
912
913 /*
Eyal Shapiraf1d63a52012-01-31 11:57:21 +0200914 * Specifies the dynamic PS timeout in ms that will be used
915 * by the FW when in AUTO_PS mode
916 */
917 u16 dynamic_ps_timeout;
918
919 /*
Eyal Shapira5c0dc2f2012-02-02 19:06:45 +0200920 * Specifies whether dynamic PS should be disabled and PSM forced.
921 * This is required for certain WiFi certification tests.
922 */
923 u8 forced_ps;
924
925 /*
Juuso Oikarinenc1899552010-03-26 12:53:32 +0200926 *
927 * Specifies the interval of the connection keep-alive null-func
928 * frame in ms.
929 *
930 * Range: 1000 - 3600000
931 */
932 u32 keep_alive_interval;
Juuso Oikarinen50c500a2010-04-01 11:38:22 +0300933
934 /*
935 * Maximum listen interval supported by the driver in units of beacons.
936 *
937 * Range: u16
938 */
939 u8 max_listen_interval;
Juuso Oikarinen51f2be22009-10-13 12:47:42 +0300940};
941
Juuso Oikarinen47fab7d2009-10-13 12:47:43 +0300942enum {
943 CONF_REF_CLK_19_2_E,
944 CONF_REF_CLK_26_E,
945 CONF_REF_CLK_38_4_E,
Shahar Levi5aa42342011-03-06 16:32:07 +0200946 CONF_REF_CLK_52_E,
947 CONF_REF_CLK_38_4_M_XTAL,
948 CONF_REF_CLK_26_M_XTAL,
Juuso Oikarinen47fab7d2009-10-13 12:47:43 +0300949};
950
Teemu Paasikivi1ebec3d2009-10-13 12:47:48 +0300951enum single_dual_band_enum {
952 CONF_SINGLE_BAND,
953 CONF_DUAL_BAND
954};
955
Juuso Oikarinen47fab7d2009-10-13 12:47:43 +0300956#define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15
957#define CONF_NUMBER_OF_SUB_BANDS_5 7
958#define CONF_NUMBER_OF_RATE_GROUPS 6
959#define CONF_NUMBER_OF_CHANNELS_2_4 14
960#define CONF_NUMBER_OF_CHANNELS_5 35
961
Luciano Coelho6e92b412009-12-11 15:40:50 +0200962struct conf_itrim_settings {
963 /* enable dco itrim */
964 u8 enable;
965
966 /* moderation timeout in microsecs from the last TX */
967 u32 timeout;
968};
969
Juuso Oikarinen38ad2d82009-12-11 15:41:08 +0200970struct conf_pm_config_settings {
971 /*
972 * Host clock settling time
973 *
974 * Range: 0 - 30000 us
975 */
976 u32 host_clk_settling_time;
977
978 /*
979 * Host fast wakeup support
980 *
981 * Range: true, false
982 */
983 bool host_fast_wakeup_support;
984};
985
Juuso Oikarinen00236aed2010-04-09 11:07:30 +0300986struct conf_roam_trigger_settings {
987 /*
988 * The minimum interval between two trigger events.
989 *
990 * Range: 0 - 60000 ms
991 */
992 u16 trigger_pacing;
993
994 /*
995 * The weight for rssi/beacon average calculation
996 *
997 * Range: 0 - 255
998 */
999 u8 avg_weight_rssi_beacon;
1000
1001 /*
1002 * The weight for rssi/data frame average calculation
1003 *
1004 * Range: 0 - 255
1005 */
1006 u8 avg_weight_rssi_data;
1007
1008 /*
1009 * The weight for snr/beacon average calculation
1010 *
1011 * Range: 0 - 255
1012 */
1013 u8 avg_weight_snr_beacon;
1014
1015 /*
1016 * The weight for snr/data frame average calculation
1017 *
1018 * Range: 0 - 255
1019 */
1020 u8 avg_weight_snr_data;
1021};
1022
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001023struct conf_scan_settings {
1024 /*
1025 * The minimum time to wait on each channel for active scans
1026 *
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001027 * Range: u32 tu/1000
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001028 */
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001029 u32 min_dwell_time_active;
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001030
1031 /*
1032 * The maximum time to wait on each channel for active scans
1033 *
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001034 * Range: u32 tu/1000
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001035 */
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001036 u32 max_dwell_time_active;
1037
1038 /*
1039 * The minimum time to wait on each channel for passive scans
1040 *
1041 * Range: u32 tu/1000
1042 */
1043 u32 min_dwell_time_passive;
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001044
1045 /*
1046 * The maximum time to wait on each channel for passive scans
1047 *
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001048 * Range: u32 tu/1000
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001049 */
Juuso Oikarinenea45b2c2011-01-24 07:01:54 +01001050 u32 max_dwell_time_passive;
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001051
1052 /*
1053 * Number of probe requests to transmit on each active scan channel
1054 *
1055 * Range: u8
1056 */
1057 u16 num_probe_reqs;
1058
Eyal Shapirad647f2d2012-02-02 13:54:28 +02001059 /*
1060 * Scan trigger (split scan) timeout. The FW will split the scan
1061 * operation into slices of the given time and allow the FW to schedule
1062 * other tasks in between.
1063 *
1064 * Range: u32 Microsecs
1065 */
1066 u32 split_scan_timeout;
Juuso Oikarinenbea39d62010-09-21 08:14:31 +02001067};
1068
Luciano Coelho3a9d60e2011-05-10 14:06:31 +03001069struct conf_sched_scan_settings {
Eyal Shapira6f407e52012-03-19 12:06:28 +02001070 /*
1071 * The base time to wait on the channel for active scans (in TU/1000).
1072 * The minimum dwell time is calculated according to this:
1073 * min_dwell_time = base + num_of_probes_to_be_sent * delta_per_probe
1074 * The maximum dwell time is calculated according to this:
1075 * max_dwell_time = min_dwell_time + max_dwell_time_delta
1076 */
1077 u32 base_dwell_time;
Luciano Coelho3a9d60e2011-05-10 14:06:31 +03001078
Eyal Shapira6f407e52012-03-19 12:06:28 +02001079 /* The delta between the min dwell time and max dwell time for
1080 * active scans (in TU/1000s). The max dwell time is used by the FW once
1081 * traffic is detected on the channel.
1082 */
1083 u32 max_dwell_time_delta;
Luciano Coelho3a9d60e2011-05-10 14:06:31 +03001084
Eyal Shapira6f407e52012-03-19 12:06:28 +02001085 /* Delta added to min dwell time per each probe in 2.4 GHz (TU/1000) */
1086 u32 dwell_time_delta_per_probe;
1087
1088 /* Delta added to min dwell time per each probe in 5 GHz (TU/1000) */
1089 u32 dwell_time_delta_per_probe_5;
1090
1091 /* time to wait on the channel for passive scans (in TU/1000) */
Luciano Coelho3a9d60e2011-05-10 14:06:31 +03001092 u32 dwell_time_passive;
1093
Eyal Shapira6f407e52012-03-19 12:06:28 +02001094 /* time to wait on the channel for DFS scans (in TU/1000) */
Luciano Coelho50a66d72011-05-27 15:34:47 +03001095 u32 dwell_time_dfs;
1096
Luciano Coelho3a9d60e2011-05-10 14:06:31 +03001097 /* number of probe requests to send on each channel in active scans */
1098 u8 num_probe_reqs;
1099
1100 /* RSSI threshold to be used for filtering */
1101 s8 rssi_threshold;
1102
1103 /* SNR threshold to be used for filtering */
1104 s8 snr_threshold;
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
Luciano Coelhoe87288f2011-12-05 16:12:54 +02001255struct wlcore_conf {
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +03001256 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;
Levi, Shahar4b7fac72011-01-23 07:27:22 +01001265 struct conf_ht_setting ht;
Luciano Coelho5453dc12011-12-05 19:52:22 +02001266 struct conf_memory_settings mem;
Shahar Leviff868432011-04-11 15:41:46 +03001267 struct conf_fm_coex fm_coex;
Eliad Pellerf84673d2011-05-15 11:10:28 +03001268 struct conf_rx_streaming_settings rx_streaming;
Ido Yariv95dac04f2011-06-06 14:57:06 +03001269 struct conf_fwlog fwlog;
Eliad Pellerfa6ad9f2011-08-14 13:17:14 +03001270 struct conf_rate_policy_settings rate;
Eliad Peller94877752011-08-28 15:11:56 +03001271 struct conf_hangover_settings hangover;
Juuso Oikarinen2b60100b2009-10-13 12:47:39 +03001272};
1273
1274#endif