Loading...
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 __CONF_H__
25#define __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 CONF_HW_BIT_RATE_MCS_8 = BIT(21),
50 CONF_HW_BIT_RATE_MCS_9 = BIT(22),
51 CONF_HW_BIT_RATE_MCS_10 = BIT(23),
52 CONF_HW_BIT_RATE_MCS_11 = BIT(24),
53 CONF_HW_BIT_RATE_MCS_12 = BIT(25),
54 CONF_HW_BIT_RATE_MCS_13 = BIT(26),
55 CONF_HW_BIT_RATE_MCS_14 = BIT(27),
56 CONF_HW_BIT_RATE_MCS_15 = BIT(28),
57};
58
59enum {
60 CONF_HW_RATE_INDEX_1MBPS = 0,
61 CONF_HW_RATE_INDEX_2MBPS = 1,
62 CONF_HW_RATE_INDEX_5_5MBPS = 2,
63 CONF_HW_RATE_INDEX_11MBPS = 3,
64 CONF_HW_RATE_INDEX_6MBPS = 4,
65 CONF_HW_RATE_INDEX_9MBPS = 5,
66 CONF_HW_RATE_INDEX_12MBPS = 6,
67 CONF_HW_RATE_INDEX_18MBPS = 7,
68 CONF_HW_RATE_INDEX_24MBPS = 8,
69 CONF_HW_RATE_INDEX_36MBPS = 9,
70 CONF_HW_RATE_INDEX_48MBPS = 10,
71 CONF_HW_RATE_INDEX_54MBPS = 11,
72 CONF_HW_RATE_INDEX_MCS0 = 12,
73 CONF_HW_RATE_INDEX_MCS1 = 13,
74 CONF_HW_RATE_INDEX_MCS2 = 14,
75 CONF_HW_RATE_INDEX_MCS3 = 15,
76 CONF_HW_RATE_INDEX_MCS4 = 16,
77 CONF_HW_RATE_INDEX_MCS5 = 17,
78 CONF_HW_RATE_INDEX_MCS6 = 18,
79 CONF_HW_RATE_INDEX_MCS7 = 19,
80 CONF_HW_RATE_INDEX_MCS7_SGI = 20,
81 CONF_HW_RATE_INDEX_MCS0_40MHZ = 21,
82 CONF_HW_RATE_INDEX_MCS1_40MHZ = 22,
83 CONF_HW_RATE_INDEX_MCS2_40MHZ = 23,
84 CONF_HW_RATE_INDEX_MCS3_40MHZ = 24,
85 CONF_HW_RATE_INDEX_MCS4_40MHZ = 25,
86 CONF_HW_RATE_INDEX_MCS5_40MHZ = 26,
87 CONF_HW_RATE_INDEX_MCS6_40MHZ = 27,
88 CONF_HW_RATE_INDEX_MCS7_40MHZ = 28,
89 CONF_HW_RATE_INDEX_MCS7_40MHZ_SGI = 29,
90
91 /* MCS8+ rates overlap with 40Mhz rates */
92 CONF_HW_RATE_INDEX_MCS8 = 21,
93 CONF_HW_RATE_INDEX_MCS9 = 22,
94 CONF_HW_RATE_INDEX_MCS10 = 23,
95 CONF_HW_RATE_INDEX_MCS11 = 24,
96 CONF_HW_RATE_INDEX_MCS12 = 25,
97 CONF_HW_RATE_INDEX_MCS13 = 26,
98 CONF_HW_RATE_INDEX_MCS14 = 27,
99 CONF_HW_RATE_INDEX_MCS15 = 28,
100 CONF_HW_RATE_INDEX_MCS15_SGI = 29,
101
102 CONF_HW_RATE_INDEX_MAX = CONF_HW_RATE_INDEX_MCS7_40MHZ_SGI,
103};
104
105#define CONF_HW_RXTX_RATE_UNSUPPORTED 0xff
106
107enum {
108 CONF_SG_DISABLE = 0,
109 CONF_SG_PROTECTIVE,
110 CONF_SG_OPPORTUNISTIC
111};
112
113#define WLCORE_CONF_SG_PARAMS_MAX 67
114#define WLCORE_CONF_SG_PARAMS_ALL 0xff
115
116struct conf_sg_settings {
117 u32 params[WLCORE_CONF_SG_PARAMS_MAX];
118 u8 state;
119} __packed;
120
121enum conf_rx_queue_type {
122 CONF_RX_QUEUE_TYPE_LOW_PRIORITY, /* All except the high priority */
123 CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */
124};
125
126struct conf_rx_settings {
127 /*
128 * The maximum amount of time, in TU, before the
129 * firmware discards the MSDU.
130 *
131 * Range: 0 - 0xFFFFFFFF
132 */
133 u32 rx_msdu_life_time;
134
135 /*
136 * Packet detection threshold in the PHY.
137 *
138 * FIXME: details unknown.
139 */
140 u32 packet_detection_threshold;
141
142 /*
143 * The longest time the STA will wait to receive traffic from the AP
144 * after a PS-poll has been transmitted.
145 *
146 * Range: 0 - 200000
147 */
148 u16 ps_poll_timeout;
149 /*
150 * The longest time the STA will wait to receive traffic from the AP
151 * after a frame has been sent from an UPSD enabled queue.
152 *
153 * Range: 0 - 200000
154 */
155 u16 upsd_timeout;
156
157 /*
158 * The number of octets in an MPDU, below which an RTS/CTS
159 * handshake is not performed.
160 *
161 * Range: 0 - 4096
162 */
163 u16 rts_threshold;
164
165 /*
166 * The RX Clear Channel Assessment threshold in the PHY
167 * (the energy threshold).
168 *
169 * Range: ENABLE_ENERGY_D == 0x140A
170 * DISABLE_ENERGY_D == 0xFFEF
171 */
172 u16 rx_cca_threshold;
173
174 /*
175 * Occupied Rx mem-blocks number which requires interrupting the host
176 * (0 = no buffering, 0xffff = disabled).
177 *
178 * Range: u16
179 */
180 u16 irq_blk_threshold;
181
182 /*
183 * Rx packets number which requires interrupting the host
184 * (0 = no buffering).
185 *
186 * Range: u16
187 */
188 u16 irq_pkt_threshold;
189
190 /*
191 * Max time in msec the FW may delay RX-Complete interrupt.
192 *
193 * Range: 1 - 100
194 */
195 u16 irq_timeout;
196
197 /*
198 * The RX queue type.
199 *
200 * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY,
201 */
202 u8 queue_type;
203} __packed;
204
205#define CONF_TX_MAX_RATE_CLASSES 10
206
207#define CONF_TX_RATE_MASK_UNSPECIFIED 0
208#define CONF_TX_RATE_MASK_BASIC (CONF_HW_BIT_RATE_1MBPS | \
209 CONF_HW_BIT_RATE_2MBPS)
210#define CONF_TX_RATE_RETRY_LIMIT 10
211
212/* basic rates for p2p operations (probe req/resp, etc.) */
213#define CONF_TX_RATE_MASK_BASIC_P2P CONF_HW_BIT_RATE_6MBPS
214
215/*
216 * Rates supported for data packets when operating as STA/AP. Note the absence
217 * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop
218 * one. The rate dropped is not mandatory under any operating mode.
219 */
220#define CONF_TX_ENABLED_RATES (CONF_HW_BIT_RATE_1MBPS | \
221 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
222 CONF_HW_BIT_RATE_6MBPS | CONF_HW_BIT_RATE_9MBPS | \
223 CONF_HW_BIT_RATE_11MBPS | CONF_HW_BIT_RATE_12MBPS | \
224 CONF_HW_BIT_RATE_18MBPS | CONF_HW_BIT_RATE_24MBPS | \
225 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
226 CONF_HW_BIT_RATE_54MBPS)
227
228#define CONF_TX_CCK_RATES (CONF_HW_BIT_RATE_1MBPS | \
229 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
230 CONF_HW_BIT_RATE_11MBPS)
231
232#define CONF_TX_OFDM_RATES (CONF_HW_BIT_RATE_6MBPS | \
233 CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS | \
234 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
235 CONF_HW_BIT_RATE_54MBPS)
236
237#define CONF_TX_MCS_RATES (CONF_HW_BIT_RATE_MCS_0 | \
238 CONF_HW_BIT_RATE_MCS_1 | CONF_HW_BIT_RATE_MCS_2 | \
239 CONF_HW_BIT_RATE_MCS_3 | CONF_HW_BIT_RATE_MCS_4 | \
240 CONF_HW_BIT_RATE_MCS_5 | CONF_HW_BIT_RATE_MCS_6 | \
241 CONF_HW_BIT_RATE_MCS_7)
242
243#define CONF_TX_MIMO_RATES (CONF_HW_BIT_RATE_MCS_8 | \
244 CONF_HW_BIT_RATE_MCS_9 | CONF_HW_BIT_RATE_MCS_10 | \
245 CONF_HW_BIT_RATE_MCS_11 | CONF_HW_BIT_RATE_MCS_12 | \
246 CONF_HW_BIT_RATE_MCS_13 | CONF_HW_BIT_RATE_MCS_14 | \
247 CONF_HW_BIT_RATE_MCS_15)
248
249/*
250 * Default rates for management traffic when operating in AP mode. This
251 * should be configured according to the basic rate set of the AP
252 */
253#define CONF_TX_AP_DEFAULT_MGMT_RATES (CONF_HW_BIT_RATE_1MBPS | \
254 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS)
255
256/* default rates for working as IBSS (11b and OFDM) */
257#define CONF_TX_IBSS_DEFAULT_RATES (CONF_HW_BIT_RATE_1MBPS | \
258 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
259 CONF_HW_BIT_RATE_11MBPS | CONF_TX_OFDM_RATES);
260
261struct conf_tx_rate_class {
262
263 /*
264 * The rates enabled for this rate class.
265 *
266 * Range: CONF_HW_BIT_RATE_* bit mask
267 */
268 u32 enabled_rates;
269
270 /*
271 * The dot11 short retry limit used for TX retries.
272 *
273 * Range: u8
274 */
275 u8 short_retry_limit;
276
277 /*
278 * The dot11 long retry limit used for TX retries.
279 *
280 * Range: u8
281 */
282 u8 long_retry_limit;
283
284 /*
285 * Flags controlling the attributes of TX transmission.
286 *
287 * Range: bit 0: Truncate - when set, FW attempts to send a frame stop
288 * when the total valid per-rate attempts have
289 * been exhausted; otherwise transmissions
290 * will continue at the lowest available rate
291 * until the appropriate one of the
292 * short_retry_limit, long_retry_limit,
293 * dot11_max_transmit_msdu_life_time, or
294 * max_tx_life_time, is exhausted.
295 * 1: Preamble Override - indicates if the preamble type
296 * should be used in TX.
297 * 2: Preamble Type - the type of the preamble to be used by
298 * the policy (0 - long preamble, 1 - short preamble.
299 */
300 u8 aflags;
301} __packed;
302
303#define CONF_TX_MAX_AC_COUNT 4
304
305/* Slot number setting to start transmission at PIFS interval */
306#define CONF_TX_AIFS_PIFS 1
307/* Slot number setting to start transmission at DIFS interval normal
308 * DCF access */
309#define CONF_TX_AIFS_DIFS 2
310
311
312enum conf_tx_ac {
313 CONF_TX_AC_BE = 0, /* best effort / legacy */
314 CONF_TX_AC_BK = 1, /* background */
315 CONF_TX_AC_VI = 2, /* video */
316 CONF_TX_AC_VO = 3, /* voice */
317 CONF_TX_AC_CTS2SELF = 4, /* fictitious AC, follows AC_VO */
318 CONF_TX_AC_ANY_TID = 0xff
319};
320
321struct conf_tx_ac_category {
322 /*
323 * The AC class identifier.
324 *
325 * Range: enum conf_tx_ac
326 */
327 u8 ac;
328
329 /*
330 * The contention window minimum size (in slots) for the access
331 * class.
332 *
333 * Range: u8
334 */
335 u8 cw_min;
336
337 /*
338 * The contention window maximum size (in slots) for the access
339 * class.
340 *
341 * Range: u8
342 */
343 u16 cw_max;
344
345 /*
346 * The AIF value (in slots) for the access class.
347 *
348 * Range: u8
349 */
350 u8 aifsn;
351
352 /*
353 * The TX Op Limit (in microseconds) for the access class.
354 *
355 * Range: u16
356 */
357 u16 tx_op_limit;
358} __packed;
359
360#define CONF_TX_MAX_TID_COUNT 8
361
362/* Allow TX BA on all TIDs but 6,7. These are currently reserved in the FW */
363#define CONF_TX_BA_ENABLED_TID_BITMAP 0x3F
364
365enum {
366 CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/
367 CONF_CHANNEL_TYPE_EDCF = 1, /* EDCA*/
368 CONF_CHANNEL_TYPE_HCCA = 2, /* HCCA*/
369};
370
371enum {
372 CONF_PS_SCHEME_LEGACY = 0,
373 CONF_PS_SCHEME_UPSD_TRIGGER = 1,
374 CONF_PS_SCHEME_LEGACY_PSPOLL = 2,
375 CONF_PS_SCHEME_SAPSD = 3,
376};
377
378enum {
379 CONF_ACK_POLICY_LEGACY = 0,
380 CONF_ACK_POLICY_NO_ACK = 1,
381 CONF_ACK_POLICY_BLOCK = 2,
382};
383
384
385struct conf_tx_tid {
386 u8 queue_id;
387 u8 channel_type;
388 u8 tsid;
389 u8 ps_scheme;
390 u8 ack_policy;
391 u32 apsd_conf[2];
392} __packed;
393
394struct conf_tx_settings {
395 /*
396 * The TX ED value for TELEC Enable/Disable.
397 *
398 * Range: 0, 1
399 */
400 u8 tx_energy_detection;
401
402 /*
403 * Configuration for rate classes for TX (currently only one
404 * rate class supported). Used in non-AP mode.
405 */
406 struct conf_tx_rate_class sta_rc_conf;
407
408 /*
409 * Configuration for access categories for TX rate control.
410 */
411 u8 ac_conf_count;
412 struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT];
413
414 /*
415 * AP-mode - allow this number of TX retries to a station before an
416 * event is triggered from FW.
417 * In AP-mode the hlids of unreachable stations are given in the
418 * "sta_tx_retry_exceeded" member in the event mailbox.
419 */
420 u8 max_tx_retries;
421
422 /*
423 * AP-mode - after this number of seconds a connected station is
424 * considered inactive.
425 */
426 u16 ap_aging_period;
427
428 /*
429 * Configuration for TID parameters.
430 */
431 u8 tid_conf_count;
432 struct conf_tx_tid tid_conf[CONF_TX_MAX_TID_COUNT];
433
434 /*
435 * The TX fragmentation threshold.
436 *
437 * Range: u16
438 */
439 u16 frag_threshold;
440
441 /*
442 * Max time in msec the FW may delay frame TX-Complete interrupt.
443 *
444 * Range: u16
445 */
446 u16 tx_compl_timeout;
447
448 /*
449 * Completed TX packet count which requires to issue the TX-Complete
450 * interrupt.
451 *
452 * Range: u16
453 */
454 u16 tx_compl_threshold;
455
456 /*
457 * The rate used for control messages and scanning on the 2.4GHz band
458 *
459 * Range: CONF_HW_BIT_RATE_* bit mask
460 */
461 u32 basic_rate;
462
463 /*
464 * The rate used for control messages and scanning on the 5GHz band
465 *
466 * Range: CONF_HW_BIT_RATE_* bit mask
467 */
468 u32 basic_rate_5;
469
470 /*
471 * TX retry limits for templates
472 */
473 u8 tmpl_short_retry_limit;
474 u8 tmpl_long_retry_limit;
475
476 /* Time in ms for Tx watchdog timer to expire */
477 u32 tx_watchdog_timeout;
478
479 /*
480 * when a slow link has this much packets pending, it becomes a low
481 * priority link, scheduling-wise
482 */
483 u8 slow_link_thold;
484
485 /*
486 * when a fast link has this much packets pending, it becomes a low
487 * priority link, scheduling-wise
488 */
489 u8 fast_link_thold;
490} __packed;
491
492enum {
493 CONF_WAKE_UP_EVENT_BEACON = 0x01, /* Wake on every Beacon*/
494 CONF_WAKE_UP_EVENT_DTIM = 0x02, /* Wake on every DTIM*/
495 CONF_WAKE_UP_EVENT_N_DTIM = 0x04, /* Wake every Nth DTIM */
496 CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */
497 CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F
498};
499
500#define CONF_MAX_BCN_FILT_IE_COUNT 32
501
502#define CONF_BCN_RULE_PASS_ON_CHANGE BIT(0)
503#define CONF_BCN_RULE_PASS_ON_APPEARANCE BIT(1)
504
505#define CONF_BCN_IE_OUI_LEN 3
506#define CONF_BCN_IE_VER_LEN 2
507
508struct conf_bcn_filt_rule {
509 /*
510 * IE number to which to associate a rule.
511 *
512 * Range: u8
513 */
514 u8 ie;
515
516 /*
517 * Rule to associate with the specific ie.
518 *
519 * Range: CONF_BCN_RULE_PASS_ON_*
520 */
521 u8 rule;
522
523 /*
524 * OUI for the vendor specifie IE (221)
525 */
526 u8 oui[CONF_BCN_IE_OUI_LEN];
527
528 /*
529 * Type for the vendor specifie IE (221)
530 */
531 u8 type;
532
533 /*
534 * Version for the vendor specifie IE (221)
535 */
536 u8 version[CONF_BCN_IE_VER_LEN];
537} __packed;
538
539#define CONF_MAX_RSSI_SNR_TRIGGERS 8
540
541enum {
542 CONF_TRIG_METRIC_RSSI_BEACON = 0,
543 CONF_TRIG_METRIC_RSSI_DATA,
544 CONF_TRIG_METRIC_SNR_BEACON,
545 CONF_TRIG_METRIC_SNR_DATA
546};
547
548enum {
549 CONF_TRIG_EVENT_TYPE_LEVEL = 0,
550 CONF_TRIG_EVENT_TYPE_EDGE
551};
552
553enum {
554 CONF_TRIG_EVENT_DIR_LOW = 0,
555 CONF_TRIG_EVENT_DIR_HIGH,
556 CONF_TRIG_EVENT_DIR_BIDIR
557};
558
559struct conf_sig_weights {
560
561 /*
562 * RSSI from beacons average weight.
563 *
564 * Range: u8
565 */
566 u8 rssi_bcn_avg_weight;
567
568 /*
569 * RSSI from data average weight.
570 *
571 * Range: u8
572 */
573 u8 rssi_pkt_avg_weight;
574
575 /*
576 * SNR from beacons average weight.
577 *
578 * Range: u8
579 */
580 u8 snr_bcn_avg_weight;
581
582 /*
583 * SNR from data average weight.
584 *
585 * Range: u8
586 */
587 u8 snr_pkt_avg_weight;
588} __packed;
589
590enum conf_bcn_filt_mode {
591 CONF_BCN_FILT_MODE_DISABLED = 0,
592 CONF_BCN_FILT_MODE_ENABLED = 1
593};
594
595enum conf_bet_mode {
596 CONF_BET_MODE_DISABLE = 0,
597 CONF_BET_MODE_ENABLE = 1,
598};
599
600struct conf_conn_settings {
601 /*
602 * Firmware wakeup conditions configuration. The host may set only
603 * one bit.
604 *
605 * Range: CONF_WAKE_UP_EVENT_*
606 */
607 u8 wake_up_event;
608
609 /*
610 * Listen interval for beacons or Dtims.
611 *
612 * Range: 0 for beacon and Dtim wakeup
613 * 1-10 for x Dtims
614 * 1-255 for x beacons
615 */
616 u8 listen_interval;
617
618 /*
619 * Firmware wakeup conditions during suspend
620 * Range: CONF_WAKE_UP_EVENT_*
621 */
622 u8 suspend_wake_up_event;
623
624 /*
625 * Listen interval during suspend.
626 * Currently will be in DTIMs (1-10)
627 *
628 */
629 u8 suspend_listen_interval;
630
631 /*
632 * Enable or disable the beacon filtering.
633 *
634 * Range: CONF_BCN_FILT_MODE_*
635 */
636 u8 bcn_filt_mode;
637
638 /*
639 * Configure Beacon filter pass-thru rules.
640 */
641 u8 bcn_filt_ie_count;
642 struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT];
643
644 /*
645 * The number of consecutive beacons to lose, before the firmware
646 * becomes out of synch.
647 *
648 * Range: u32
649 */
650 u32 synch_fail_thold;
651
652 /*
653 * After out-of-synch, the number of TU's to wait without a further
654 * received beacon (or probe response) before issuing the BSS_EVENT_LOSE
655 * event.
656 *
657 * Range: u32
658 */
659 u32 bss_lose_timeout;
660
661 /*
662 * Beacon receive timeout.
663 *
664 * Range: u32
665 */
666 u32 beacon_rx_timeout;
667
668 /*
669 * Broadcast receive timeout.
670 *
671 * Range: u32
672 */
673 u32 broadcast_timeout;
674
675 /*
676 * Enable/disable reception of broadcast packets in power save mode
677 *
678 * Range: 1 - enable, 0 - disable
679 */
680 u8 rx_broadcast_in_ps;
681
682 /*
683 * Consecutive PS Poll failures before sending event to driver
684 *
685 * Range: u8
686 */
687 u8 ps_poll_threshold;
688
689 /*
690 * Configuration of signal average weights.
691 */
692 struct conf_sig_weights sig_weights;
693
694 /*
695 * Specifies if beacon early termination procedure is enabled or
696 * disabled.
697 *
698 * Range: CONF_BET_MODE_*
699 */
700 u8 bet_enable;
701
702 /*
703 * Specifies the maximum number of consecutive beacons that may be
704 * early terminated. After this number is reached at least one full
705 * beacon must be correctly received in FW before beacon ET
706 * resumes.
707 *
708 * Range 0 - 255
709 */
710 u8 bet_max_consecutive;
711
712 /*
713 * Specifies the maximum number of times to try PSM entry if it fails
714 * (if sending the appropriate null-func message fails.)
715 *
716 * Range 0 - 255
717 */
718 u8 psm_entry_retries;
719
720 /*
721 * Specifies the maximum number of times to try PSM exit if it fails
722 * (if sending the appropriate null-func message fails.)
723 *
724 * Range 0 - 255
725 */
726 u8 psm_exit_retries;
727
728 /*
729 * Specifies the maximum number of times to try transmit the PSM entry
730 * null-func frame for each PSM entry attempt
731 *
732 * Range 0 - 255
733 */
734 u8 psm_entry_nullfunc_retries;
735
736 /*
737 * Specifies the dynamic PS timeout in ms that will be used
738 * by the FW when in AUTO_PS mode
739 */
740 u16 dynamic_ps_timeout;
741
742 /*
743 * Specifies whether dynamic PS should be disabled and PSM forced.
744 * This is required for certain WiFi certification tests.
745 */
746 u8 forced_ps;
747
748 /*
749 *
750 * Specifies the interval of the connection keep-alive null-func
751 * frame in ms.
752 *
753 * Range: 1000 - 3600000
754 */
755 u32 keep_alive_interval;
756
757 /*
758 * Maximum listen interval supported by the driver in units of beacons.
759 *
760 * Range: u16
761 */
762 u8 max_listen_interval;
763
764 /*
765 * Default sleep authorization for a new STA interface. This determines
766 * whether we can go to ELP.
767 */
768 u8 sta_sleep_auth;
769
770 /*
771 * Default RX BA Activity filter configuration
772 */
773 u8 suspend_rx_ba_activity;
774} __packed;
775
776enum {
777 CONF_REF_CLK_19_2_E,
778 CONF_REF_CLK_26_E,
779 CONF_REF_CLK_38_4_E,
780 CONF_REF_CLK_52_E,
781 CONF_REF_CLK_38_4_M_XTAL,
782 CONF_REF_CLK_26_M_XTAL,
783};
784
785enum single_dual_band_enum {
786 CONF_SINGLE_BAND,
787 CONF_DUAL_BAND
788};
789
790#define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15
791#define CONF_NUMBER_OF_SUB_BANDS_5 7
792#define CONF_NUMBER_OF_RATE_GROUPS 6
793#define CONF_NUMBER_OF_CHANNELS_2_4 14
794#define CONF_NUMBER_OF_CHANNELS_5 35
795
796struct conf_itrim_settings {
797 /* enable dco itrim */
798 u8 enable;
799
800 /* moderation timeout in microsecs from the last TX */
801 u32 timeout;
802} __packed;
803
804enum conf_fast_wakeup {
805 CONF_FAST_WAKEUP_ENABLE,
806 CONF_FAST_WAKEUP_DISABLE,
807};
808
809struct conf_pm_config_settings {
810 /*
811 * Host clock settling time
812 *
813 * Range: 0 - 30000 us
814 */
815 u32 host_clk_settling_time;
816
817 /*
818 * Host fast wakeup support
819 *
820 * Range: enum conf_fast_wakeup
821 */
822 u8 host_fast_wakeup_support;
823} __packed;
824
825struct conf_roam_trigger_settings {
826 /*
827 * The minimum interval between two trigger events.
828 *
829 * Range: 0 - 60000 ms
830 */
831 u16 trigger_pacing;
832
833 /*
834 * The weight for rssi/beacon average calculation
835 *
836 * Range: 0 - 255
837 */
838 u8 avg_weight_rssi_beacon;
839
840 /*
841 * The weight for rssi/data frame average calculation
842 *
843 * Range: 0 - 255
844 */
845 u8 avg_weight_rssi_data;
846
847 /*
848 * The weight for snr/beacon average calculation
849 *
850 * Range: 0 - 255
851 */
852 u8 avg_weight_snr_beacon;
853
854 /*
855 * The weight for snr/data frame average calculation
856 *
857 * Range: 0 - 255
858 */
859 u8 avg_weight_snr_data;
860} __packed;
861
862struct conf_scan_settings {
863 /*
864 * The minimum time to wait on each channel for active scans
865 * This value will be used whenever there's a connected interface.
866 *
867 * Range: u32 tu/1000
868 */
869 u32 min_dwell_time_active;
870
871 /*
872 * The maximum time to wait on each channel for active scans
873 * This value will be currently used whenever there's a
874 * connected interface. It shouldn't exceed 30000 (~30ms) to avoid
875 * possible interference of voip traffic going on while scanning.
876 *
877 * Range: u32 tu/1000
878 */
879 u32 max_dwell_time_active;
880
881 /* The minimum time to wait on each channel for active scans
882 * when it's possible to have longer scan dwell times.
883 * Currently this is used whenever we're idle on all interfaces.
884 * Longer dwell times improve detection of networks within a
885 * single scan.
886 *
887 * Range: u32 tu/1000
888 */
889 u32 min_dwell_time_active_long;
890
891 /* The maximum time to wait on each channel for active scans
892 * when it's possible to have longer scan dwell times.
893 * See min_dwell_time_active_long
894 *
895 * Range: u32 tu/1000
896 */
897 u32 max_dwell_time_active_long;
898
899 /* time to wait on the channel for passive scans (in TU/1000) */
900 u32 dwell_time_passive;
901
902 /* time to wait on the channel for DFS scans (in TU/1000) */
903 u32 dwell_time_dfs;
904
905 /*
906 * Number of probe requests to transmit on each active scan channel
907 *
908 * Range: u8
909 */
910 u16 num_probe_reqs;
911
912 /*
913 * Scan trigger (split scan) timeout. The FW will split the scan
914 * operation into slices of the given time and allow the FW to schedule
915 * other tasks in between.
916 *
917 * Range: u32 Microsecs
918 */
919 u32 split_scan_timeout;
920} __packed;
921
922struct conf_sched_scan_settings {
923 /*
924 * The base time to wait on the channel for active scans (in TU/1000).
925 * The minimum dwell time is calculated according to this:
926 * min_dwell_time = base + num_of_probes_to_be_sent * delta_per_probe
927 * The maximum dwell time is calculated according to this:
928 * max_dwell_time = min_dwell_time + max_dwell_time_delta
929 */
930 u32 base_dwell_time;
931
932 /* The delta between the min dwell time and max dwell time for
933 * active scans (in TU/1000s). The max dwell time is used by the FW once
934 * traffic is detected on the channel.
935 */
936 u32 max_dwell_time_delta;
937
938 /* Delta added to min dwell time per each probe in 2.4 GHz (TU/1000) */
939 u32 dwell_time_delta_per_probe;
940
941 /* Delta added to min dwell time per each probe in 5 GHz (TU/1000) */
942 u32 dwell_time_delta_per_probe_5;
943
944 /* time to wait on the channel for passive scans (in TU/1000) */
945 u32 dwell_time_passive;
946
947 /* time to wait on the channel for DFS scans (in TU/1000) */
948 u32 dwell_time_dfs;
949
950 /* number of probe requests to send on each channel in active scans */
951 u8 num_probe_reqs;
952
953 /* RSSI threshold to be used for filtering */
954 s8 rssi_threshold;
955
956 /* SNR threshold to be used for filtering */
957 s8 snr_threshold;
958
959 /*
960 * number of short intervals scheduled scan cycles before
961 * switching to long intervals
962 */
963 u8 num_short_intervals;
964
965 /* interval between each long scheduled scan cycle (in ms) */
966 u16 long_interval;
967} __packed;
968
969struct conf_ht_setting {
970 u8 rx_ba_win_size;
971 u8 tx_ba_win_size;
972 u16 inactivity_timeout;
973
974 /* bitmap of enabled TIDs for TX BA sessions */
975 u8 tx_ba_tid_bitmap;
976} __packed;
977
978struct conf_memory_settings {
979 /* Number of stations supported in IBSS mode */
980 u8 num_stations;
981
982 /* Number of ssid profiles used in IBSS mode */
983 u8 ssid_profiles;
984
985 /* Number of memory buffers allocated to rx pool */
986 u8 rx_block_num;
987
988 /* Minimum number of blocks allocated to tx pool */
989 u8 tx_min_block_num;
990
991 /* Disable/Enable dynamic memory */
992 u8 dynamic_memory;
993
994 /*
995 * Minimum required free tx memory blocks in order to assure optimum
996 * performance
997 *
998 * Range: 0-120
999 */
1000 u8 min_req_tx_blocks;
1001
1002 /*
1003 * Minimum required free rx memory blocks in order to assure optimum
1004 * performance
1005 *
1006 * Range: 0-120
1007 */
1008 u8 min_req_rx_blocks;
1009
1010 /*
1011 * Minimum number of mem blocks (free+used) guaranteed for TX
1012 *
1013 * Range: 0-120
1014 */
1015 u8 tx_min;
1016} __packed;
1017
1018struct conf_fm_coex {
1019 u8 enable;
1020 u8 swallow_period;
1021 u8 n_divider_fref_set_1;
1022 u8 n_divider_fref_set_2;
1023 u16 m_divider_fref_set_1;
1024 u16 m_divider_fref_set_2;
1025 u32 coex_pll_stabilization_time;
1026 u16 ldo_stabilization_time;
1027 u8 fm_disturbed_band_margin;
1028 u8 swallow_clk_diff;
1029} __packed;
1030
1031struct conf_rx_streaming_settings {
1032 /*
1033 * RX Streaming duration (in msec) from last tx/rx
1034 *
1035 * Range: u32
1036 */
1037 u32 duration;
1038
1039 /*
1040 * Bitmap of tids to be polled during RX streaming.
1041 * (Note: it doesn't look like it really matters)
1042 *
1043 * Range: 0x1-0xff
1044 */
1045 u8 queues;
1046
1047 /*
1048 * RX Streaming interval.
1049 * (Note:this value is also used as the rx streaming timeout)
1050 * Range: 0 (disabled), 10 - 100
1051 */
1052 u8 interval;
1053
1054 /*
1055 * enable rx streaming also when there is no coex activity
1056 */
1057 u8 always;
1058} __packed;
1059
1060#define CONF_FWLOG_MIN_MEM_BLOCKS 2
1061#define CONF_FWLOG_MAX_MEM_BLOCKS 16
1062
1063struct conf_fwlog {
1064 /* Continuous or on-demand */
1065 u8 mode;
1066
1067 /*
1068 * Number of memory blocks dedicated for the FW logger
1069 *
1070 * Range: 2-16, or 0 to disable the FW logger
1071 */
1072 u8 mem_blocks;
1073
1074 /* Minimum log level threshold */
1075 u8 severity;
1076
1077 /* Include/exclude timestamps from the log messages */
1078 u8 timestamp;
1079
1080 /* See enum wl1271_fwlogger_output */
1081 u8 output;
1082
1083 /* Regulates the frequency of log messages */
1084 u8 threshold;
1085} __packed;
1086
1087#define ACX_RATE_MGMT_NUM_OF_RATES 13
1088struct conf_rate_policy_settings {
1089 u16 rate_retry_score;
1090 u16 per_add;
1091 u16 per_th1;
1092 u16 per_th2;
1093 u16 max_per;
1094 u8 inverse_curiosity_factor;
1095 u8 tx_fail_low_th;
1096 u8 tx_fail_high_th;
1097 u8 per_alpha_shift;
1098 u8 per_add_shift;
1099 u8 per_beta1_shift;
1100 u8 per_beta2_shift;
1101 u8 rate_check_up;
1102 u8 rate_check_down;
1103 u8 rate_retry_policy[ACX_RATE_MGMT_NUM_OF_RATES];
1104} __packed;
1105
1106struct conf_hangover_settings {
1107 u32 recover_time;
1108 u8 hangover_period;
1109 u8 dynamic_mode;
1110 u8 early_termination_mode;
1111 u8 max_period;
1112 u8 min_period;
1113 u8 increase_delta;
1114 u8 decrease_delta;
1115 u8 quiet_time;
1116 u8 increase_time;
1117 u8 window_size;
1118} __packed;
1119
1120struct conf_recovery_settings {
1121 /* BUG() on fw recovery */
1122 u8 bug_on_recovery;
1123
1124 /* Prevent HW recovery. FW will remain stuck. */
1125 u8 no_recovery;
1126} __packed;
1127
1128/*
1129 * The conf version consists of 4 bytes. The two MSB are the wlcore
1130 * version, the two LSB are the lower driver's private conf
1131 * version.
1132 */
1133#define WLCORE_CONF_VERSION (0x0007 << 16)
1134#define WLCORE_CONF_MASK 0xffff0000
1135#define WLCORE_CONF_SIZE (sizeof(struct wlcore_conf_header) + \
1136 sizeof(struct wlcore_conf))
1137
1138struct wlcore_conf_header {
1139 __le32 magic;
1140 __le32 version;
1141 __le32 checksum;
1142} __packed;
1143
1144struct wlcore_conf {
1145 struct conf_sg_settings sg;
1146 struct conf_rx_settings rx;
1147 struct conf_tx_settings tx;
1148 struct conf_conn_settings conn;
1149 struct conf_itrim_settings itrim;
1150 struct conf_pm_config_settings pm_config;
1151 struct conf_roam_trigger_settings roam_trigger;
1152 struct conf_scan_settings scan;
1153 struct conf_sched_scan_settings sched_scan;
1154 struct conf_ht_setting ht;
1155 struct conf_memory_settings mem;
1156 struct conf_fm_coex fm_coex;
1157 struct conf_rx_streaming_settings rx_streaming;
1158 struct conf_fwlog fwlog;
1159 struct conf_rate_policy_settings rate;
1160 struct conf_hangover_settings hangover;
1161 struct conf_recovery_settings recovery;
1162} __packed;
1163
1164struct wlcore_conf_file {
1165 struct wlcore_conf_header header;
1166 struct wlcore_conf core;
1167 u8 priv[0];
1168} __packed;
1169
1170#endif
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * This file is part of wl1271
4 *
5 * Copyright (C) 2009 Nokia Corporation
6 *
7 * Contact: Luciano Coelho <luciano.coelho@nokia.com>
8 */
9
10#ifndef __CONF_H__
11#define __CONF_H__
12
13enum {
14 CONF_HW_BIT_RATE_1MBPS = BIT(0),
15 CONF_HW_BIT_RATE_2MBPS = BIT(1),
16 CONF_HW_BIT_RATE_5_5MBPS = BIT(2),
17 CONF_HW_BIT_RATE_6MBPS = BIT(3),
18 CONF_HW_BIT_RATE_9MBPS = BIT(4),
19 CONF_HW_BIT_RATE_11MBPS = BIT(5),
20 CONF_HW_BIT_RATE_12MBPS = BIT(6),
21 CONF_HW_BIT_RATE_18MBPS = BIT(7),
22 CONF_HW_BIT_RATE_22MBPS = BIT(8),
23 CONF_HW_BIT_RATE_24MBPS = BIT(9),
24 CONF_HW_BIT_RATE_36MBPS = BIT(10),
25 CONF_HW_BIT_RATE_48MBPS = BIT(11),
26 CONF_HW_BIT_RATE_54MBPS = BIT(12),
27 CONF_HW_BIT_RATE_MCS_0 = BIT(13),
28 CONF_HW_BIT_RATE_MCS_1 = BIT(14),
29 CONF_HW_BIT_RATE_MCS_2 = BIT(15),
30 CONF_HW_BIT_RATE_MCS_3 = BIT(16),
31 CONF_HW_BIT_RATE_MCS_4 = BIT(17),
32 CONF_HW_BIT_RATE_MCS_5 = BIT(18),
33 CONF_HW_BIT_RATE_MCS_6 = BIT(19),
34 CONF_HW_BIT_RATE_MCS_7 = BIT(20),
35 CONF_HW_BIT_RATE_MCS_8 = BIT(21),
36 CONF_HW_BIT_RATE_MCS_9 = BIT(22),
37 CONF_HW_BIT_RATE_MCS_10 = BIT(23),
38 CONF_HW_BIT_RATE_MCS_11 = BIT(24),
39 CONF_HW_BIT_RATE_MCS_12 = BIT(25),
40 CONF_HW_BIT_RATE_MCS_13 = BIT(26),
41 CONF_HW_BIT_RATE_MCS_14 = BIT(27),
42 CONF_HW_BIT_RATE_MCS_15 = BIT(28),
43};
44
45enum {
46 CONF_HW_RATE_INDEX_1MBPS = 0,
47 CONF_HW_RATE_INDEX_2MBPS = 1,
48 CONF_HW_RATE_INDEX_5_5MBPS = 2,
49 CONF_HW_RATE_INDEX_11MBPS = 3,
50 CONF_HW_RATE_INDEX_6MBPS = 4,
51 CONF_HW_RATE_INDEX_9MBPS = 5,
52 CONF_HW_RATE_INDEX_12MBPS = 6,
53 CONF_HW_RATE_INDEX_18MBPS = 7,
54 CONF_HW_RATE_INDEX_24MBPS = 8,
55 CONF_HW_RATE_INDEX_36MBPS = 9,
56 CONF_HW_RATE_INDEX_48MBPS = 10,
57 CONF_HW_RATE_INDEX_54MBPS = 11,
58 CONF_HW_RATE_INDEX_MCS0 = 12,
59 CONF_HW_RATE_INDEX_MCS1 = 13,
60 CONF_HW_RATE_INDEX_MCS2 = 14,
61 CONF_HW_RATE_INDEX_MCS3 = 15,
62 CONF_HW_RATE_INDEX_MCS4 = 16,
63 CONF_HW_RATE_INDEX_MCS5 = 17,
64 CONF_HW_RATE_INDEX_MCS6 = 18,
65 CONF_HW_RATE_INDEX_MCS7 = 19,
66 CONF_HW_RATE_INDEX_MCS7_SGI = 20,
67 CONF_HW_RATE_INDEX_MCS0_40MHZ = 21,
68 CONF_HW_RATE_INDEX_MCS1_40MHZ = 22,
69 CONF_HW_RATE_INDEX_MCS2_40MHZ = 23,
70 CONF_HW_RATE_INDEX_MCS3_40MHZ = 24,
71 CONF_HW_RATE_INDEX_MCS4_40MHZ = 25,
72 CONF_HW_RATE_INDEX_MCS5_40MHZ = 26,
73 CONF_HW_RATE_INDEX_MCS6_40MHZ = 27,
74 CONF_HW_RATE_INDEX_MCS7_40MHZ = 28,
75 CONF_HW_RATE_INDEX_MCS7_40MHZ_SGI = 29,
76
77 /* MCS8+ rates overlap with 40Mhz rates */
78 CONF_HW_RATE_INDEX_MCS8 = 21,
79 CONF_HW_RATE_INDEX_MCS9 = 22,
80 CONF_HW_RATE_INDEX_MCS10 = 23,
81 CONF_HW_RATE_INDEX_MCS11 = 24,
82 CONF_HW_RATE_INDEX_MCS12 = 25,
83 CONF_HW_RATE_INDEX_MCS13 = 26,
84 CONF_HW_RATE_INDEX_MCS14 = 27,
85 CONF_HW_RATE_INDEX_MCS15 = 28,
86 CONF_HW_RATE_INDEX_MCS15_SGI = 29,
87
88 CONF_HW_RATE_INDEX_MAX = CONF_HW_RATE_INDEX_MCS7_40MHZ_SGI,
89};
90
91#define CONF_HW_RXTX_RATE_UNSUPPORTED 0xff
92
93enum {
94 CONF_SG_DISABLE = 0,
95 CONF_SG_PROTECTIVE,
96 CONF_SG_OPPORTUNISTIC
97};
98
99#define WLCORE_CONF_SG_PARAMS_MAX 67
100#define WLCORE_CONF_SG_PARAMS_ALL 0xff
101
102struct conf_sg_settings {
103 u32 params[WLCORE_CONF_SG_PARAMS_MAX];
104 u8 state;
105} __packed;
106
107enum conf_rx_queue_type {
108 CONF_RX_QUEUE_TYPE_LOW_PRIORITY, /* All except the high priority */
109 CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */
110};
111
112struct conf_rx_settings {
113 /*
114 * The maximum amount of time, in TU, before the
115 * firmware discards the MSDU.
116 *
117 * Range: 0 - 0xFFFFFFFF
118 */
119 u32 rx_msdu_life_time;
120
121 /*
122 * Packet detection threshold in the PHY.
123 *
124 * FIXME: details unknown.
125 */
126 u32 packet_detection_threshold;
127
128 /*
129 * The longest time the STA will wait to receive traffic from the AP
130 * after a PS-poll has been transmitted.
131 *
132 * Range: 0 - 200000
133 */
134 u16 ps_poll_timeout;
135 /*
136 * The longest time the STA will wait to receive traffic from the AP
137 * after a frame has been sent from an UPSD enabled queue.
138 *
139 * Range: 0 - 200000
140 */
141 u16 upsd_timeout;
142
143 /*
144 * The number of octets in an MPDU, below which an RTS/CTS
145 * handshake is not performed.
146 *
147 * Range: 0 - 4096
148 */
149 u16 rts_threshold;
150
151 /*
152 * The RX Clear Channel Assessment threshold in the PHY
153 * (the energy threshold).
154 *
155 * Range: ENABLE_ENERGY_D == 0x140A
156 * DISABLE_ENERGY_D == 0xFFEF
157 */
158 u16 rx_cca_threshold;
159
160 /*
161 * Occupied Rx mem-blocks number which requires interrupting the host
162 * (0 = no buffering, 0xffff = disabled).
163 *
164 * Range: u16
165 */
166 u16 irq_blk_threshold;
167
168 /*
169 * Rx packets number which requires interrupting the host
170 * (0 = no buffering).
171 *
172 * Range: u16
173 */
174 u16 irq_pkt_threshold;
175
176 /*
177 * Max time in msec the FW may delay RX-Complete interrupt.
178 *
179 * Range: 1 - 100
180 */
181 u16 irq_timeout;
182
183 /*
184 * The RX queue type.
185 *
186 * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY,
187 */
188 u8 queue_type;
189} __packed;
190
191#define CONF_TX_MAX_RATE_CLASSES 10
192
193#define CONF_TX_RATE_MASK_UNSPECIFIED 0
194#define CONF_TX_RATE_MASK_BASIC (CONF_HW_BIT_RATE_1MBPS | \
195 CONF_HW_BIT_RATE_2MBPS)
196#define CONF_TX_RATE_RETRY_LIMIT 10
197
198/* basic rates for p2p operations (probe req/resp, etc.) */
199#define CONF_TX_RATE_MASK_BASIC_P2P CONF_HW_BIT_RATE_6MBPS
200
201/*
202 * Rates supported for data packets when operating as STA/AP. Note the absence
203 * of the 22Mbps rate. There is a FW limitation on 12 rates so we must drop
204 * one. The rate dropped is not mandatory under any operating mode.
205 */
206#define CONF_TX_ENABLED_RATES (CONF_HW_BIT_RATE_1MBPS | \
207 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
208 CONF_HW_BIT_RATE_6MBPS | CONF_HW_BIT_RATE_9MBPS | \
209 CONF_HW_BIT_RATE_11MBPS | CONF_HW_BIT_RATE_12MBPS | \
210 CONF_HW_BIT_RATE_18MBPS | CONF_HW_BIT_RATE_24MBPS | \
211 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
212 CONF_HW_BIT_RATE_54MBPS)
213
214#define CONF_TX_CCK_RATES (CONF_HW_BIT_RATE_1MBPS | \
215 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
216 CONF_HW_BIT_RATE_11MBPS)
217
218#define CONF_TX_OFDM_RATES (CONF_HW_BIT_RATE_6MBPS | \
219 CONF_HW_BIT_RATE_12MBPS | CONF_HW_BIT_RATE_24MBPS | \
220 CONF_HW_BIT_RATE_36MBPS | CONF_HW_BIT_RATE_48MBPS | \
221 CONF_HW_BIT_RATE_54MBPS)
222
223#define CONF_TX_MCS_RATES (CONF_HW_BIT_RATE_MCS_0 | \
224 CONF_HW_BIT_RATE_MCS_1 | CONF_HW_BIT_RATE_MCS_2 | \
225 CONF_HW_BIT_RATE_MCS_3 | CONF_HW_BIT_RATE_MCS_4 | \
226 CONF_HW_BIT_RATE_MCS_5 | CONF_HW_BIT_RATE_MCS_6 | \
227 CONF_HW_BIT_RATE_MCS_7)
228
229#define CONF_TX_MIMO_RATES (CONF_HW_BIT_RATE_MCS_8 | \
230 CONF_HW_BIT_RATE_MCS_9 | CONF_HW_BIT_RATE_MCS_10 | \
231 CONF_HW_BIT_RATE_MCS_11 | CONF_HW_BIT_RATE_MCS_12 | \
232 CONF_HW_BIT_RATE_MCS_13 | CONF_HW_BIT_RATE_MCS_14 | \
233 CONF_HW_BIT_RATE_MCS_15)
234
235/*
236 * Default rates for management traffic when operating in AP mode. This
237 * should be configured according to the basic rate set of the AP
238 */
239#define CONF_TX_AP_DEFAULT_MGMT_RATES (CONF_HW_BIT_RATE_1MBPS | \
240 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS)
241
242/* default rates for working as IBSS (11b and OFDM) */
243#define CONF_TX_IBSS_DEFAULT_RATES (CONF_HW_BIT_RATE_1MBPS | \
244 CONF_HW_BIT_RATE_2MBPS | CONF_HW_BIT_RATE_5_5MBPS | \
245 CONF_HW_BIT_RATE_11MBPS | CONF_TX_OFDM_RATES);
246
247struct conf_tx_rate_class {
248
249 /*
250 * The rates enabled for this rate class.
251 *
252 * Range: CONF_HW_BIT_RATE_* bit mask
253 */
254 u32 enabled_rates;
255
256 /*
257 * The dot11 short retry limit used for TX retries.
258 *
259 * Range: u8
260 */
261 u8 short_retry_limit;
262
263 /*
264 * The dot11 long retry limit used for TX retries.
265 *
266 * Range: u8
267 */
268 u8 long_retry_limit;
269
270 /*
271 * Flags controlling the attributes of TX transmission.
272 *
273 * Range: bit 0: Truncate - when set, FW attempts to send a frame stop
274 * when the total valid per-rate attempts have
275 * been exhausted; otherwise transmissions
276 * will continue at the lowest available rate
277 * until the appropriate one of the
278 * short_retry_limit, long_retry_limit,
279 * dot11_max_transmit_msdu_life_time, or
280 * max_tx_life_time, is exhausted.
281 * 1: Preamble Override - indicates if the preamble type
282 * should be used in TX.
283 * 2: Preamble Type - the type of the preamble to be used by
284 * the policy (0 - long preamble, 1 - short preamble.
285 */
286 u8 aflags;
287} __packed;
288
289#define CONF_TX_MAX_AC_COUNT 4
290
291/* Slot number setting to start transmission at PIFS interval */
292#define CONF_TX_AIFS_PIFS 1
293/* Slot number setting to start transmission at DIFS interval normal
294 * DCF access */
295#define CONF_TX_AIFS_DIFS 2
296
297
298enum conf_tx_ac {
299 CONF_TX_AC_BE = 0, /* best effort / legacy */
300 CONF_TX_AC_BK = 1, /* background */
301 CONF_TX_AC_VI = 2, /* video */
302 CONF_TX_AC_VO = 3, /* voice */
303 CONF_TX_AC_CTS2SELF = 4, /* fictitious AC, follows AC_VO */
304 CONF_TX_AC_ANY_TID = 0xff
305};
306
307struct conf_tx_ac_category {
308 /*
309 * The AC class identifier.
310 *
311 * Range: enum conf_tx_ac
312 */
313 u8 ac;
314
315 /*
316 * The contention window minimum size (in slots) for the access
317 * class.
318 *
319 * Range: u8
320 */
321 u8 cw_min;
322
323 /*
324 * The contention window maximum size (in slots) for the access
325 * class.
326 *
327 * Range: u8
328 */
329 u16 cw_max;
330
331 /*
332 * The AIF value (in slots) for the access class.
333 *
334 * Range: u8
335 */
336 u8 aifsn;
337
338 /*
339 * The TX Op Limit (in microseconds) for the access class.
340 *
341 * Range: u16
342 */
343 u16 tx_op_limit;
344} __packed;
345
346#define CONF_TX_MAX_TID_COUNT 8
347
348/* Allow TX BA on all TIDs but 6,7. These are currently reserved in the FW */
349#define CONF_TX_BA_ENABLED_TID_BITMAP 0x3F
350
351enum {
352 CONF_CHANNEL_TYPE_DCF = 0, /* DC/LEGACY*/
353 CONF_CHANNEL_TYPE_EDCF = 1, /* EDCA*/
354 CONF_CHANNEL_TYPE_HCCA = 2, /* HCCA*/
355};
356
357enum {
358 CONF_PS_SCHEME_LEGACY = 0,
359 CONF_PS_SCHEME_UPSD_TRIGGER = 1,
360 CONF_PS_SCHEME_LEGACY_PSPOLL = 2,
361 CONF_PS_SCHEME_SAPSD = 3,
362};
363
364enum {
365 CONF_ACK_POLICY_LEGACY = 0,
366 CONF_ACK_POLICY_NO_ACK = 1,
367 CONF_ACK_POLICY_BLOCK = 2,
368};
369
370
371struct conf_tx_tid {
372 u8 queue_id;
373 u8 channel_type;
374 u8 tsid;
375 u8 ps_scheme;
376 u8 ack_policy;
377 u32 apsd_conf[2];
378} __packed;
379
380struct conf_tx_settings {
381 /*
382 * The TX ED value for TELEC Enable/Disable.
383 *
384 * Range: 0, 1
385 */
386 u8 tx_energy_detection;
387
388 /*
389 * Configuration for rate classes for TX (currently only one
390 * rate class supported). Used in non-AP mode.
391 */
392 struct conf_tx_rate_class sta_rc_conf;
393
394 /*
395 * Configuration for access categories for TX rate control.
396 */
397 u8 ac_conf_count;
398 struct conf_tx_ac_category ac_conf[CONF_TX_MAX_AC_COUNT];
399
400 /*
401 * AP-mode - allow this number of TX retries to a station before an
402 * event is triggered from FW.
403 * In AP-mode the hlids of unreachable stations are given in the
404 * "sta_tx_retry_exceeded" member in the event mailbox.
405 */
406 u8 max_tx_retries;
407
408 /*
409 * AP-mode - after this number of seconds a connected station is
410 * considered inactive.
411 */
412 u16 ap_aging_period;
413
414 /*
415 * Configuration for TID parameters.
416 */
417 u8 tid_conf_count;
418 struct conf_tx_tid tid_conf[CONF_TX_MAX_TID_COUNT];
419
420 /*
421 * The TX fragmentation threshold.
422 *
423 * Range: u16
424 */
425 u16 frag_threshold;
426
427 /*
428 * Max time in msec the FW may delay frame TX-Complete interrupt.
429 *
430 * Range: u16
431 */
432 u16 tx_compl_timeout;
433
434 /*
435 * Completed TX packet count which requires to issue the TX-Complete
436 * interrupt.
437 *
438 * Range: u16
439 */
440 u16 tx_compl_threshold;
441
442 /*
443 * The rate used for control messages and scanning on the 2.4GHz band
444 *
445 * Range: CONF_HW_BIT_RATE_* bit mask
446 */
447 u32 basic_rate;
448
449 /*
450 * The rate used for control messages and scanning on the 5GHz band
451 *
452 * Range: CONF_HW_BIT_RATE_* bit mask
453 */
454 u32 basic_rate_5;
455
456 /*
457 * TX retry limits for templates
458 */
459 u8 tmpl_short_retry_limit;
460 u8 tmpl_long_retry_limit;
461
462 /* Time in ms for Tx watchdog timer to expire */
463 u32 tx_watchdog_timeout;
464
465 /*
466 * when a slow link has this much packets pending, it becomes a low
467 * priority link, scheduling-wise
468 */
469 u8 slow_link_thold;
470
471 /*
472 * when a fast link has this much packets pending, it becomes a low
473 * priority link, scheduling-wise
474 */
475 u8 fast_link_thold;
476} __packed;
477
478enum {
479 CONF_WAKE_UP_EVENT_BEACON = 0x01, /* Wake on every Beacon*/
480 CONF_WAKE_UP_EVENT_DTIM = 0x02, /* Wake on every DTIM*/
481 CONF_WAKE_UP_EVENT_N_DTIM = 0x04, /* Wake every Nth DTIM */
482 CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */
483 CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F
484};
485
486#define CONF_MAX_BCN_FILT_IE_COUNT 32
487
488#define CONF_BCN_RULE_PASS_ON_CHANGE BIT(0)
489#define CONF_BCN_RULE_PASS_ON_APPEARANCE BIT(1)
490
491#define CONF_BCN_IE_OUI_LEN 3
492#define CONF_BCN_IE_VER_LEN 2
493
494struct conf_bcn_filt_rule {
495 /*
496 * IE number to which to associate a rule.
497 *
498 * Range: u8
499 */
500 u8 ie;
501
502 /*
503 * Rule to associate with the specific ie.
504 *
505 * Range: CONF_BCN_RULE_PASS_ON_*
506 */
507 u8 rule;
508
509 /*
510 * OUI for the vendor specifie IE (221)
511 */
512 u8 oui[CONF_BCN_IE_OUI_LEN];
513
514 /*
515 * Type for the vendor specifie IE (221)
516 */
517 u8 type;
518
519 /*
520 * Version for the vendor specifie IE (221)
521 */
522 u8 version[CONF_BCN_IE_VER_LEN];
523} __packed;
524
525#define CONF_MAX_RSSI_SNR_TRIGGERS 8
526
527enum {
528 CONF_TRIG_METRIC_RSSI_BEACON = 0,
529 CONF_TRIG_METRIC_RSSI_DATA,
530 CONF_TRIG_METRIC_SNR_BEACON,
531 CONF_TRIG_METRIC_SNR_DATA
532};
533
534enum {
535 CONF_TRIG_EVENT_TYPE_LEVEL = 0,
536 CONF_TRIG_EVENT_TYPE_EDGE
537};
538
539enum {
540 CONF_TRIG_EVENT_DIR_LOW = 0,
541 CONF_TRIG_EVENT_DIR_HIGH,
542 CONF_TRIG_EVENT_DIR_BIDIR
543};
544
545struct conf_sig_weights {
546
547 /*
548 * RSSI from beacons average weight.
549 *
550 * Range: u8
551 */
552 u8 rssi_bcn_avg_weight;
553
554 /*
555 * RSSI from data average weight.
556 *
557 * Range: u8
558 */
559 u8 rssi_pkt_avg_weight;
560
561 /*
562 * SNR from beacons average weight.
563 *
564 * Range: u8
565 */
566 u8 snr_bcn_avg_weight;
567
568 /*
569 * SNR from data average weight.
570 *
571 * Range: u8
572 */
573 u8 snr_pkt_avg_weight;
574} __packed;
575
576enum conf_bcn_filt_mode {
577 CONF_BCN_FILT_MODE_DISABLED = 0,
578 CONF_BCN_FILT_MODE_ENABLED = 1
579};
580
581enum conf_bet_mode {
582 CONF_BET_MODE_DISABLE = 0,
583 CONF_BET_MODE_ENABLE = 1,
584};
585
586struct conf_conn_settings {
587 /*
588 * Firmware wakeup conditions configuration. The host may set only
589 * one bit.
590 *
591 * Range: CONF_WAKE_UP_EVENT_*
592 */
593 u8 wake_up_event;
594
595 /*
596 * Listen interval for beacons or Dtims.
597 *
598 * Range: 0 for beacon and Dtim wakeup
599 * 1-10 for x Dtims
600 * 1-255 for x beacons
601 */
602 u8 listen_interval;
603
604 /*
605 * Firmware wakeup conditions during suspend
606 * Range: CONF_WAKE_UP_EVENT_*
607 */
608 u8 suspend_wake_up_event;
609
610 /*
611 * Listen interval during suspend.
612 * Currently will be in DTIMs (1-10)
613 *
614 */
615 u8 suspend_listen_interval;
616
617 /*
618 * Enable or disable the beacon filtering.
619 *
620 * Range: CONF_BCN_FILT_MODE_*
621 */
622 u8 bcn_filt_mode;
623
624 /*
625 * Configure Beacon filter pass-thru rules.
626 */
627 u8 bcn_filt_ie_count;
628 struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT];
629
630 /*
631 * The number of consecutive beacons to lose, before the firmware
632 * becomes out of synch.
633 *
634 * Range: u32
635 */
636 u32 synch_fail_thold;
637
638 /*
639 * After out-of-synch, the number of TU's to wait without a further
640 * received beacon (or probe response) before issuing the BSS_EVENT_LOSE
641 * event.
642 *
643 * Range: u32
644 */
645 u32 bss_lose_timeout;
646
647 /*
648 * Beacon receive timeout.
649 *
650 * Range: u32
651 */
652 u32 beacon_rx_timeout;
653
654 /*
655 * Broadcast receive timeout.
656 *
657 * Range: u32
658 */
659 u32 broadcast_timeout;
660
661 /*
662 * Enable/disable reception of broadcast packets in power save mode
663 *
664 * Range: 1 - enable, 0 - disable
665 */
666 u8 rx_broadcast_in_ps;
667
668 /*
669 * Consecutive PS Poll failures before sending event to driver
670 *
671 * Range: u8
672 */
673 u8 ps_poll_threshold;
674
675 /*
676 * Configuration of signal average weights.
677 */
678 struct conf_sig_weights sig_weights;
679
680 /*
681 * Specifies if beacon early termination procedure is enabled or
682 * disabled.
683 *
684 * Range: CONF_BET_MODE_*
685 */
686 u8 bet_enable;
687
688 /*
689 * Specifies the maximum number of consecutive beacons that may be
690 * early terminated. After this number is reached at least one full
691 * beacon must be correctly received in FW before beacon ET
692 * resumes.
693 *
694 * Range 0 - 255
695 */
696 u8 bet_max_consecutive;
697
698 /*
699 * Specifies the maximum number of times to try PSM entry if it fails
700 * (if sending the appropriate null-func message fails.)
701 *
702 * Range 0 - 255
703 */
704 u8 psm_entry_retries;
705
706 /*
707 * Specifies the maximum number of times to try PSM exit if it fails
708 * (if sending the appropriate null-func message fails.)
709 *
710 * Range 0 - 255
711 */
712 u8 psm_exit_retries;
713
714 /*
715 * Specifies the maximum number of times to try transmit the PSM entry
716 * null-func frame for each PSM entry attempt
717 *
718 * Range 0 - 255
719 */
720 u8 psm_entry_nullfunc_retries;
721
722 /*
723 * Specifies the dynamic PS timeout in ms that will be used
724 * by the FW when in AUTO_PS mode
725 */
726 u16 dynamic_ps_timeout;
727
728 /*
729 * Specifies whether dynamic PS should be disabled and PSM forced.
730 * This is required for certain WiFi certification tests.
731 */
732 u8 forced_ps;
733
734 /*
735 *
736 * Specifies the interval of the connection keep-alive null-func
737 * frame in ms.
738 *
739 * Range: 1000 - 3600000
740 */
741 u32 keep_alive_interval;
742
743 /*
744 * Maximum listen interval supported by the driver in units of beacons.
745 *
746 * Range: u16
747 */
748 u8 max_listen_interval;
749
750 /*
751 * Default sleep authorization for a new STA interface. This determines
752 * whether we can go to ELP.
753 */
754 u8 sta_sleep_auth;
755
756 /*
757 * Default RX BA Activity filter configuration
758 */
759 u8 suspend_rx_ba_activity;
760} __packed;
761
762enum {
763 CONF_REF_CLK_19_2_E,
764 CONF_REF_CLK_26_E,
765 CONF_REF_CLK_38_4_E,
766 CONF_REF_CLK_52_E,
767 CONF_REF_CLK_38_4_M_XTAL,
768 CONF_REF_CLK_26_M_XTAL,
769};
770
771enum single_dual_band_enum {
772 CONF_SINGLE_BAND,
773 CONF_DUAL_BAND
774};
775
776#define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15
777#define CONF_NUMBER_OF_SUB_BANDS_5 7
778#define CONF_NUMBER_OF_RATE_GROUPS 6
779#define CONF_NUMBER_OF_CHANNELS_2_4 14
780#define CONF_NUMBER_OF_CHANNELS_5 35
781
782struct conf_itrim_settings {
783 /* enable dco itrim */
784 u8 enable;
785
786 /* moderation timeout in microsecs from the last TX */
787 u32 timeout;
788} __packed;
789
790enum conf_fast_wakeup {
791 CONF_FAST_WAKEUP_ENABLE,
792 CONF_FAST_WAKEUP_DISABLE,
793};
794
795struct conf_pm_config_settings {
796 /*
797 * Host clock settling time
798 *
799 * Range: 0 - 30000 us
800 */
801 u32 host_clk_settling_time;
802
803 /*
804 * Host fast wakeup support
805 *
806 * Range: enum conf_fast_wakeup
807 */
808 u8 host_fast_wakeup_support;
809} __packed;
810
811struct conf_roam_trigger_settings {
812 /*
813 * The minimum interval between two trigger events.
814 *
815 * Range: 0 - 60000 ms
816 */
817 u16 trigger_pacing;
818
819 /*
820 * The weight for rssi/beacon average calculation
821 *
822 * Range: 0 - 255
823 */
824 u8 avg_weight_rssi_beacon;
825
826 /*
827 * The weight for rssi/data frame average calculation
828 *
829 * Range: 0 - 255
830 */
831 u8 avg_weight_rssi_data;
832
833 /*
834 * The weight for snr/beacon average calculation
835 *
836 * Range: 0 - 255
837 */
838 u8 avg_weight_snr_beacon;
839
840 /*
841 * The weight for snr/data frame average calculation
842 *
843 * Range: 0 - 255
844 */
845 u8 avg_weight_snr_data;
846} __packed;
847
848struct conf_scan_settings {
849 /*
850 * The minimum time to wait on each channel for active scans
851 * This value will be used whenever there's a connected interface.
852 *
853 * Range: u32 tu/1000
854 */
855 u32 min_dwell_time_active;
856
857 /*
858 * The maximum time to wait on each channel for active scans
859 * This value will be currently used whenever there's a
860 * connected interface. It shouldn't exceed 30000 (~30ms) to avoid
861 * possible interference of voip traffic going on while scanning.
862 *
863 * Range: u32 tu/1000
864 */
865 u32 max_dwell_time_active;
866
867 /* The minimum time to wait on each channel for active scans
868 * when it's possible to have longer scan dwell times.
869 * Currently this is used whenever we're idle on all interfaces.
870 * Longer dwell times improve detection of networks within a
871 * single scan.
872 *
873 * Range: u32 tu/1000
874 */
875 u32 min_dwell_time_active_long;
876
877 /* The maximum time to wait on each channel for active scans
878 * when it's possible to have longer scan dwell times.
879 * See min_dwell_time_active_long
880 *
881 * Range: u32 tu/1000
882 */
883 u32 max_dwell_time_active_long;
884
885 /* time to wait on the channel for passive scans (in TU/1000) */
886 u32 dwell_time_passive;
887
888 /* time to wait on the channel for DFS scans (in TU/1000) */
889 u32 dwell_time_dfs;
890
891 /*
892 * Number of probe requests to transmit on each active scan channel
893 *
894 * Range: u8
895 */
896 u16 num_probe_reqs;
897
898 /*
899 * Scan trigger (split scan) timeout. The FW will split the scan
900 * operation into slices of the given time and allow the FW to schedule
901 * other tasks in between.
902 *
903 * Range: u32 Microsecs
904 */
905 u32 split_scan_timeout;
906} __packed;
907
908struct conf_sched_scan_settings {
909 /*
910 * The base time to wait on the channel for active scans (in TU/1000).
911 * The minimum dwell time is calculated according to this:
912 * min_dwell_time = base + num_of_probes_to_be_sent * delta_per_probe
913 * The maximum dwell time is calculated according to this:
914 * max_dwell_time = min_dwell_time + max_dwell_time_delta
915 */
916 u32 base_dwell_time;
917
918 /* The delta between the min dwell time and max dwell time for
919 * active scans (in TU/1000s). The max dwell time is used by the FW once
920 * traffic is detected on the channel.
921 */
922 u32 max_dwell_time_delta;
923
924 /* Delta added to min dwell time per each probe in 2.4 GHz (TU/1000) */
925 u32 dwell_time_delta_per_probe;
926
927 /* Delta added to min dwell time per each probe in 5 GHz (TU/1000) */
928 u32 dwell_time_delta_per_probe_5;
929
930 /* time to wait on the channel for passive scans (in TU/1000) */
931 u32 dwell_time_passive;
932
933 /* time to wait on the channel for DFS scans (in TU/1000) */
934 u32 dwell_time_dfs;
935
936 /* number of probe requests to send on each channel in active scans */
937 u8 num_probe_reqs;
938
939 /* RSSI threshold to be used for filtering */
940 s8 rssi_threshold;
941
942 /* SNR threshold to be used for filtering */
943 s8 snr_threshold;
944
945 /*
946 * number of short intervals scheduled scan cycles before
947 * switching to long intervals
948 */
949 u8 num_short_intervals;
950
951 /* interval between each long scheduled scan cycle (in ms) */
952 u16 long_interval;
953} __packed;
954
955struct conf_ht_setting {
956 u8 rx_ba_win_size;
957 u8 tx_ba_win_size;
958 u16 inactivity_timeout;
959
960 /* bitmap of enabled TIDs for TX BA sessions */
961 u8 tx_ba_tid_bitmap;
962} __packed;
963
964struct conf_memory_settings {
965 /* Number of stations supported in IBSS mode */
966 u8 num_stations;
967
968 /* Number of ssid profiles used in IBSS mode */
969 u8 ssid_profiles;
970
971 /* Number of memory buffers allocated to rx pool */
972 u8 rx_block_num;
973
974 /* Minimum number of blocks allocated to tx pool */
975 u8 tx_min_block_num;
976
977 /* Disable/Enable dynamic memory */
978 u8 dynamic_memory;
979
980 /*
981 * Minimum required free tx memory blocks in order to assure optimum
982 * performance
983 *
984 * Range: 0-120
985 */
986 u8 min_req_tx_blocks;
987
988 /*
989 * Minimum required free rx memory blocks in order to assure optimum
990 * performance
991 *
992 * Range: 0-120
993 */
994 u8 min_req_rx_blocks;
995
996 /*
997 * Minimum number of mem blocks (free+used) guaranteed for TX
998 *
999 * Range: 0-120
1000 */
1001 u8 tx_min;
1002} __packed;
1003
1004struct conf_fm_coex {
1005 u8 enable;
1006 u8 swallow_period;
1007 u8 n_divider_fref_set_1;
1008 u8 n_divider_fref_set_2;
1009 u16 m_divider_fref_set_1;
1010 u16 m_divider_fref_set_2;
1011 u32 coex_pll_stabilization_time;
1012 u16 ldo_stabilization_time;
1013 u8 fm_disturbed_band_margin;
1014 u8 swallow_clk_diff;
1015} __packed;
1016
1017struct conf_rx_streaming_settings {
1018 /*
1019 * RX Streaming duration (in msec) from last tx/rx
1020 *
1021 * Range: u32
1022 */
1023 u32 duration;
1024
1025 /*
1026 * Bitmap of tids to be polled during RX streaming.
1027 * (Note: it doesn't look like it really matters)
1028 *
1029 * Range: 0x1-0xff
1030 */
1031 u8 queues;
1032
1033 /*
1034 * RX Streaming interval.
1035 * (Note:this value is also used as the rx streaming timeout)
1036 * Range: 0 (disabled), 10 - 100
1037 */
1038 u8 interval;
1039
1040 /*
1041 * enable rx streaming also when there is no coex activity
1042 */
1043 u8 always;
1044} __packed;
1045
1046#define CONF_FWLOG_MIN_MEM_BLOCKS 2
1047#define CONF_FWLOG_MAX_MEM_BLOCKS 16
1048
1049struct conf_fwlog {
1050 /* Continuous or on-demand */
1051 u8 mode;
1052
1053 /*
1054 * Number of memory blocks dedicated for the FW logger
1055 *
1056 * Range: 2-16, or 0 to disable the FW logger
1057 */
1058 u8 mem_blocks;
1059
1060 /* Minimum log level threshold */
1061 u8 severity;
1062
1063 /* Include/exclude timestamps from the log messages */
1064 u8 timestamp;
1065
1066 /* See enum wl1271_fwlogger_output */
1067 u8 output;
1068
1069 /* Regulates the frequency of log messages */
1070 u8 threshold;
1071} __packed;
1072
1073#define ACX_RATE_MGMT_NUM_OF_RATES 13
1074struct conf_rate_policy_settings {
1075 u16 rate_retry_score;
1076 u16 per_add;
1077 u16 per_th1;
1078 u16 per_th2;
1079 u16 max_per;
1080 u8 inverse_curiosity_factor;
1081 u8 tx_fail_low_th;
1082 u8 tx_fail_high_th;
1083 u8 per_alpha_shift;
1084 u8 per_add_shift;
1085 u8 per_beta1_shift;
1086 u8 per_beta2_shift;
1087 u8 rate_check_up;
1088 u8 rate_check_down;
1089 u8 rate_retry_policy[ACX_RATE_MGMT_NUM_OF_RATES];
1090} __packed;
1091
1092struct conf_hangover_settings {
1093 u32 recover_time;
1094 u8 hangover_period;
1095 u8 dynamic_mode;
1096 u8 early_termination_mode;
1097 u8 max_period;
1098 u8 min_period;
1099 u8 increase_delta;
1100 u8 decrease_delta;
1101 u8 quiet_time;
1102 u8 increase_time;
1103 u8 window_size;
1104} __packed;
1105
1106struct conf_recovery_settings {
1107 /* BUG() on fw recovery */
1108 u8 bug_on_recovery;
1109
1110 /* Prevent HW recovery. FW will remain stuck. */
1111 u8 no_recovery;
1112} __packed;
1113
1114/*
1115 * The conf version consists of 4 bytes. The two MSB are the wlcore
1116 * version, the two LSB are the lower driver's private conf
1117 * version.
1118 */
1119#define WLCORE_CONF_VERSION (0x0007 << 16)
1120#define WLCORE_CONF_MASK 0xffff0000
1121#define WLCORE_CONF_SIZE (sizeof(struct wlcore_conf_header) + \
1122 sizeof(struct wlcore_conf))
1123
1124struct wlcore_conf_header {
1125 __le32 magic;
1126 __le32 version;
1127 __le32 checksum;
1128} __packed;
1129
1130struct wlcore_conf {
1131 struct conf_sg_settings sg;
1132 struct conf_rx_settings rx;
1133 struct conf_tx_settings tx;
1134 struct conf_conn_settings conn;
1135 struct conf_itrim_settings itrim;
1136 struct conf_pm_config_settings pm_config;
1137 struct conf_roam_trigger_settings roam_trigger;
1138 struct conf_scan_settings scan;
1139 struct conf_sched_scan_settings sched_scan;
1140 struct conf_ht_setting ht;
1141 struct conf_memory_settings mem;
1142 struct conf_fm_coex fm_coex;
1143 struct conf_rx_streaming_settings rx_streaming;
1144 struct conf_fwlog fwlog;
1145 struct conf_rate_policy_settings rate;
1146 struct conf_hangover_settings hangover;
1147 struct conf_recovery_settings recovery;
1148} __packed;
1149
1150struct wlcore_conf_file {
1151 struct wlcore_conf_header header;
1152 struct wlcore_conf core;
1153 u8 priv[];
1154} __packed;
1155
1156#endif