]> bbs.cooldavid.org Git - net-next-2.6.git/blame - drivers/net/wireless/wl12xx/wl1271_conf.h
Merge branch 'master' of git://dev.medozas.de/linux
[net-next-2.6.git] / drivers / net / wireless / wl12xx / wl1271_conf.h
CommitLineData
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
24#ifndef __WL1271_CONF_H__
25#define __WL1271_CONF_H__
26
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
f876bb9a
JO
68enum {
69 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
1b00f546
JO
94enum {
95 CONF_SG_DISABLE = 0,
96 CONF_SG_PROTECTIVE,
97 CONF_SG_OPPORTUNISTIC
98};
99
100enum {
2b60100b 101 /*
1b00f546 102 * PER threshold in PPM of the BT voice
2b60100b 103 *
1b00f546
JO
104 * Range: 0 - 10000000
105 */
106 CONF_SG_BT_PER_THRESHOLD = 0,
2b60100b 107
1b00f546
JO
108 /*
109 * Number of consequent RX_ACTIVE activities to override BT voice
110 * frames to ensure WLAN connection
111 *
112 * Range: 0 - 100
2b60100b 113 */
1b00f546 114 CONF_SG_HV3_MAX_OVERRIDE,
2b60100b
JO
115
116 /*
1b00f546
JO
117 * Defines the PER threshold of the BT voice
118 *
119 * Range: 0 - 65000
2b60100b 120 */
1b00f546 121 CONF_SG_BT_NFS_SAMPLE_INTERVAL,
2b60100b 122
1b00f546
JO
123 /*
124 * Defines the load ratio of BT
2b60100b 125 *
1b00f546 126 * Range: 0 - 100 (%)
2b60100b 127 */
1b00f546 128 CONF_SG_BT_LOAD_RATIO,
2b60100b
JO
129
130 /*
1b00f546 131 * Defines whether the SG will force WLAN host to enter/exit PSM
2b60100b 132 *
1b00f546 133 * Range: 1 - SG can force, 0 - host handles PSM
2b60100b 134 */
1b00f546 135 CONF_SG_AUTO_PS_MODE,
2b60100b
JO
136
137 /*
1b00f546
JO
138 * Compensation percentage of probe requests when scan initiated
139 * during BT voice/ACL link.
2b60100b 140 *
1b00f546
JO
141 * Range: 0 - 255 (%)
142 */
143 CONF_SG_AUTO_SCAN_PROBE_REQ,
144
145 /*
146 * Compensation percentage of probe requests when active scan initiated
147 * during BT voice
148 *
149 * Range: 0 - 255 (%)
150 */
151 CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3,
152
153 /*
154 * Defines antenna configuration (single/dual antenna)
155 *
156 * Range: 0 - single antenna, 1 - dual antenna
157 */
158 CONF_SG_ANTENNA_CONFIGURATION,
159
160 /*
161 * The threshold (percent) of max consequtive beacon misses before
162 * increasing priority of beacon reception.
163 *
164 * Range: 0 - 100 (%)
165 */
166 CONF_SG_BEACON_MISS_PERCENT,
167
168 /*
169 * The rate threshold below which receiving a data frame from the AP
170 * will increase the priority of the data frame above BT traffic.
171 *
172 * Range: 0,2, 5(=5.5), 6, 9, 11, 12, 18, 24, 36, 48, 54
173 */
174 CONF_SG_RATE_ADAPT_THRESH,
175
176 /*
177 * Not used currently.
2b60100b 178 *
1b00f546 179 * Range: 0
2b60100b 180 */
1b00f546 181 CONF_SG_RATE_ADAPT_SNR,
2b60100b
JO
182
183 /*
1b00f546
JO
184 * Configure the min and max time BT gains the antenna
185 * in WLAN PSM / BT master basic rate
2b60100b 186 *
1b00f546 187 * Range: 0 - 255 (ms)
2b60100b 188 */
1b00f546
JO
189 CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_BR,
190 CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_BR,
2b60100b
JO
191
192 /*
1b00f546
JO
193 * The time after it expires no new WLAN trigger frame is trasmitted
194 * in WLAN PSM / BT master basic rate
2b60100b 195 *
1b00f546 196 * Range: 0 - 255 (ms)
2b60100b 197 */
1b00f546 198 CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_BR,
2b60100b
JO
199
200 /*
1b00f546
JO
201 * Configure the min and max time BT gains the antenna
202 * in WLAN PSM / BT slave basic rate
2b60100b 203 *
1b00f546 204 * Range: 0 - 255 (ms)
2b60100b 205 */
1b00f546
JO
206 CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_BR,
207 CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_BR,
2b60100b
JO
208
209 /*
1b00f546
JO
210 * The time after it expires no new WLAN trigger frame is trasmitted
211 * in WLAN PSM / BT slave basic rate
2b60100b 212 *
1b00f546 213 * Range: 0 - 255 (ms)
2b60100b 214 */
1b00f546 215 CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_BR,
2b60100b
JO
216
217 /*
1b00f546
JO
218 * Configure the min and max time BT gains the antenna
219 * in WLAN PSM / BT master EDR
2b60100b 220 *
1b00f546 221 * Range: 0 - 255 (ms)
2b60100b 222 */
1b00f546
JO
223 CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_EDR,
224 CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_EDR,
2b60100b
JO
225
226 /*
1b00f546
JO
227 * The time after it expires no new WLAN trigger frame is trasmitted
228 * in WLAN PSM / BT master EDR
2b60100b 229 *
1b00f546 230 * Range: 0 - 255 (ms)
2b60100b 231 */
1b00f546
JO
232 CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_EDR,
233
234 /*
235 * Configure the min and max time BT gains the antenna
236 * in WLAN PSM / BT slave EDR
237 *
238 * Range: 0 - 255 (ms)
239 */
240 CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_EDR,
241 CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_EDR,
242
243 /*
244 * The time after it expires no new WLAN trigger frame is trasmitted
245 * in WLAN PSM / BT slave EDR
246 *
247 * Range: 0 - 255 (ms)
248 */
249 CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_EDR,
250
251 /*
252 * RX guard time before the beginning of a new BT voice frame during
253 * which no new WLAN trigger frame is transmitted.
254 *
255 * Range: 0 - 100000 (us)
256 */
257 CONF_SG_RXT,
258
259 /*
260 * TX guard time before the beginning of a new BT voice frame during
261 * which no new WLAN frame is transmitted.
262 *
263 * Range: 0 - 100000 (us)
264 */
265
266 CONF_SG_TXT,
267
268 /*
269 * Enable adaptive RXT/TXT algorithm. If disabled, the host values
270 * will be utilized.
271 *
272 * Range: 0 - disable, 1 - enable
273 */
274 CONF_SG_ADAPTIVE_RXT_TXT,
275
276 /*
277 * The used WLAN legacy service period during active BT ACL link
278 *
279 * Range: 0 - 255 (ms)
280 */
281 CONF_SG_PS_POLL_TIMEOUT,
282
283 /*
284 * The used WLAN UPSD service period during active BT ACL link
285 *
286 * Range: 0 - 255 (ms)
287 */
288 CONF_SG_UPSD_TIMEOUT,
289
290 /*
291 * Configure the min and max time BT gains the antenna
292 * in WLAN Active / BT master EDR
293 *
294 * Range: 0 - 255 (ms)
295 */
296 CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR,
297 CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR,
298
299 /*
300 * The maximum time WLAN can gain the antenna for
301 * in WLAN Active / BT master EDR
302 *
303 * Range: 0 - 255 (ms)
304 */
305 CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR,
306
307 /*
308 * Configure the min and max time BT gains the antenna
309 * in WLAN Active / BT slave EDR
310 *
311 * Range: 0 - 255 (ms)
312 */
313 CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR,
314 CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR,
315
316 /*
317 * The maximum time WLAN can gain the antenna for
318 * in WLAN Active / BT slave EDR
319 *
320 * Range: 0 - 255 (ms)
321 */
322 CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR,
323
324 /*
325 * Configure the min and max time BT gains the antenna
326 * in WLAN Active / BT basic rate
327 *
328 * Range: 0 - 255 (ms)
329 */
330 CONF_SG_WLAN_ACTIVE_BT_ACL_MIN_BR,
331 CONF_SG_WLAN_ACTIVE_BT_ACL_MAX_BR,
332
333 /*
334 * The maximum time WLAN can gain the antenna for
335 * in WLAN Active / BT basic rate
336 *
337 * Range: 0 - 255 (ms)
338 */
339 CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_BR,
340
341 /*
342 * Compensation percentage of WLAN passive scan window if initiated
343 * during BT voice
344 *
345 * Range: 0 - 1000 (%)
346 */
347 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3,
348
349 /*
350 * Compensation percentage of WLAN passive scan window if initiated
351 * during BT A2DP
352 *
353 * Range: 0 - 1000 (%)
354 */
355 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP,
356
357 /*
358 * Fixed time ensured for BT traffic to gain the antenna during WLAN
359 * passive scan.
360 *
361 * Range: 0 - 1000 ms
362 */
363 CONF_SG_PASSIVE_SCAN_A2DP_BT_TIME,
364
365 /*
366 * Fixed time ensured for WLAN traffic to gain the antenna during WLAN
367 * passive scan.
368 *
369 * Range: 0 - 1000 ms
370 */
371 CONF_SG_PASSIVE_SCAN_A2DP_WLAN_TIME,
372
373 /*
374 * Number of consequent BT voice frames not interrupted by WLAN
375 *
376 * Range: 0 - 100
377 */
378 CONF_SG_HV3_MAX_SERVED,
379
380 /*
381 * Protection time of the DHCP procedure.
382 *
383 * Range: 0 - 100000 (ms)
384 */
385 CONF_SG_DHCP_TIME,
386
387 /*
388 * Compensation percentage of WLAN active scan window if initiated
389 * during BT A2DP
390 *
391 * Range: 0 - 1000 (%)
392 */
393 CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP,
394 CONF_SG_TEMP_PARAM_1,
395 CONF_SG_TEMP_PARAM_2,
396 CONF_SG_TEMP_PARAM_3,
397 CONF_SG_TEMP_PARAM_4,
398 CONF_SG_TEMP_PARAM_5,
399 CONF_SG_PARAMS_MAX,
400 CONF_SG_PARAMS_ALL = 0xff
401};
402
403struct conf_sg_settings {
23a7a51c 404 u32 params[CONF_SG_PARAMS_MAX];
1b00f546 405 u8 state;
2b60100b
JO
406};
407
8793f9bb
JO
408enum conf_rx_queue_type {
409 CONF_RX_QUEUE_TYPE_LOW_PRIORITY, /* All except the high priority */
410 CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */
411};
412
413struct conf_rx_settings {
414 /*
415 * The maximum amount of time, in TU, before the
416 * firmware discards the MSDU.
417 *
418 * Range: 0 - 0xFFFFFFFF
419 */
420 u32 rx_msdu_life_time;
421
422 /*
423 * Packet detection threshold in the PHY.
424 *
425 * FIXME: details unknown.
426 */
427 u32 packet_detection_threshold;
428
429 /*
430 * The longest time the STA will wait to receive traffic from the AP
431 * after a PS-poll has been transmitted.
432 *
433 * Range: 0 - 200000
434 */
435 u16 ps_poll_timeout;
436 /*
437 * The longest time the STA will wait to receive traffic from the AP
438 * after a frame has been sent from an UPSD enabled queue.
439 *
440 * Range: 0 - 200000
441 */
442 u16 upsd_timeout;
443
444 /*
445 * The number of octets in an MPDU, below which an RTS/CTS
446 * handshake is not performed.
447 *
448 * Range: 0 - 4096
449 */
450 u16 rts_threshold;
451
452 /*
453 * The RX Clear Channel Assessment threshold in the PHY
454 * (the energy threshold).
455 *
456 * Range: ENABLE_ENERGY_D == 0x140A
457 * DISABLE_ENERGY_D == 0xFFEF
458 */
459 u16 rx_cca_threshold;
460
461 /*
462 * Occupied Rx mem-blocks number which requires interrupting the host
463 * (0 = no buffering, 0xffff = disabled).
464 *
465 * Range: u16
466 */
467 u16 irq_blk_threshold;
468
469 /*
470 * Rx packets number which requires interrupting the host
471 * (0 = no buffering).
472 *
473 * Range: u16
474 */
475 u16 irq_pkt_threshold;
476
477 /*
478 * Max time in msec the FW may delay RX-Complete interrupt.
479 *
480 * Range: 1 - 100
481 */
482 u16 irq_timeout;
483
484 /*
485 * The RX queue type.
486 *
487 * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY,
488 */
489 u8 queue_type;
490};
491
45b531a8
JO
492#define CONF_TX_MAX_RATE_CLASSES 8
493
494#define CONF_TX_RATE_MASK_UNSPECIFIED 0
a6fe2313
JO
495#define CONF_TX_RATE_MASK_BASIC (CONF_HW_BIT_RATE_1MBPS | \
496 CONF_HW_BIT_RATE_2MBPS)
45b531a8
JO
497#define CONF_TX_RATE_RETRY_LIMIT 10
498
499struct conf_tx_rate_class {
500
501 /*
502 * The rates enabled for this rate class.
503 *
504 * Range: CONF_HW_BIT_RATE_* bit mask
505 */
506 u32 enabled_rates;
507
508 /*
509 * The dot11 short retry limit used for TX retries.
510 *
511 * Range: u8
512 */
513 u8 short_retry_limit;
514
515 /*
516 * The dot11 long retry limit used for TX retries.
517 *
518 * Range: u8
519 */
520 u8 long_retry_limit;
521
522 /*
523 * Flags controlling the attributes of TX transmission.
524 *
525 * Range: bit 0: Truncate - when set, FW attempts to send a frame stop
526 * when the total valid per-rate attempts have
527 * been exhausted; otherwise transmissions
528 * will continue at the lowest available rate
529 * until the appropriate one of the
530 * short_retry_limit, long_retry_limit,
531 * dot11_max_transmit_msdu_life_time, or
532 * max_tx_life_time, is exhausted.
533 * 1: Preamble Override - indicates if the preamble type
534 * should be used in TX.
535 * 2: Preamble Type - the type of the preamble to be used by
536 * the policy (0 - long preamble, 1 - short preamble.
537 */
538 u8 aflags;
539};
540
541#define CONF_TX_MAX_AC_COUNT 4
542
543/* Slot number setting to start transmission at PIFS interval */
544#define CONF_TX_AIFS_PIFS 1
545/* Slot number setting to start transmission at DIFS interval normal
546 * DCF access */
547#define CONF_TX_AIFS_DIFS 2
548
549
550enum conf_tx_ac {
551 CONF_TX_AC_BE = 0, /* best effort / legacy */
552 CONF_TX_AC_BK = 1, /* background */
553 CONF_TX_AC_VI = 2, /* video */
554 CONF_TX_AC_VO = 3, /* voice */
555 CONF_TX_AC_CTS2SELF = 4, /* fictious AC, follows AC_VO */
556 CONF_TX_AC_ANY_TID = 0x1f
557};
558
559struct conf_tx_ac_category {
560 /*
561 * The AC class identifier.
562 *
563 * Range: enum conf_tx_ac
564 */
565 u8 ac;
566
567 /*
568 * The contention window minimum size (in slots) for the access
569 * class.
570 *
571 * Range: u8
572 */
573 u8 cw_min;
574
575 /*
576 * The contention window maximum size (in slots) for the access
577 * class.
578 *
579 * Range: u8
580 */
581 u16 cw_max;
582
583 /*
584 * The AIF value (in slots) for the access class.
585 *
586 * Range: u8
587 */
588 u8 aifsn;
589
590 /*
591 * The TX Op Limit (in microseconds) for the access class.
592 *
593 * Range: u16
594 */
595 u16 tx_op_limit;
596};
597
598#define CONF_TX_MAX_TID_COUNT 7
599
600enum {
601 CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/
602 CONF_CHANNEL_TYPE_EDCF = 1, /* EDCA*/
603 CONF_CHANNEL_TYPE_HCCA = 2, /* HCCA*/
604};
605
606enum {
607 CONF_PS_SCHEME_LEGACY = 0,
608 CONF_PS_SCHEME_UPSD_TRIGGER = 1,
609 CONF_PS_SCHEME_LEGACY_PSPOLL = 2,
610 CONF_PS_SCHEME_SAPSD = 3,
611};
612
613enum {
614 CONF_ACK_POLICY_LEGACY = 0,
615 CONF_ACK_POLICY_NO_ACK = 1,
616 CONF_ACK_POLICY_BLOCK = 2,
617};
618
619
620struct conf_tx_tid {
621 u8 queue_id;
622 u8 channel_type;
623 u8 tsid;
624 u8 ps_scheme;
625 u8 ack_policy;
626 u32 apsd_conf[2];
627};
628
629struct conf_tx_settings {
630 /*
631 * The TX ED value for TELEC Enable/Disable.
632 *
633 * Range: 0, 1
634 */
635 u8 tx_energy_detection;
636
637 /*
638 * Configuration for rate classes for TX (currently only one
639 * rate class supported.)
640 */
641 struct conf_tx_rate_class rc_conf;
642
643 /*
644 * Configuration for access categories for TX rate control.
645 */
646 u8 ac_conf_count;
647 struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT];
648
649 /*
650 * Configuration for TID parameters.
651 */
652 u8 tid_conf_count;
653 struct conf_tx_tid tid_conf[CONF_TX_MAX_TID_COUNT];
654
655 /*
656 * The TX fragmentation threshold.
657 *
658 * Range: u16
659 */
660 u16 frag_threshold;
661
662 /*
663 * Max time in msec the FW may delay frame TX-Complete interrupt.
664 *
665 * Range: u16
666 */
667 u16 tx_compl_timeout;
668
669 /*
670 * Completed TX packet count which requires to issue the TX-Complete
671 * interrupt.
672 *
673 * Range: u16
674 */
675 u16 tx_compl_threshold;
676
ebba60c6
JO
677 /*
678 * The rate used for control messages and scanning on the 2.4GHz band
679 *
680 * Range: CONF_HW_BIT_RATE_* bit mask
681 */
682 u32 basic_rate;
683
684 /*
685 * The rate used for control messages and scanning on the 5GHz band
686 *
687 * Range: CONF_HW_BIT_RATE_* bit mask
688 */
689 u32 basic_rate_5;
45b531a8
JO
690};
691
51f2be24
JO
692enum {
693 CONF_WAKE_UP_EVENT_BEACON = 0x01, /* Wake on every Beacon*/
694 CONF_WAKE_UP_EVENT_DTIM = 0x02, /* Wake on every DTIM*/
695 CONF_WAKE_UP_EVENT_N_DTIM = 0x04, /* Wake every Nth DTIM */
696 CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */
697 CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F
698};
699
700#define CONF_MAX_BCN_FILT_IE_COUNT 32
701
702#define CONF_BCN_RULE_PASS_ON_CHANGE BIT(0)
703#define CONF_BCN_RULE_PASS_ON_APPEARANCE BIT(1)
704
705#define CONF_BCN_IE_OUI_LEN 3
706#define CONF_BCN_IE_VER_LEN 2
707
708struct conf_bcn_filt_rule {
709 /*
710 * IE number to which to associate a rule.
711 *
712 * Range: u8
713 */
714 u8 ie;
715
716 /*
717 * Rule to associate with the specific ie.
718 *
719 * Range: CONF_BCN_RULE_PASS_ON_*
720 */
721 u8 rule;
722
723 /*
724 * OUI for the vendor specifie IE (221)
725 */
726 u8 oui[CONF_BCN_IE_OUI_LEN];
727
728 /*
729 * Type for the vendor specifie IE (221)
730 */
731 u8 type;
732
733 /*
734 * Version for the vendor specifie IE (221)
735 */
736 u8 version[CONF_BCN_IE_VER_LEN];
737};
738
739#define CONF_MAX_RSSI_SNR_TRIGGERS 8
740
741enum {
742 CONF_TRIG_METRIC_RSSI_BEACON = 0,
743 CONF_TRIG_METRIC_RSSI_DATA,
744 CONF_TRIG_METRIC_SNR_BEACON,
745 CONF_TRIG_METRIC_SNR_DATA
746};
747
748enum {
749 CONF_TRIG_EVENT_TYPE_LEVEL = 0,
750 CONF_TRIG_EVENT_TYPE_EDGE
751};
752
753enum {
754 CONF_TRIG_EVENT_DIR_LOW = 0,
755 CONF_TRIG_EVENT_DIR_HIGH,
756 CONF_TRIG_EVENT_DIR_BIDIR
757};
758
51f2be24
JO
759struct conf_sig_weights {
760
761 /*
762 * RSSI from beacons average weight.
763 *
764 * Range: u8
765 */
766 u8 rssi_bcn_avg_weight;
767
768 /*
769 * RSSI from data average weight.
770 *
771 * Range: u8
772 */
773 u8 rssi_pkt_avg_weight;
774
775 /*
776 * SNR from beacons average weight.
777 *
778 * Range: u8
779 */
780 u8 snr_bcn_avg_weight;
781
782 /*
783 * SNR from data average weight.
784 *
785 * Range: u8
786 */
787 u8 snr_pkt_avg_weight;
788};
789
790enum conf_bcn_filt_mode {
791 CONF_BCN_FILT_MODE_DISABLED = 0,
792 CONF_BCN_FILT_MODE_ENABLED = 1
793};
794
11f70f97
JO
795enum conf_bet_mode {
796 CONF_BET_MODE_DISABLE = 0,
797 CONF_BET_MODE_ENABLE = 1,
798};
799
51f2be24
JO
800struct conf_conn_settings {
801 /*
802 * Firmware wakeup conditions configuration. The host may set only
803 * one bit.
804 *
805 * Range: CONF_WAKE_UP_EVENT_*
806 */
807 u8 wake_up_event;
808
809 /*
810 * Listen interval for beacons or Dtims.
811 *
812 * Range: 0 for beacon and Dtim wakeup
813 * 1-10 for x Dtims
814 * 1-255 for x beacons
815 */
816 u8 listen_interval;
817
818 /*
819 * Enable or disable the beacon filtering.
820 *
821 * Range: CONF_BCN_FILT_MODE_*
822 */
823 enum conf_bcn_filt_mode bcn_filt_mode;
824
825 /*
826 * Configure Beacon filter pass-thru rules.
827 */
828 u8 bcn_filt_ie_count;
829 struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT];
830
831 /*
832 * The number of consequtive beacons to lose, before the firmware
833 * becomes out of synch.
834 *
835 * Range: u32
836 */
837 u32 synch_fail_thold;
838
839 /*
840 * After out-of-synch, the number of TU's to wait without a further
841 * received beacon (or probe response) before issuing the BSS_EVENT_LOSE
842 * event.
843 *
844 * Range: u32
845 */
846 u32 bss_lose_timeout;
847
848 /*
849 * Beacon receive timeout.
850 *
851 * Range: u32
852 */
853 u32 beacon_rx_timeout;
854
855 /*
856 * Broadcast receive timeout.
857 *
858 * Range: u32
859 */
860 u32 broadcast_timeout;
861
862 /*
863 * Enable/disable reception of broadcast packets in power save mode
864 *
865 * Range: 1 - enable, 0 - disable
866 */
867 u8 rx_broadcast_in_ps;
868
869 /*
870 * Consequtive PS Poll failures before sending event to driver
871 *
872 * Range: u8
873 */
874 u8 ps_poll_threshold;
875
51f2be24
JO
876 /*
877 * Configuration of signal average weights.
878 */
879 struct conf_sig_weights sig_weights;
11f70f97
JO
880
881 /*
882 * Specifies if beacon early termination procedure is enabled or
883 * disabled.
884 *
885 * Range: CONF_BET_MODE_*
886 */
887 u8 bet_enable;
888
889 /*
890 * Specifies the maximum number of consecutive beacons that may be
891 * early terminated. After this number is reached at least one full
892 * beacon must be correctly received in FW before beacon ET
893 * resumes.
894 *
895 * Range 0 - 255
896 */
897 u8 bet_max_consecutive;
19ad0715
JO
898
899 /*
900 * Specifies the maximum number of times to try PSM entry if it fails
901 * (if sending the appropriate null-func message fails.)
902 *
903 * Range 0 - 255
904 */
905 u8 psm_entry_retries;
c1899554
JO
906
907 /*
908 *
909 * Specifies the interval of the connection keep-alive null-func
910 * frame in ms.
911 *
912 * Range: 1000 - 3600000
913 */
914 u32 keep_alive_interval;
50c500ad
JO
915
916 /*
917 * Maximum listen interval supported by the driver in units of beacons.
918 *
919 * Range: u16
920 */
921 u8 max_listen_interval;
51f2be24
JO
922};
923
47fab7d5
JO
924enum {
925 CONF_REF_CLK_19_2_E,
926 CONF_REF_CLK_26_E,
927 CONF_REF_CLK_38_4_E,
928 CONF_REF_CLK_52_E
929};
930
1ebec3d7
TP
931enum single_dual_band_enum {
932 CONF_SINGLE_BAND,
933 CONF_DUAL_BAND
934};
935
47fab7d5
JO
936#define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15
937#define CONF_NUMBER_OF_SUB_BANDS_5 7
938#define CONF_NUMBER_OF_RATE_GROUPS 6
939#define CONF_NUMBER_OF_CHANNELS_2_4 14
940#define CONF_NUMBER_OF_CHANNELS_5 35
941
942struct conf_radio_parms {
943 /*
152ee6e0 944 * FEM parameter set to use
47fab7d5 945 *
152ee6e0 946 * Range: 0 or 1
47fab7d5 947 */
152ee6e0 948 u8 fem;
47fab7d5
JO
949};
950
47fab7d5 951struct conf_init_settings {
47fab7d5
JO
952 /*
953 * Configure radio parameters.
954 */
955 struct conf_radio_parms radioparam;
956
957};
958
6e92b416
LC
959struct conf_itrim_settings {
960 /* enable dco itrim */
961 u8 enable;
962
963 /* moderation timeout in microsecs from the last TX */
964 u32 timeout;
965};
966
38ad2d87
JO
967struct conf_pm_config_settings {
968 /*
969 * Host clock settling time
970 *
971 * Range: 0 - 30000 us
972 */
973 u32 host_clk_settling_time;
974
975 /*
976 * Host fast wakeup support
977 *
978 * Range: true, false
979 */
980 bool host_fast_wakeup_support;
981};
982
00236aed
JO
983struct conf_roam_trigger_settings {
984 /*
985 * The minimum interval between two trigger events.
986 *
987 * Range: 0 - 60000 ms
988 */
989 u16 trigger_pacing;
990
991 /*
992 * The weight for rssi/beacon average calculation
993 *
994 * Range: 0 - 255
995 */
996 u8 avg_weight_rssi_beacon;
997
998 /*
999 * The weight for rssi/data frame average calculation
1000 *
1001 * Range: 0 - 255
1002 */
1003 u8 avg_weight_rssi_data;
1004
1005 /*
1006 * The weight for snr/beacon average calculation
1007 *
1008 * Range: 0 - 255
1009 */
1010 u8 avg_weight_snr_beacon;
1011
1012 /*
1013 * The weight for snr/data frame average calculation
1014 *
1015 * Range: 0 - 255
1016 */
1017 u8 avg_weight_snr_data;
1018};
1019
2b60100b
JO
1020struct conf_drv_settings {
1021 struct conf_sg_settings sg;
8793f9bb 1022 struct conf_rx_settings rx;
45b531a8 1023 struct conf_tx_settings tx;
51f2be24 1024 struct conf_conn_settings conn;
47fab7d5 1025 struct conf_init_settings init;
6e92b416 1026 struct conf_itrim_settings itrim;
38ad2d87 1027 struct conf_pm_config_settings pm_config;
00236aed 1028 struct conf_roam_trigger_settings roam_trigger;
2b60100b
JO
1029};
1030
1031#endif