Commit | Line | Data |
---|---|---|
2b60100b JO |
1 | /* |
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 | ||
00d20100 SL |
24 | #ifndef __CONF_H__ |
25 | #define __CONF_H__ | |
2b60100b JO |
26 | |
27 | enum { | |
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 | ||
51 | enum { | |
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 | ||
f876bb9a | 68 | enum { |
defe02c7 PF |
69 | CONF_HW_RXTX_RATE_MCS7_SGI = 0, |
70 | CONF_HW_RXTX_RATE_MCS7, | |
f876bb9a JO |
71 | 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 | ||
d2e2d769 | 95 | /* Rates between and including these are MCS rates */ |
defe02c7 | 96 | #define CONF_HW_RXTX_RATE_MCS_MIN CONF_HW_RXTX_RATE_MCS7_SGI |
d2e2d769 PF |
97 | #define CONF_HW_RXTX_RATE_MCS_MAX CONF_HW_RXTX_RATE_MCS0 |
98 | ||
1b00f546 JO |
99 | enum { |
100 | CONF_SG_DISABLE = 0, | |
101 | CONF_SG_PROTECTIVE, | |
102 | CONF_SG_OPPORTUNISTIC | |
103 | }; | |
104 | ||
105 | enum { | |
2b60100b | 106 | /* |
3be4112c EP |
107 | * Configure the min and max time BT gains the antenna |
108 | * in WLAN / BT master basic rate | |
2b60100b | 109 | * |
3be4112c | 110 | * Range: 0 - 255 (ms) |
1b00f546 | 111 | */ |
3be4112c EP |
112 | CONF_SG_ACL_BT_MASTER_MIN_BR = 0, |
113 | CONF_SG_ACL_BT_MASTER_MAX_BR, | |
2b60100b | 114 | |
1b00f546 | 115 | /* |
3be4112c EP |
116 | * Configure the min and max time BT gains the antenna |
117 | * in WLAN / BT slave basic rate | |
1b00f546 | 118 | * |
3be4112c | 119 | * Range: 0 - 255 (ms) |
2b60100b | 120 | */ |
3be4112c EP |
121 | CONF_SG_ACL_BT_SLAVE_MIN_BR, |
122 | CONF_SG_ACL_BT_SLAVE_MAX_BR, | |
2b60100b JO |
123 | |
124 | /* | |
3be4112c EP |
125 | * Configure the min and max time BT gains the antenna |
126 | * in WLAN / BT master EDR | |
1b00f546 | 127 | * |
3be4112c | 128 | * Range: 0 - 255 (ms) |
2b60100b | 129 | */ |
3be4112c EP |
130 | CONF_SG_ACL_BT_MASTER_MIN_EDR, |
131 | CONF_SG_ACL_BT_MASTER_MAX_EDR, | |
2b60100b | 132 | |
1b00f546 | 133 | /* |
3be4112c EP |
134 | * Configure the min and max time BT gains the antenna |
135 | * in WLAN / BT slave EDR | |
2b60100b | 136 | * |
3be4112c | 137 | * Range: 0 - 255 (ms) |
2b60100b | 138 | */ |
3be4112c EP |
139 | CONF_SG_ACL_BT_SLAVE_MIN_EDR, |
140 | CONF_SG_ACL_BT_SLAVE_MAX_EDR, | |
2b60100b JO |
141 | |
142 | /* | |
3be4112c EP |
143 | * The maximum time WLAN can gain the antenna |
144 | * in WLAN PSM / BT master/slave BR | |
2b60100b | 145 | * |
3be4112c | 146 | * Range: 0 - 255 (ms) |
2b60100b | 147 | */ |
3be4112c EP |
148 | 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, | |
2b60100b JO |
176 | |
177 | /* | |
1b00f546 JO |
178 | * Compensation percentage of probe requests when scan initiated |
179 | * during BT voice/ACL link. | |
2b60100b | 180 | * |
1b00f546 JO |
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 | /* | |
3be4112c EP |
194 | * Compensation percentage of WLAN active scan window if initiated |
195 | * during BT A2DP | |
2b60100b | 196 | * |
3be4112c | 197 | * Range: 0 - 1000 (%) |
2b60100b | 198 | */ |
3be4112c | 199 | CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP, |
2b60100b JO |
200 | |
201 | /* | |
3be4112c EP |
202 | * Compensation percentage of WLAN passive scan window if initiated |
203 | * during BT A2DP BR | |
2b60100b | 204 | * |
3be4112c | 205 | * Range: 0 - 1000 (%) |
2b60100b | 206 | */ |
3be4112c | 207 | CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_BR, |
2b60100b JO |
208 | |
209 | /* | |
3be4112c EP |
210 | * Compensation percentage of WLAN passive scan window if initiated |
211 | * during BT A2DP EDR | |
2b60100b | 212 | * |
3be4112c | 213 | * Range: 0 - 1000 (%) |
2b60100b | 214 | */ |
3be4112c | 215 | CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_EDR, |
2b60100b JO |
216 | |
217 | /* | |
3be4112c EP |
218 | * Compensation percentage of WLAN passive scan window if initiated |
219 | * during BT voice | |
2b60100b | 220 | * |
3be4112c | 221 | * Range: 0 - 1000 (%) |
2b60100b | 222 | */ |
3be4112c | 223 | CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3, |
2b60100b | 224 | |
3be4112c EP |
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, | |
2b60100b JO |
229 | |
230 | /* | |
3be4112c | 231 | * Defines whether the SG will force WLAN host to enter/exit PSM |
2b60100b | 232 | * |
3be4112c | 233 | * Range: 1 - SG can force, 0 - host handles PSM |
2b60100b | 234 | */ |
3be4112c | 235 | CONF_SG_STA_FORCE_PS_IN_BT_SCO, |
2b60100b JO |
236 | |
237 | /* | |
3be4112c | 238 | * Defines antenna configuration (single/dual antenna) |
2b60100b | 239 | * |
3be4112c | 240 | * Range: 0 - single antenna, 1 - dual antenna |
2b60100b | 241 | */ |
3be4112c | 242 | CONF_SG_ANTENNA_CONFIGURATION, |
1b00f546 JO |
243 | |
244 | /* | |
3be4112c EP |
245 | * The threshold (percent) of max consecutive beacon misses before |
246 | * increasing priority of beacon reception. | |
1b00f546 | 247 | * |
3be4112c | 248 | * Range: 0 - 100 (%) |
1b00f546 | 249 | */ |
3be4112c | 250 | CONF_SG_BEACON_MISS_PERCENT, |
1b00f546 JO |
251 | |
252 | /* | |
3be4112c | 253 | * Protection time of the DHCP procedure. |
1b00f546 | 254 | * |
3be4112c | 255 | * Range: 0 - 100000 (ms) |
1b00f546 | 256 | */ |
3be4112c | 257 | CONF_SG_DHCP_TIME, |
1b00f546 JO |
258 | |
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 | ||
3be4112c EP |
284 | /* TODO: explain this value */ |
285 | CONF_SG_GENERAL_USAGE_BIT_MAP, | |
1b00f546 JO |
286 | |
287 | /* | |
3be4112c | 288 | * Number of consecutive BT voice frames not interrupted by WLAN |
1b00f546 | 289 | * |
3be4112c | 290 | * Range: 0 - 100 |
1b00f546 | 291 | */ |
3be4112c | 292 | CONF_SG_HV3_MAX_SERVED, |
1b00f546 JO |
293 | |
294 | /* | |
3be4112c | 295 | * The used WLAN legacy service period during active BT ACL link |
1b00f546 JO |
296 | * |
297 | * Range: 0 - 255 (ms) | |
298 | */ | |
3be4112c | 299 | CONF_SG_PS_POLL_TIMEOUT, |
1b00f546 JO |
300 | |
301 | /* | |
3be4112c | 302 | * The used WLAN UPSD service period during active BT ACL link |
1b00f546 JO |
303 | * |
304 | * Range: 0 - 255 (ms) | |
305 | */ | |
3be4112c | 306 | CONF_SG_UPSD_TIMEOUT, |
1b00f546 | 307 | |
3be4112c EP |
308 | CONF_SG_CONSECUTIVE_CTS_THRESHOLD, |
309 | CONF_SG_STA_RX_WINDOW_AFTER_DTIM, | |
310 | CONF_SG_STA_CONNECTION_PROTECTION_TIME, | |
1b00f546 | 311 | |
3be4112c EP |
312 | /* 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, | |
1b00f546 | 319 | |
26612c43 EP |
320 | /* CTS Diluting params */ |
321 | CONF_SG_CTS_DILUTED_BAD_RX_PACKETS_TH, | |
322 | CONF_SG_CTS_CHOP_IN_DUAL_ANT_SCO_MASTER, | |
323 | ||
1b00f546 JO |
324 | CONF_SG_TEMP_PARAM_1, |
325 | CONF_SG_TEMP_PARAM_2, | |
326 | CONF_SG_TEMP_PARAM_3, | |
327 | CONF_SG_TEMP_PARAM_4, | |
328 | CONF_SG_TEMP_PARAM_5, | |
801f870b AN |
329 | CONF_SG_TEMP_PARAM_6, |
330 | CONF_SG_TEMP_PARAM_7, | |
331 | CONF_SG_TEMP_PARAM_8, | |
332 | CONF_SG_TEMP_PARAM_9, | |
333 | CONF_SG_TEMP_PARAM_10, | |
334 | ||
3be4112c | 335 | CONF_SG_PARAMS_MAX, |
1b00f546 JO |
336 | CONF_SG_PARAMS_ALL = 0xff |
337 | }; | |
338 | ||
339 | struct conf_sg_settings { | |
3be4112c | 340 | u32 params[CONF_SG_PARAMS_MAX]; |
1b00f546 | 341 | u8 state; |
2b60100b JO |
342 | }; |
343 | ||
8793f9bb JO |
344 | enum conf_rx_queue_type { |
345 | CONF_RX_QUEUE_TYPE_LOW_PRIORITY, /* All except the high priority */ | |
346 | CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */ | |
347 | }; | |
348 | ||
349 | struct conf_rx_settings { | |
350 | /* | |
351 | * The maximum amount of time, in TU, before the | |
352 | * firmware discards the MSDU. | |
353 | * | |
354 | * Range: 0 - 0xFFFFFFFF | |
355 | */ | |
356 | u32 rx_msdu_life_time; | |
357 | ||
358 | /* | |
359 | * Packet detection threshold in the PHY. | |
360 | * | |
361 | * FIXME: details unknown. | |
362 | */ | |
363 | u32 packet_detection_threshold; | |
364 | ||
365 | /* | |
366 | * The longest time the STA will wait to receive traffic from the AP | |
367 | * after a PS-poll has been transmitted. | |
368 | * | |
369 | * Range: 0 - 200000 | |
370 | */ | |
371 | u16 ps_poll_timeout; | |
372 | /* | |
373 | * The longest time the STA will wait to receive traffic from the AP | |
374 | * after a frame has been sent from an UPSD enabled queue. | |
375 | * | |
376 | * Range: 0 - 200000 | |
377 | */ | |
378 | u16 upsd_timeout; | |
379 | ||
380 | /* | |
381 | * The number of octets in an MPDU, below which an RTS/CTS | |
382 | * handshake is not performed. | |
383 | * | |
384 | * Range: 0 - 4096 | |
385 | */ | |
386 | u16 rts_threshold; | |
387 | ||
388 | /* | |
389 | * The RX Clear Channel Assessment threshold in the PHY | |
390 | * (the energy threshold). | |
391 | * | |
392 | * Range: ENABLE_ENERGY_D == 0x140A | |
393 | * DISABLE_ENERGY_D == 0xFFEF | |
394 | */ | |
395 | u16 rx_cca_threshold; | |
396 | ||
397 | /* | |
398 | * Occupied Rx mem-blocks number which requires interrupting the host | |
399 | * (0 = no buffering, 0xffff = disabled). | |
400 | * | |
401 | * Range: u16 | |
402 | */ | |
403 | u16 irq_blk_threshold; | |
404 | ||
405 | /* | |
406 | * Rx packets number which requires interrupting the host | |
407 | * (0 = no buffering). | |
408 | * | |
409 | * Range: u16 | |
410 | */ | |
411 | u16 irq_pkt_threshold; | |
412 | ||
413 | /* | |
414 | * Max time in msec the FW may delay RX-Complete interrupt. | |
415 | * | |
416 | * Range: 1 - 100 | |
417 | */ | |
418 | u16 irq_timeout; | |
419 | ||
420 | /* | |
421 | * The RX queue type. | |
422 | * | |
423 | * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY, | |
424 | */ | |
425 | u8 queue_type; | |
426 | }; | |
427 | ||
4b29886f | 428 | #define CONF_TX_MAX_RATE_CLASSES 10 |
45b531a8 JO |
429 | |
430 | #define CONF_TX_RATE_MASK_UNSPECIFIED 0 | |
a6fe2313 JO |
431 | #define CONF_TX_RATE_MASK_BASIC (CONF_HW_BIT_RATE_1MBPS | \ |
432 | CONF_HW_BIT_RATE_2MBPS) | |
45b531a8 JO |
433 | #define CONF_TX_RATE_RETRY_LIMIT 10 |
434 | ||
4b29886f EP |
435 | /* basic rates for p2p operations (probe req/resp, etc.) */ |
436 | #define CONF_TX_RATE_MASK_BASIC_P2P (CONF_HW_BIT_RATE_6MBPS | \ | |
437 | CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS) | |
438 | ||
1e05a818 | 439 | /* |
25985edc | 440 | * Rates supported for data packets when operating as AP. Note the absence |
1e05a818 AN |
441 | * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop |
442 | * one. The rate dropped is not mandatory under any operating mode. | |
443 | */ | |
444 | #define CONF_TX_AP_ENABLED_RATES (CONF_HW_BIT_RATE_1MBPS | \ | |
445 | CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \ | |
446 | CONF_HW_BIT_RATE_6MBPS | CONF_HW_BIT_RATE_9MBPS | \ | |
447 | CONF_HW_BIT_RATE_11MBPS | CONF_HW_BIT_RATE_12MBPS | \ | |
448 | CONF_HW_BIT_RATE_18MBPS | CONF_HW_BIT_RATE_24MBPS | \ | |
449 | CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \ | |
450 | CONF_HW_BIT_RATE_54MBPS) | |
451 | ||
bfafba8a GE |
452 | #define CONF_TX_CCK_RATES (CONF_HW_BIT_RATE_1MBPS | \ |
453 | CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \ | |
454 | CONF_HW_BIT_RATE_11MBPS) | |
455 | ||
70f47424 AN |
456 | #define CONF_TX_OFDM_RATES (CONF_HW_BIT_RATE_6MBPS | \ |
457 | CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS | \ | |
458 | CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \ | |
459 | CONF_HW_BIT_RATE_54MBPS) | |
460 | ||
1a8adb67 AN |
461 | #define CONF_TX_MCS_RATES (CONF_HW_BIT_RATE_MCS_0 | \ |
462 | CONF_HW_BIT_RATE_MCS_1 | CONF_HW_BIT_RATE_MCS_2 | \ | |
463 | CONF_HW_BIT_RATE_MCS_3 | CONF_HW_BIT_RATE_MCS_4 | \ | |
464 | CONF_HW_BIT_RATE_MCS_5 | CONF_HW_BIT_RATE_MCS_6 | \ | |
465 | CONF_HW_BIT_RATE_MCS_7) | |
70f47424 | 466 | |
1e05a818 AN |
467 | /* |
468 | * Default rates for management traffic when operating in AP mode. This | |
469 | * should be configured according to the basic rate set of the AP | |
470 | */ | |
471 | #define CONF_TX_AP_DEFAULT_MGMT_RATES (CONF_HW_BIT_RATE_1MBPS | \ | |
472 | CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS) | |
473 | ||
06b660e1 | 474 | /* default rates for working as IBSS (11b and OFDM) */ |
cb5ae053 EP |
475 | #define CONF_TX_IBSS_DEFAULT_RATES (CONF_HW_BIT_RATE_1MBPS | \ |
476 | CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \ | |
06b660e1 | 477 | CONF_HW_BIT_RATE_11MBPS | CONF_TX_OFDM_RATES); |
cb5ae053 | 478 | |
45b531a8 JO |
479 | struct conf_tx_rate_class { |
480 | ||
481 | /* | |
482 | * The rates enabled for this rate class. | |
483 | * | |
484 | * Range: CONF_HW_BIT_RATE_* bit mask | |
485 | */ | |
486 | u32 enabled_rates; | |
487 | ||
488 | /* | |
489 | * The dot11 short retry limit used for TX retries. | |
490 | * | |
491 | * Range: u8 | |
492 | */ | |
493 | u8 short_retry_limit; | |
494 | ||
495 | /* | |
496 | * The dot11 long retry limit used for TX retries. | |
497 | * | |
498 | * Range: u8 | |
499 | */ | |
500 | u8 long_retry_limit; | |
501 | ||
502 | /* | |
503 | * Flags controlling the attributes of TX transmission. | |
504 | * | |
505 | * Range: bit 0: Truncate - when set, FW attempts to send a frame stop | |
506 | * when the total valid per-rate attempts have | |
507 | * been exhausted; otherwise transmissions | |
508 | * will continue at the lowest available rate | |
509 | * until the appropriate one of the | |
510 | * short_retry_limit, long_retry_limit, | |
511 | * dot11_max_transmit_msdu_life_time, or | |
512 | * max_tx_life_time, is exhausted. | |
513 | * 1: Preamble Override - indicates if the preamble type | |
514 | * should be used in TX. | |
515 | * 2: Preamble Type - the type of the preamble to be used by | |
516 | * the policy (0 - long preamble, 1 - short preamble. | |
517 | */ | |
518 | u8 aflags; | |
519 | }; | |
520 | ||
521 | #define CONF_TX_MAX_AC_COUNT 4 | |
522 | ||
523 | /* Slot number setting to start transmission at PIFS interval */ | |
524 | #define CONF_TX_AIFS_PIFS 1 | |
525 | /* Slot number setting to start transmission at DIFS interval normal | |
526 | * DCF access */ | |
527 | #define CONF_TX_AIFS_DIFS 2 | |
528 | ||
529 | ||
530 | enum conf_tx_ac { | |
531 | CONF_TX_AC_BE = 0, /* best effort / legacy */ | |
532 | CONF_TX_AC_BK = 1, /* background */ | |
533 | CONF_TX_AC_VI = 2, /* video */ | |
534 | CONF_TX_AC_VO = 3, /* voice */ | |
25985edc | 535 | CONF_TX_AC_CTS2SELF = 4, /* fictitious AC, follows AC_VO */ |
45b531a8 JO |
536 | CONF_TX_AC_ANY_TID = 0x1f |
537 | }; | |
538 | ||
539 | struct conf_tx_ac_category { | |
540 | /* | |
541 | * The AC class identifier. | |
542 | * | |
543 | * Range: enum conf_tx_ac | |
544 | */ | |
545 | u8 ac; | |
546 | ||
547 | /* | |
548 | * The contention window minimum size (in slots) for the access | |
549 | * class. | |
550 | * | |
551 | * Range: u8 | |
552 | */ | |
553 | u8 cw_min; | |
554 | ||
555 | /* | |
556 | * The contention window maximum size (in slots) for the access | |
557 | * class. | |
558 | * | |
559 | * Range: u8 | |
560 | */ | |
561 | u16 cw_max; | |
562 | ||
563 | /* | |
564 | * The AIF value (in slots) for the access class. | |
565 | * | |
566 | * Range: u8 | |
567 | */ | |
568 | u8 aifsn; | |
569 | ||
570 | /* | |
571 | * The TX Op Limit (in microseconds) for the access class. | |
572 | * | |
573 | * Range: u16 | |
574 | */ | |
575 | u16 tx_op_limit; | |
576 | }; | |
577 | ||
9987a9da | 578 | #define CONF_TX_MAX_TID_COUNT 8 |
45b531a8 | 579 | |
0f9c8250 AN |
580 | /* Allow TX BA on all TIDs but 6,7. These are currently reserved in the FW */ |
581 | #define CONF_TX_BA_ENABLED_TID_BITMAP 0x3F | |
582 | ||
45b531a8 JO |
583 | enum { |
584 | CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/ | |
585 | CONF_CHANNEL_TYPE_EDCF = 1, /* EDCA*/ | |
586 | CONF_CHANNEL_TYPE_HCCA = 2, /* HCCA*/ | |
587 | }; | |
588 | ||
589 | enum { | |
590 | CONF_PS_SCHEME_LEGACY = 0, | |
591 | CONF_PS_SCHEME_UPSD_TRIGGER = 1, | |
592 | CONF_PS_SCHEME_LEGACY_PSPOLL = 2, | |
593 | CONF_PS_SCHEME_SAPSD = 3, | |
594 | }; | |
595 | ||
596 | enum { | |
597 | CONF_ACK_POLICY_LEGACY = 0, | |
598 | CONF_ACK_POLICY_NO_ACK = 1, | |
599 | CONF_ACK_POLICY_BLOCK = 2, | |
600 | }; | |
601 | ||
602 | ||
603 | struct conf_tx_tid { | |
604 | u8 queue_id; | |
605 | u8 channel_type; | |
606 | u8 tsid; | |
607 | u8 ps_scheme; | |
608 | u8 ack_policy; | |
609 | u32 apsd_conf[2]; | |
610 | }; | |
611 | ||
612 | struct conf_tx_settings { | |
613 | /* | |
614 | * The TX ED value for TELEC Enable/Disable. | |
615 | * | |
616 | * Range: 0, 1 | |
617 | */ | |
618 | u8 tx_energy_detection; | |
619 | ||
620 | /* | |
621 | * Configuration for rate classes for TX (currently only one | |
1e05a818 | 622 | * rate class supported). Used in non-AP mode. |
45b531a8 | 623 | */ |
1e05a818 | 624 | struct conf_tx_rate_class sta_rc_conf; |
45b531a8 JO |
625 | |
626 | /* | |
627 | * Configuration for access categories for TX rate control. | |
628 | */ | |
629 | u8 ac_conf_count; | |
630 | struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT]; | |
631 | ||
1e05a818 | 632 | /* |
25eaea30 | 633 | * AP-mode - allow this number of TX retries to a station before an |
79b223f4 | 634 | * event is triggered from FW. |
3618f30f AN |
635 | * In AP-mode the hlids of unreachable stations are given in the |
636 | * "sta_tx_retry_exceeded" member in the event mailbox. | |
47684808 | 637 | */ |
3618f30f AN |
638 | u8 max_tx_retries; |
639 | ||
640 | /* | |
641 | * AP-mode - after this number of seconds a connected station is | |
642 | * considered inactive. | |
643 | */ | |
644 | u16 ap_aging_period; | |
79b223f4 | 645 | |
45b531a8 JO |
646 | /* |
647 | * Configuration for TID parameters. | |
648 | */ | |
649 | u8 tid_conf_count; | |
650 | struct conf_tx_tid tid_conf[CONF_TX_MAX_TID_COUNT]; | |
651 | ||
652 | /* | |
653 | * The TX fragmentation threshold. | |
654 | * | |
655 | * Range: u16 | |
656 | */ | |
657 | u16 frag_threshold; | |
658 | ||
659 | /* | |
660 | * Max time in msec the FW may delay frame TX-Complete interrupt. | |
661 | * | |
662 | * Range: u16 | |
663 | */ | |
664 | u16 tx_compl_timeout; | |
665 | ||
666 | /* | |
667 | * Completed TX packet count which requires to issue the TX-Complete | |
668 | * interrupt. | |
669 | * | |
670 | * Range: u16 | |
671 | */ | |
672 | u16 tx_compl_threshold; | |
673 | ||
ebba60c6 JO |
674 | /* |
675 | * The rate used for control messages and scanning on the 2.4GHz band | |
676 | * | |
677 | * Range: CONF_HW_BIT_RATE_* bit mask | |
678 | */ | |
679 | u32 basic_rate; | |
680 | ||
681 | /* | |
682 | * The rate used for control messages and scanning on the 5GHz band | |
683 | * | |
684 | * Range: CONF_HW_BIT_RATE_* bit mask | |
685 | */ | |
686 | u32 basic_rate_5; | |
1e05a818 AN |
687 | |
688 | /* | |
689 | * TX retry limits for templates | |
690 | */ | |
691 | u8 tmpl_short_retry_limit; | |
692 | u8 tmpl_long_retry_limit; | |
55df5afb AN |
693 | |
694 | /* Time in ms for Tx watchdog timer to expire */ | |
695 | u32 tx_watchdog_timeout; | |
45b531a8 JO |
696 | }; |
697 | ||
51f2be24 JO |
698 | enum { |
699 | CONF_WAKE_UP_EVENT_BEACON = 0x01, /* Wake on every Beacon*/ | |
700 | CONF_WAKE_UP_EVENT_DTIM = 0x02, /* Wake on every DTIM*/ | |
701 | CONF_WAKE_UP_EVENT_N_DTIM = 0x04, /* Wake every Nth DTIM */ | |
702 | CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */ | |
703 | CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F | |
704 | }; | |
705 | ||
706 | #define CONF_MAX_BCN_FILT_IE_COUNT 32 | |
707 | ||
708 | #define CONF_BCN_RULE_PASS_ON_CHANGE BIT(0) | |
709 | #define CONF_BCN_RULE_PASS_ON_APPEARANCE BIT(1) | |
710 | ||
711 | #define CONF_BCN_IE_OUI_LEN 3 | |
712 | #define CONF_BCN_IE_VER_LEN 2 | |
713 | ||
714 | struct conf_bcn_filt_rule { | |
715 | /* | |
716 | * IE number to which to associate a rule. | |
717 | * | |
718 | * Range: u8 | |
719 | */ | |
720 | u8 ie; | |
721 | ||
722 | /* | |
723 | * Rule to associate with the specific ie. | |
724 | * | |
725 | * Range: CONF_BCN_RULE_PASS_ON_* | |
726 | */ | |
727 | u8 rule; | |
728 | ||
729 | /* | |
730 | * OUI for the vendor specifie IE (221) | |
731 | */ | |
732 | u8 oui[CONF_BCN_IE_OUI_LEN]; | |
733 | ||
734 | /* | |
735 | * Type for the vendor specifie IE (221) | |
736 | */ | |
737 | u8 type; | |
738 | ||
739 | /* | |
740 | * Version for the vendor specifie IE (221) | |
741 | */ | |
742 | u8 version[CONF_BCN_IE_VER_LEN]; | |
743 | }; | |
744 | ||
745 | #define CONF_MAX_RSSI_SNR_TRIGGERS 8 | |
746 | ||
747 | enum { | |
748 | CONF_TRIG_METRIC_RSSI_BEACON = 0, | |
749 | CONF_TRIG_METRIC_RSSI_DATA, | |
750 | CONF_TRIG_METRIC_SNR_BEACON, | |
751 | CONF_TRIG_METRIC_SNR_DATA | |
752 | }; | |
753 | ||
754 | enum { | |
755 | CONF_TRIG_EVENT_TYPE_LEVEL = 0, | |
756 | CONF_TRIG_EVENT_TYPE_EDGE | |
757 | }; | |
758 | ||
759 | enum { | |
760 | CONF_TRIG_EVENT_DIR_LOW = 0, | |
761 | CONF_TRIG_EVENT_DIR_HIGH, | |
762 | CONF_TRIG_EVENT_DIR_BIDIR | |
763 | }; | |
764 | ||
51f2be24 JO |
765 | struct conf_sig_weights { |
766 | ||
767 | /* | |
768 | * RSSI from beacons average weight. | |
769 | * | |
770 | * Range: u8 | |
771 | */ | |
772 | u8 rssi_bcn_avg_weight; | |
773 | ||
774 | /* | |
775 | * RSSI from data average weight. | |
776 | * | |
777 | * Range: u8 | |
778 | */ | |
779 | u8 rssi_pkt_avg_weight; | |
780 | ||
781 | /* | |
782 | * SNR from beacons average weight. | |
783 | * | |
784 | * Range: u8 | |
785 | */ | |
786 | u8 snr_bcn_avg_weight; | |
787 | ||
788 | /* | |
789 | * SNR from data average weight. | |
790 | * | |
791 | * Range: u8 | |
792 | */ | |
793 | u8 snr_pkt_avg_weight; | |
794 | }; | |
795 | ||
796 | enum conf_bcn_filt_mode { | |
797 | CONF_BCN_FILT_MODE_DISABLED = 0, | |
798 | CONF_BCN_FILT_MODE_ENABLED = 1 | |
799 | }; | |
800 | ||
11f70f97 JO |
801 | enum conf_bet_mode { |
802 | CONF_BET_MODE_DISABLE = 0, | |
803 | CONF_BET_MODE_ENABLE = 1, | |
804 | }; | |
805 | ||
51f2be24 JO |
806 | struct conf_conn_settings { |
807 | /* | |
808 | * Firmware wakeup conditions configuration. The host may set only | |
809 | * one bit. | |
810 | * | |
811 | * Range: CONF_WAKE_UP_EVENT_* | |
812 | */ | |
813 | u8 wake_up_event; | |
814 | ||
815 | /* | |
816 | * Listen interval for beacons or Dtims. | |
817 | * | |
818 | * Range: 0 for beacon and Dtim wakeup | |
819 | * 1-10 for x Dtims | |
820 | * 1-255 for x beacons | |
821 | */ | |
822 | u8 listen_interval; | |
823 | ||
dae728fe ES |
824 | /* |
825 | * Firmware wakeup conditions during suspend | |
826 | * Range: CONF_WAKE_UP_EVENT_* | |
827 | */ | |
828 | u8 suspend_wake_up_event; | |
829 | ||
830 | /* | |
831 | * Listen interval during suspend. | |
832 | * Currently will be in DTIMs (1-10) | |
833 | * | |
834 | */ | |
835 | u8 suspend_listen_interval; | |
836 | ||
51f2be24 JO |
837 | /* |
838 | * Enable or disable the beacon filtering. | |
839 | * | |
840 | * Range: CONF_BCN_FILT_MODE_* | |
841 | */ | |
842 | enum conf_bcn_filt_mode bcn_filt_mode; | |
843 | ||
844 | /* | |
845 | * Configure Beacon filter pass-thru rules. | |
846 | */ | |
847 | u8 bcn_filt_ie_count; | |
848 | struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT]; | |
849 | ||
850 | /* | |
3be4112c | 851 | * The number of consecutive beacons to lose, before the firmware |
51f2be24 JO |
852 | * becomes out of synch. |
853 | * | |
854 | * Range: u32 | |
855 | */ | |
856 | u32 synch_fail_thold; | |
857 | ||
858 | /* | |
859 | * After out-of-synch, the number of TU's to wait without a further | |
860 | * received beacon (or probe response) before issuing the BSS_EVENT_LOSE | |
861 | * event. | |
862 | * | |
863 | * Range: u32 | |
864 | */ | |
865 | u32 bss_lose_timeout; | |
866 | ||
867 | /* | |
868 | * Beacon receive timeout. | |
869 | * | |
870 | * Range: u32 | |
871 | */ | |
872 | u32 beacon_rx_timeout; | |
873 | ||
874 | /* | |
875 | * Broadcast receive timeout. | |
876 | * | |
877 | * Range: u32 | |
878 | */ | |
879 | u32 broadcast_timeout; | |
880 | ||
881 | /* | |
882 | * Enable/disable reception of broadcast packets in power save mode | |
883 | * | |
884 | * Range: 1 - enable, 0 - disable | |
885 | */ | |
886 | u8 rx_broadcast_in_ps; | |
887 | ||
888 | /* | |
3be4112c | 889 | * Consecutive PS Poll failures before sending event to driver |
51f2be24 JO |
890 | * |
891 | * Range: u8 | |
892 | */ | |
893 | u8 ps_poll_threshold; | |
894 | ||
51f2be24 JO |
895 | /* |
896 | * Configuration of signal average weights. | |
897 | */ | |
898 | struct conf_sig_weights sig_weights; | |
11f70f97 JO |
899 | |
900 | /* | |
901 | * Specifies if beacon early termination procedure is enabled or | |
902 | * disabled. | |
903 | * | |
904 | * Range: CONF_BET_MODE_* | |
905 | */ | |
906 | u8 bet_enable; | |
907 | ||
908 | /* | |
909 | * Specifies the maximum number of consecutive beacons that may be | |
910 | * early terminated. After this number is reached at least one full | |
911 | * beacon must be correctly received in FW before beacon ET | |
912 | * resumes. | |
913 | * | |
914 | * Range 0 - 255 | |
915 | */ | |
916 | u8 bet_max_consecutive; | |
19ad0715 JO |
917 | |
918 | /* | |
919 | * Specifies the maximum number of times to try PSM entry if it fails | |
920 | * (if sending the appropriate null-func message fails.) | |
921 | * | |
922 | * Range 0 - 255 | |
923 | */ | |
924 | u8 psm_entry_retries; | |
c1899554 | 925 | |
ee60833a EP |
926 | /* |
927 | * Specifies the maximum number of times to try PSM exit if it fails | |
928 | * (if sending the appropriate null-func message fails.) | |
929 | * | |
930 | * Range 0 - 255 | |
931 | */ | |
932 | u8 psm_exit_retries; | |
933 | ||
8eab7b47 JO |
934 | /* |
935 | * Specifies the maximum number of times to try transmit the PSM entry | |
936 | * null-func frame for each PSM entry attempt | |
937 | * | |
938 | * Range 0 - 255 | |
939 | */ | |
940 | u8 psm_entry_nullfunc_retries; | |
941 | ||
f1d63a59 ES |
942 | /* |
943 | * Specifies the dynamic PS timeout in ms that will be used | |
944 | * by the FW when in AUTO_PS mode | |
945 | */ | |
946 | u16 dynamic_ps_timeout; | |
947 | ||
5c0dc2fc ES |
948 | /* |
949 | * Specifies whether dynamic PS should be disabled and PSM forced. | |
950 | * This is required for certain WiFi certification tests. | |
951 | */ | |
952 | u8 forced_ps; | |
953 | ||
c1899554 JO |
954 | /* |
955 | * | |
956 | * Specifies the interval of the connection keep-alive null-func | |
957 | * frame in ms. | |
958 | * | |
959 | * Range: 1000 - 3600000 | |
960 | */ | |
961 | u32 keep_alive_interval; | |
50c500ad JO |
962 | |
963 | /* | |
964 | * Maximum listen interval supported by the driver in units of beacons. | |
965 | * | |
966 | * Range: u16 | |
967 | */ | |
968 | u8 max_listen_interval; | |
51f2be24 JO |
969 | }; |
970 | ||
47fab7d5 JO |
971 | enum { |
972 | CONF_REF_CLK_19_2_E, | |
973 | CONF_REF_CLK_26_E, | |
974 | CONF_REF_CLK_38_4_E, | |
5aa42346 SL |
975 | CONF_REF_CLK_52_E, |
976 | CONF_REF_CLK_38_4_M_XTAL, | |
977 | CONF_REF_CLK_26_M_XTAL, | |
47fab7d5 JO |
978 | }; |
979 | ||
1ebec3d7 TP |
980 | enum single_dual_band_enum { |
981 | CONF_SINGLE_BAND, | |
982 | CONF_DUAL_BAND | |
983 | }; | |
984 | ||
47fab7d5 JO |
985 | #define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15 |
986 | #define CONF_NUMBER_OF_SUB_BANDS_5 7 | |
987 | #define CONF_NUMBER_OF_RATE_GROUPS 6 | |
988 | #define CONF_NUMBER_OF_CHANNELS_2_4 14 | |
989 | #define CONF_NUMBER_OF_CHANNELS_5 35 | |
990 | ||
6e92b416 LC |
991 | struct conf_itrim_settings { |
992 | /* enable dco itrim */ | |
993 | u8 enable; | |
994 | ||
995 | /* moderation timeout in microsecs from the last TX */ | |
996 | u32 timeout; | |
997 | }; | |
998 | ||
38ad2d87 JO |
999 | struct conf_pm_config_settings { |
1000 | /* | |
1001 | * Host clock settling time | |
1002 | * | |
1003 | * Range: 0 - 30000 us | |
1004 | */ | |
1005 | u32 host_clk_settling_time; | |
1006 | ||
1007 | /* | |
1008 | * Host fast wakeup support | |
1009 | * | |
1010 | * Range: true, false | |
1011 | */ | |
1012 | bool host_fast_wakeup_support; | |
1013 | }; | |
1014 | ||
00236aed JO |
1015 | struct conf_roam_trigger_settings { |
1016 | /* | |
1017 | * The minimum interval between two trigger events. | |
1018 | * | |
1019 | * Range: 0 - 60000 ms | |
1020 | */ | |
1021 | u16 trigger_pacing; | |
1022 | ||
1023 | /* | |
1024 | * The weight for rssi/beacon average calculation | |
1025 | * | |
1026 | * Range: 0 - 255 | |
1027 | */ | |
1028 | u8 avg_weight_rssi_beacon; | |
1029 | ||
1030 | /* | |
1031 | * The weight for rssi/data frame average calculation | |
1032 | * | |
1033 | * Range: 0 - 255 | |
1034 | */ | |
1035 | u8 avg_weight_rssi_data; | |
1036 | ||
1037 | /* | |
1038 | * The weight for snr/beacon average calculation | |
1039 | * | |
1040 | * Range: 0 - 255 | |
1041 | */ | |
1042 | u8 avg_weight_snr_beacon; | |
1043 | ||
1044 | /* | |
1045 | * The weight for snr/data frame average calculation | |
1046 | * | |
1047 | * Range: 0 - 255 | |
1048 | */ | |
1049 | u8 avg_weight_snr_data; | |
1050 | }; | |
1051 | ||
bea39d6a JO |
1052 | struct conf_scan_settings { |
1053 | /* | |
1054 | * The minimum time to wait on each channel for active scans | |
1055 | * | |
ea45b2cb | 1056 | * Range: u32 tu/1000 |
bea39d6a | 1057 | */ |
ea45b2cb | 1058 | u32 min_dwell_time_active; |
bea39d6a JO |
1059 | |
1060 | /* | |
1061 | * The maximum time to wait on each channel for active scans | |
1062 | * | |
ea45b2cb | 1063 | * Range: u32 tu/1000 |
bea39d6a | 1064 | */ |
ea45b2cb | 1065 | u32 max_dwell_time_active; |
bea39d6a JO |
1066 | |
1067 | /* | |
ea45b2cb | 1068 | * The minimum time to wait on each channel for passive scans |
bea39d6a | 1069 | * |
ea45b2cb | 1070 | * Range: u32 tu/1000 |
bea39d6a | 1071 | */ |
ea45b2cb | 1072 | u32 min_dwell_time_passive; |
bea39d6a JO |
1073 | |
1074 | /* | |
1075 | * The maximum time to wait on each channel for passive scans | |
1076 | * | |
ea45b2cb | 1077 | * Range: u32 tu/1000 |
bea39d6a | 1078 | */ |
ea45b2cb | 1079 | u32 max_dwell_time_passive; |
bea39d6a JO |
1080 | |
1081 | /* | |
1082 | * Number of probe requests to transmit on each active scan channel | |
1083 | * | |
1084 | * Range: u8 | |
1085 | */ | |
1086 | u16 num_probe_reqs; | |
1087 | ||
d647f2dd ES |
1088 | /* |
1089 | * Scan trigger (split scan) timeout. The FW will split the scan | |
1090 | * operation into slices of the given time and allow the FW to schedule | |
1091 | * other tasks in between. | |
1092 | * | |
1093 | * Range: u32 Microsecs | |
1094 | */ | |
1095 | u32 split_scan_timeout; | |
bea39d6a JO |
1096 | }; |
1097 | ||
3a9d60e5 | 1098 | struct conf_sched_scan_settings { |
6f407e5b ES |
1099 | /* |
1100 | * The base time to wait on the channel for active scans (in TU/1000). | |
1101 | * The minimum dwell time is calculated according to this: | |
1102 | * min_dwell_time = base + num_of_probes_to_be_sent * delta_per_probe | |
1103 | * The maximum dwell time is calculated according to this: | |
1104 | * max_dwell_time = min_dwell_time + max_dwell_time_delta | |
1105 | */ | |
1106 | u32 base_dwell_time; | |
1107 | ||
1108 | /* The delta between the min dwell time and max dwell time for | |
1109 | * active scans (in TU/1000s). The max dwell time is used by the FW once | |
1110 | * traffic is detected on the channel. | |
1111 | */ | |
1112 | u32 max_dwell_time_delta; | |
1113 | ||
1114 | /* Delta added to min dwell time per each probe in 2.4 GHz (TU/1000) */ | |
1115 | u32 dwell_time_delta_per_probe; | |
3a9d60e5 | 1116 | |
6f407e5b ES |
1117 | /* Delta added to min dwell time per each probe in 5 GHz (TU/1000) */ |
1118 | u32 dwell_time_delta_per_probe_5; | |
3a9d60e5 | 1119 | |
6f407e5b | 1120 | /* time to wait on the channel for passive scans (in TU/1000) */ |
3a9d60e5 LC |
1121 | u32 dwell_time_passive; |
1122 | ||
6f407e5b | 1123 | /* time to wait on the channel for DFS scans (in TU/1000) */ |
50a66d7f LC |
1124 | u32 dwell_time_dfs; |
1125 | ||
3a9d60e5 LC |
1126 | /* number of probe requests to send on each channel in active scans */ |
1127 | u8 num_probe_reqs; | |
1128 | ||
1129 | /* RSSI threshold to be used for filtering */ | |
1130 | s8 rssi_threshold; | |
1131 | ||
1132 | /* SNR threshold to be used for filtering */ | |
1133 | s8 snr_threshold; | |
1134 | }; | |
1135 | ||
644a4860 JO |
1136 | /* these are number of channels on the band divided by two, rounded up */ |
1137 | #define CONF_TX_PWR_COMPENSATION_LEN_2 7 | |
1138 | #define CONF_TX_PWR_COMPENSATION_LEN_5 18 | |
1139 | ||
1140 | struct conf_rf_settings { | |
1141 | /* | |
1142 | * Per channel power compensation for 2.4GHz | |
1143 | * | |
1144 | * Range: s8 | |
1145 | */ | |
1146 | u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2]; | |
1147 | ||
1148 | /* | |
1149 | * Per channel power compensation for 5GHz | |
1150 | * | |
1151 | * Range: s8 | |
1152 | */ | |
1153 | u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5]; | |
1154 | }; | |
1155 | ||
4b7fac77 | 1156 | struct conf_ht_setting { |
0f9c8250 AN |
1157 | u8 rx_ba_win_size; |
1158 | u8 tx_ba_win_size; | |
4b7fac77 | 1159 | u16 inactivity_timeout; |
0f9c8250 AN |
1160 | |
1161 | /* bitmap of enabled TIDs for TX BA sessions */ | |
1162 | u8 tx_ba_tid_bitmap; | |
4b7fac77 LS |
1163 | }; |
1164 | ||
c8bde243 | 1165 | struct conf_memory_settings { |
fe5ef090 EP |
1166 | /* Number of stations supported in IBSS mode */ |
1167 | u8 num_stations; | |
1168 | ||
1169 | /* Number of ssid profiles used in IBSS mode */ | |
1170 | u8 ssid_profiles; | |
1171 | ||
1172 | /* Number of memory buffers allocated to rx pool */ | |
1173 | u8 rx_block_num; | |
1174 | ||
1175 | /* Minimum number of blocks allocated to tx pool */ | |
1176 | u8 tx_min_block_num; | |
1177 | ||
c8bde243 EP |
1178 | /* Disable/Enable dynamic memory */ |
1179 | u8 dynamic_memory; | |
1180 | ||
1181 | /* | |
1182 | * Minimum required free tx memory blocks in order to assure optimum | |
25985edc | 1183 | * performance |
c8bde243 EP |
1184 | * |
1185 | * Range: 0-120 | |
1186 | */ | |
1187 | u8 min_req_tx_blocks; | |
1188 | ||
1189 | /* | |
1190 | * Minimum required free rx memory blocks in order to assure optimum | |
25985edc | 1191 | * performance |
c8bde243 EP |
1192 | * |
1193 | * Range: 0-120 | |
1194 | */ | |
1195 | u8 min_req_rx_blocks; | |
1196 | ||
1197 | /* | |
1198 | * Minimum number of mem blocks (free+used) guaranteed for TX | |
1199 | * | |
1200 | * Range: 0-120 | |
1201 | */ | |
1202 | u8 tx_min; | |
1203 | }; | |
1204 | ||
ff86843d SL |
1205 | struct conf_fm_coex { |
1206 | u8 enable; | |
1207 | u8 swallow_period; | |
1208 | u8 n_divider_fref_set_1; | |
1209 | u8 n_divider_fref_set_2; | |
1210 | u16 m_divider_fref_set_1; | |
1211 | u16 m_divider_fref_set_2; | |
1212 | u32 coex_pll_stabilization_time; | |
1213 | u16 ldo_stabilization_time; | |
1214 | u8 fm_disturbed_band_margin; | |
1215 | u8 swallow_clk_diff; | |
1216 | }; | |
1217 | ||
f84673d5 EP |
1218 | struct conf_rx_streaming_settings { |
1219 | /* | |
1220 | * RX Streaming duration (in msec) from last tx/rx | |
1221 | * | |
1222 | * Range: u32 | |
1223 | */ | |
1224 | u32 duration; | |
1225 | ||
1226 | /* | |
1227 | * Bitmap of tids to be polled during RX streaming. | |
1228 | * (Note: it doesn't look like it really matters) | |
1229 | * | |
1230 | * Range: 0x1-0xff | |
1231 | */ | |
1232 | u8 queues; | |
1233 | ||
1234 | /* | |
1235 | * RX Streaming interval. | |
1236 | * (Note:this value is also used as the rx streaming timeout) | |
1237 | * Range: 0 (disabled), 10 - 100 | |
1238 | */ | |
1239 | u8 interval; | |
77ddaa10 EP |
1240 | |
1241 | /* | |
1242 | * enable rx streaming also when there is no coex activity | |
1243 | */ | |
1244 | u8 always; | |
f84673d5 EP |
1245 | }; |
1246 | ||
95dac04f IY |
1247 | struct conf_fwlog { |
1248 | /* Continuous or on-demand */ | |
1249 | u8 mode; | |
1250 | ||
1251 | /* | |
1252 | * Number of memory blocks dedicated for the FW logger | |
1253 | * | |
1254 | * Range: 1-3, or 0 to disable the FW logger | |
1255 | */ | |
1256 | u8 mem_blocks; | |
1257 | ||
1258 | /* Minimum log level threshold */ | |
1259 | u8 severity; | |
1260 | ||
1261 | /* Include/exclude timestamps from the log messages */ | |
1262 | u8 timestamp; | |
1263 | ||
1264 | /* See enum wl1271_fwlogger_output */ | |
1265 | u8 output; | |
1266 | ||
1267 | /* Regulates the frequency of log messages */ | |
1268 | u8 threshold; | |
1269 | }; | |
1270 | ||
fa6ad9f0 EP |
1271 | #define ACX_RATE_MGMT_NUM_OF_RATES 13 |
1272 | struct conf_rate_policy_settings { | |
1273 | u16 rate_retry_score; | |
1274 | u16 per_add; | |
1275 | u16 per_th1; | |
1276 | u16 per_th2; | |
1277 | u16 max_per; | |
1278 | u8 inverse_curiosity_factor; | |
1279 | u8 tx_fail_low_th; | |
1280 | u8 tx_fail_high_th; | |
1281 | u8 per_alpha_shift; | |
1282 | u8 per_add_shift; | |
1283 | u8 per_beta1_shift; | |
1284 | u8 per_beta2_shift; | |
1285 | u8 rate_check_up; | |
1286 | u8 rate_check_down; | |
1287 | u8 rate_retry_policy[ACX_RATE_MGMT_NUM_OF_RATES]; | |
1288 | }; | |
1289 | ||
9487775c EP |
1290 | struct conf_hangover_settings { |
1291 | u32 recover_time; | |
1292 | u8 hangover_period; | |
1293 | u8 dynamic_mode; | |
1294 | u8 early_termination_mode; | |
1295 | u8 max_period; | |
1296 | u8 min_period; | |
1297 | u8 increase_delta; | |
1298 | u8 decrease_delta; | |
1299 | u8 quiet_time; | |
1300 | u8 increase_time; | |
1301 | u8 window_size; | |
1302 | }; | |
1303 | ||
2b60100b JO |
1304 | struct conf_drv_settings { |
1305 | struct conf_sg_settings sg; | |
8793f9bb | 1306 | struct conf_rx_settings rx; |
45b531a8 | 1307 | struct conf_tx_settings tx; |
51f2be24 | 1308 | struct conf_conn_settings conn; |
6e92b416 | 1309 | struct conf_itrim_settings itrim; |
38ad2d87 | 1310 | struct conf_pm_config_settings pm_config; |
00236aed | 1311 | struct conf_roam_trigger_settings roam_trigger; |
bea39d6a | 1312 | struct conf_scan_settings scan; |
3a9d60e5 | 1313 | struct conf_sched_scan_settings sched_scan; |
644a4860 | 1314 | struct conf_rf_settings rf; |
4b7fac77 | 1315 | struct conf_ht_setting ht; |
13b107dd SL |
1316 | struct conf_memory_settings mem_wl127x; |
1317 | struct conf_memory_settings mem_wl128x; | |
ff86843d | 1318 | struct conf_fm_coex fm_coex; |
f84673d5 | 1319 | struct conf_rx_streaming_settings rx_streaming; |
95dac04f | 1320 | struct conf_fwlog fwlog; |
fa6ad9f0 | 1321 | struct conf_rate_policy_settings rate; |
9487775c | 1322 | struct conf_hangover_settings hangover; |
afb7d3cd | 1323 | u8 hci_io_ds; |
2b60100b JO |
1324 | }; |
1325 | ||
1326 | #endif |