OSDN Git Service

wl1271: Add retry implementation for PSM entries
[uclinux-h8/linux.git] / drivers / net / wireless / wl12xx / wl1271_conf.h
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
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
68 struct conf_sg_settings {
69         /*
70          * Defines the PER threshold in PPM of the BT voice of which reaching
71          * this value will trigger raising the priority of the BT voice by
72          * the BT IP until next NFS sample interval time as defined in
73          * nfs_sample_interval.
74          *
75          * Unit: PER value in PPM (parts per million)
76          * #Error_packets / #Total_packets
77
78          * Range: u32
79          */
80         u32 per_threshold;
81
82         /*
83          * This value is an absolute time in micro-seconds to limit the
84          * maximum scan duration compensation while in SG
85          */
86         u32 max_scan_compensation_time;
87
88         /* Defines the PER threshold of the BT voice of which reaching this
89          * value will trigger raising the priority of the BT voice until next
90          * NFS sample interval time as defined in sample_interval.
91          *
92          * Unit: msec
93          * Range: 1-65000
94          */
95         u16 nfs_sample_interval;
96
97         /*
98          * Defines the load ratio for the BT.
99          * The WLAN ratio is: 100 - load_ratio
100          *
101          * Unit: Percent
102          * Range: 0-100
103          */
104         u8 load_ratio;
105
106         /*
107          * true - Co-ex is allowed to enter/exit P.S automatically and
108          *        transparently to the host
109          *
110          * false - Co-ex is disallowed to enter/exit P.S and will trigger an
111          *         event to the host to notify for the need to enter/exit P.S
112          *         due to BT change state
113          *
114          */
115         u8 auto_ps_mode;
116
117         /*
118          * This parameter defines the compensation percentage of num of probe
119          * requests in case scan is initiated during BT voice/BT ACL
120          * guaranteed link.
121          *
122          * Unit: Percent
123          * Range: 0-255 (0 - No compensation)
124          */
125         u8 probe_req_compensation;
126
127         /*
128          * This parameter defines the compensation percentage of scan window
129          * size in case scan is initiated during BT voice/BT ACL Guaranteed
130          * link.
131          *
132          * Unit: Percent
133          * Range: 0-255 (0 - No compensation)
134          */
135         u8 scan_window_compensation;
136
137         /*
138          * Defines the antenna configuration.
139          *
140          * Range: 0 - Single Antenna; 1 - Dual Antenna
141          */
142         u8 antenna_config;
143
144         /*
145          * The percent out of the Max consecutive beacon miss roaming trigger
146          * which is the threshold for raising the priority of beacon
147          * reception.
148          *
149          * Range: 1-100
150          * N = MaxConsecutiveBeaconMiss
151          * P = coexMaxConsecutiveBeaconMissPrecent
152          * Threshold = MIN( N-1, round(N * P / 100))
153          */
154         u8 beacon_miss_threshold;
155
156         /*
157          * The RX rate threshold below which rate adaptation is assumed to be
158          * occurring at the AP which will raise priority for ACTIVE_RX and RX
159          * SP.
160          *
161          * Range: HW_BIT_RATE_*
162          */
163         u32 rate_adaptation_threshold;
164
165         /*
166          * The SNR above which the RX rate threshold indicating AP rate
167          * adaptation is valid
168          *
169          * Range: -128 - 127
170          */
171         s8 rate_adaptation_snr;
172 };
173
174 enum conf_rx_queue_type {
175         CONF_RX_QUEUE_TYPE_LOW_PRIORITY,  /* All except the high priority */
176         CONF_RX_QUEUE_TYPE_HIGH_PRIORITY, /* Management and voice packets */
177 };
178
179 struct conf_rx_settings {
180         /*
181          * The maximum amount of time, in TU, before the
182          * firmware discards the MSDU.
183          *
184          * Range: 0 - 0xFFFFFFFF
185          */
186         u32 rx_msdu_life_time;
187
188         /*
189          * Packet detection threshold in the PHY.
190          *
191          * FIXME: details unknown.
192          */
193         u32 packet_detection_threshold;
194
195         /*
196          * The longest time the STA will wait to receive traffic from the AP
197          * after a PS-poll has been transmitted.
198          *
199          * Range: 0 - 200000
200          */
201         u16 ps_poll_timeout;
202         /*
203          * The longest time the STA will wait to receive traffic from the AP
204          * after a frame has been sent from an UPSD enabled queue.
205          *
206          * Range: 0 - 200000
207          */
208         u16 upsd_timeout;
209
210         /*
211          * The number of octets in an MPDU, below which an RTS/CTS
212          * handshake is not performed.
213          *
214          * Range: 0 - 4096
215          */
216         u16 rts_threshold;
217
218         /*
219          * The RX Clear Channel Assessment threshold in the PHY
220          * (the energy threshold).
221          *
222          * Range: ENABLE_ENERGY_D  == 0x140A
223          *        DISABLE_ENERGY_D == 0xFFEF
224          */
225         u16 rx_cca_threshold;
226
227         /*
228          * Occupied Rx mem-blocks number which requires interrupting the host
229          * (0 = no buffering, 0xffff = disabled).
230          *
231          * Range: u16
232          */
233         u16 irq_blk_threshold;
234
235         /*
236          * Rx packets number which requires interrupting the host
237          * (0 = no buffering).
238          *
239          * Range: u16
240          */
241         u16 irq_pkt_threshold;
242
243         /*
244          * Max time in msec the FW may delay RX-Complete interrupt.
245          *
246          * Range: 1 - 100
247          */
248         u16 irq_timeout;
249
250         /*
251          * The RX queue type.
252          *
253          * Range: RX_QUEUE_TYPE_RX_LOW_PRIORITY, RX_QUEUE_TYPE_RX_HIGH_PRIORITY,
254          */
255         u8 queue_type;
256 };
257
258 #define CONF_TX_MAX_RATE_CLASSES       8
259
260 #define CONF_TX_RATE_MASK_UNSPECIFIED  0
261 #define CONF_TX_RATE_MASK_ALL          0x1eff
262 #define CONF_TX_RATE_RETRY_LIMIT       10
263
264 struct conf_tx_rate_class {
265
266         /*
267          * The rates enabled for this rate class.
268          *
269          * Range: CONF_HW_BIT_RATE_* bit mask
270          */
271         u32 enabled_rates;
272
273         /*
274          * The dot11 short retry limit used for TX retries.
275          *
276          * Range: u8
277          */
278         u8 short_retry_limit;
279
280         /*
281          * The dot11 long retry limit used for TX retries.
282          *
283          * Range: u8
284          */
285         u8 long_retry_limit;
286
287         /*
288          * Flags controlling the attributes of TX transmission.
289          *
290          * Range: bit 0: Truncate - when set, FW attempts to send a frame stop
291          *               when the total valid per-rate attempts have
292          *               been exhausted; otherwise transmissions
293          *               will continue at the lowest available rate
294          *               until the appropriate one of the
295          *               short_retry_limit, long_retry_limit,
296          *               dot11_max_transmit_msdu_life_time, or
297          *               max_tx_life_time, is exhausted.
298          *            1: Preamble Override - indicates if the preamble type
299          *               should be used in TX.
300          *            2: Preamble Type - the type of the preamble to be used by
301          *               the policy (0 - long preamble, 1 - short preamble.
302          */
303         u8 aflags;
304 };
305
306 #define CONF_TX_MAX_AC_COUNT 4
307
308 /* Slot number setting to start transmission at PIFS interval */
309 #define CONF_TX_AIFS_PIFS 1
310 /* Slot number setting to start transmission at DIFS interval normal
311  * DCF access */
312 #define CONF_TX_AIFS_DIFS 2
313
314
315 enum conf_tx_ac {
316         CONF_TX_AC_BE = 0,         /* best effort / legacy */
317         CONF_TX_AC_BK = 1,         /* background */
318         CONF_TX_AC_VI = 2,         /* video */
319         CONF_TX_AC_VO = 3,         /* voice */
320         CONF_TX_AC_CTS2SELF = 4,   /* fictious AC, follows AC_VO */
321         CONF_TX_AC_ANY_TID = 0x1f
322 };
323
324 struct conf_tx_ac_category {
325         /*
326          * The AC class identifier.
327          *
328          * Range: enum conf_tx_ac
329          */
330         u8 ac;
331
332         /*
333          * The contention window minimum size (in slots) for the access
334          * class.
335          *
336          * Range: u8
337          */
338         u8 cw_min;
339
340         /*
341          * The contention window maximum size (in slots) for the access
342          * class.
343          *
344          * Range: u8
345          */
346         u16 cw_max;
347
348         /*
349          * The AIF value (in slots) for the access class.
350          *
351          * Range: u8
352          */
353         u8 aifsn;
354
355         /*
356          * The TX Op Limit (in microseconds) for the access class.
357          *
358          * Range: u16
359          */
360         u16 tx_op_limit;
361 };
362
363 #define CONF_TX_MAX_TID_COUNT 7
364
365 enum {
366         CONF_CHANNEL_TYPE_DCF = 0,   /* DC/LEGACY*/
367         CONF_CHANNEL_TYPE_EDCF = 1,  /* EDCA*/
368         CONF_CHANNEL_TYPE_HCCA = 2,  /* HCCA*/
369 };
370
371 enum {
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
378 enum {
379         CONF_ACK_POLICY_LEGACY = 0,
380         CONF_ACK_POLICY_NO_ACK = 1,
381         CONF_ACK_POLICY_BLOCK = 2,
382 };
383
384
385 struct 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 };
393
394 struct 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.)
405          */
406         struct conf_tx_rate_class 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          * 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
444 enum {
445         CONF_WAKE_UP_EVENT_BEACON    = 0x01, /* Wake on every Beacon*/
446         CONF_WAKE_UP_EVENT_DTIM      = 0x02, /* Wake on every DTIM*/
447         CONF_WAKE_UP_EVENT_N_DTIM    = 0x04, /* Wake every Nth DTIM */
448         CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */
449         CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F
450 };
451
452 #define CONF_MAX_BCN_FILT_IE_COUNT 32
453
454 #define CONF_BCN_RULE_PASS_ON_CHANGE         BIT(0)
455 #define CONF_BCN_RULE_PASS_ON_APPEARANCE     BIT(1)
456
457 #define CONF_BCN_IE_OUI_LEN    3
458 #define CONF_BCN_IE_VER_LEN    2
459
460 struct conf_bcn_filt_rule {
461         /*
462          * IE number to which to associate a rule.
463          *
464          * Range: u8
465          */
466         u8 ie;
467
468         /*
469          * Rule to associate with the specific ie.
470          *
471          * Range: CONF_BCN_RULE_PASS_ON_*
472          */
473         u8 rule;
474
475         /*
476          * OUI for the vendor specifie IE (221)
477          */
478         u8 oui[CONF_BCN_IE_OUI_LEN];
479
480         /*
481          * Type for the vendor specifie IE (221)
482          */
483         u8 type;
484
485         /*
486          * Version for the vendor specifie IE (221)
487          */
488         u8 version[CONF_BCN_IE_VER_LEN];
489 };
490
491 #define CONF_MAX_RSSI_SNR_TRIGGERS 8
492
493 enum {
494         CONF_TRIG_METRIC_RSSI_BEACON = 0,
495         CONF_TRIG_METRIC_RSSI_DATA,
496         CONF_TRIG_METRIC_SNR_BEACON,
497         CONF_TRIG_METRIC_SNR_DATA
498 };
499
500 enum {
501         CONF_TRIG_EVENT_TYPE_LEVEL = 0,
502         CONF_TRIG_EVENT_TYPE_EDGE
503 };
504
505 enum {
506         CONF_TRIG_EVENT_DIR_LOW = 0,
507         CONF_TRIG_EVENT_DIR_HIGH,
508         CONF_TRIG_EVENT_DIR_BIDIR
509 };
510
511
512 struct conf_sig_trigger {
513         /*
514          * The RSSI / SNR threshold value.
515          *
516          * FIXME: what is the range?
517          */
518         s16 threshold;
519
520         /*
521          * Minimum delay between two trigger events for this trigger in ms.
522          *
523          * Range: 0 - 60000
524          */
525         u16 pacing;
526
527         /*
528          * The measurement data source for this trigger.
529          *
530          * Range: CONF_TRIG_METRIC_*
531          */
532         u8 metric;
533
534         /*
535          * The trigger type of this trigger.
536          *
537          * Range: CONF_TRIG_EVENT_TYPE_*
538          */
539         u8 type;
540
541         /*
542          * The direction of the trigger.
543          *
544          * Range: CONF_TRIG_EVENT_DIR_*
545          */
546         u8 direction;
547
548         /*
549          * Hysteresis range of the trigger around the threshold (in dB)
550          *
551          * Range: u8
552          */
553         u8 hysteresis;
554
555         /*
556          * Index of the trigger rule.
557          *
558          * Range: 0 - CONF_MAX_RSSI_SNR_TRIGGERS-1
559          */
560         u8 index;
561
562         /*
563          * Enable / disable this rule (to use for clearing rules.)
564          *
565          * Range: 1 - Enabled, 2 - Not enabled
566          */
567         u8 enable;
568 };
569
570 struct conf_sig_weights {
571
572         /*
573          * RSSI from beacons average weight.
574          *
575          * Range: u8
576          */
577         u8 rssi_bcn_avg_weight;
578
579         /*
580          * RSSI from data average weight.
581          *
582          * Range: u8
583          */
584         u8 rssi_pkt_avg_weight;
585
586         /*
587          * SNR from beacons average weight.
588          *
589          * Range: u8
590          */
591         u8 snr_bcn_avg_weight;
592
593         /*
594          * SNR from data average weight.
595          *
596          * Range: u8
597          */
598         u8 snr_pkt_avg_weight;
599 };
600
601 enum conf_bcn_filt_mode {
602         CONF_BCN_FILT_MODE_DISABLED = 0,
603         CONF_BCN_FILT_MODE_ENABLED = 1
604 };
605
606 enum conf_bet_mode {
607         CONF_BET_MODE_DISABLE = 0,
608         CONF_BET_MODE_ENABLE = 1,
609 };
610
611 struct conf_conn_settings {
612         /*
613          * Firmware wakeup conditions configuration. The host may set only
614          * one bit.
615          *
616          * Range: CONF_WAKE_UP_EVENT_*
617          */
618         u8 wake_up_event;
619
620         /*
621          * Listen interval for beacons or Dtims.
622          *
623          * Range: 0 for beacon and Dtim wakeup
624          *        1-10 for x Dtims
625          *        1-255 for x beacons
626          */
627         u8 listen_interval;
628
629         /*
630          * Enable or disable the beacon filtering.
631          *
632          * Range: CONF_BCN_FILT_MODE_*
633          */
634         enum conf_bcn_filt_mode bcn_filt_mode;
635
636         /*
637          * Configure Beacon filter pass-thru rules.
638          */
639         u8 bcn_filt_ie_count;
640         struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT];
641
642         /*
643          * The number of consequtive beacons to lose, before the firmware
644          * becomes out of synch.
645          *
646          * Range: u32
647          */
648         u32 synch_fail_thold;
649
650         /*
651          * After out-of-synch, the number of TU's to wait without a further
652          * received beacon (or probe response) before issuing the BSS_EVENT_LOSE
653          * event.
654          *
655          * Range: u32
656          */
657         u32 bss_lose_timeout;
658
659         /*
660          * Beacon receive timeout.
661          *
662          * Range: u32
663          */
664         u32 beacon_rx_timeout;
665
666         /*
667          * Broadcast receive timeout.
668          *
669          * Range: u32
670          */
671         u32 broadcast_timeout;
672
673         /*
674          * Enable/disable reception of broadcast packets in power save mode
675          *
676          * Range: 1 - enable, 0 - disable
677          */
678         u8 rx_broadcast_in_ps;
679
680         /*
681          * Consequtive PS Poll failures before sending event to driver
682          *
683          * Range: u8
684          */
685         u8 ps_poll_threshold;
686
687         /*
688          * Configuration of signal (rssi/snr) triggers.
689          */
690         u8 sig_trigger_count;
691         struct conf_sig_trigger sig_trigger[CONF_MAX_RSSI_SNR_TRIGGERS];
692
693         /*
694          * Configuration of signal average weights.
695          */
696         struct conf_sig_weights sig_weights;
697
698         /*
699          * Specifies if beacon early termination procedure is enabled or
700          * disabled.
701          *
702          * Range: CONF_BET_MODE_*
703          */
704         u8 bet_enable;
705
706         /*
707          * Specifies the maximum number of consecutive beacons that may be
708          * early terminated. After this number is reached at least one full
709          * beacon must be correctly received in FW before beacon ET
710          * resumes.
711          *
712          * Range 0 - 255
713          */
714         u8 bet_max_consecutive;
715
716         /*
717          * Specifies the maximum number of times to try PSM entry if it fails
718          * (if sending the appropriate null-func message fails.)
719          *
720          * Range 0 - 255
721          */
722         u8 psm_entry_retries;
723 };
724
725 #define CONF_SR_ERR_TBL_MAX_VALUES   14
726
727 struct conf_mart_reflex_err_table {
728         /*
729          * Length of the error table values table.
730          *
731          * Range: 0 - CONF_SR_ERR_TBL_MAX_VALUES
732          */
733         u8 len;
734
735         /*
736          * Smart Reflex error table upper limit.
737          *
738          * Range: s8
739          */
740         s8 upper_limit;
741
742         /*
743          * Smart Reflex error table values.
744          *
745          * Range: s8
746          */
747         s8 values[CONF_SR_ERR_TBL_MAX_VALUES];
748 };
749
750 enum {
751         CONF_REF_CLK_19_2_E,
752         CONF_REF_CLK_26_E,
753         CONF_REF_CLK_38_4_E,
754         CONF_REF_CLK_52_E
755 };
756
757 enum single_dual_band_enum {
758         CONF_SINGLE_BAND,
759         CONF_DUAL_BAND
760 };
761
762 struct conf_general_parms {
763         /*
764          * RF Reference Clock type / speed
765          *
766          * Range: CONF_REF_CLK_*
767          */
768         u8 ref_clk;
769
770         /*
771          * Settling time of the reference clock after boot.
772          *
773          * Range: u8
774          */
775         u8 settling_time;
776
777         /*
778          * Flag defining whether clock is valid on wakeup.
779          *
780          * Range: 0 - not valid on wakeup, 1 - valid on wakeup
781          */
782         u8 clk_valid_on_wakeup;
783
784         /*
785          * DC-to-DC mode.
786          *
787          * Range: Unknown
788          */
789         u8 dc2dcmode;
790
791         /*
792          * Flag defining whether used as single or dual-band.
793          *
794          * Range: CONF_SINGLE_BAND, CONF_DUAL_BAND
795          */
796         u8 single_dual_band;
797
798         /*
799          * TX bip fem autodetect flag.
800          *
801          * Range: Unknown
802          */
803         u8 tx_bip_fem_autodetect;
804
805         /*
806          * TX bip gem manufacturer.
807          *
808          * Range: Unknown
809          */
810         u8 tx_bip_fem_manufacturer;
811
812         /*
813          * Settings flags.
814          *
815          * Range: Unknown
816          */
817         u8 settings;
818 };
819
820 #define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15
821 #define CONF_NUMBER_OF_SUB_BANDS_5  7
822 #define CONF_NUMBER_OF_RATE_GROUPS  6
823 #define CONF_NUMBER_OF_CHANNELS_2_4 14
824 #define CONF_NUMBER_OF_CHANNELS_5   35
825
826 struct conf_radio_parms {
827         /*
828          * Static radio parameters for 2.4GHz
829          *
830          * Range: unknown
831          */
832         u8 rx_trace_loss;
833         u8 tx_trace_loss;
834         s8 rx_rssi_and_proc_compens[CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE];
835
836         /*
837          * Static radio parameters for 5GHz
838          *
839          * Range: unknown
840          */
841         u8 rx_trace_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
842         u8 tx_trace_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
843         s8 rx_rssi_and_proc_compens_5[CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE];
844
845         /*
846          * Dynamic radio parameters for 2.4GHz
847          *
848          * Range: unknown
849          */
850         s16 tx_ref_pd_voltage;
851         s8  tx_ref_power;
852         s8  tx_offset_db;
853
854         s8  tx_rate_limits_normal[CONF_NUMBER_OF_RATE_GROUPS];
855         s8  tx_rate_limits_degraded[CONF_NUMBER_OF_RATE_GROUPS];
856
857         s8  tx_channel_limits_11b[CONF_NUMBER_OF_CHANNELS_2_4];
858         s8  tx_channel_limits_ofdm[CONF_NUMBER_OF_CHANNELS_2_4];
859         s8  tx_pdv_rate_offsets[CONF_NUMBER_OF_RATE_GROUPS];
860
861         u8  tx_ibias[CONF_NUMBER_OF_RATE_GROUPS];
862         u8  rx_fem_insertion_loss;
863
864         /*
865          * Dynamic radio parameters for 5GHz
866          *
867          * Range: unknown
868          */
869         s16 tx_ref_pd_voltage_5[CONF_NUMBER_OF_SUB_BANDS_5];
870         s8  tx_ref_power_5[CONF_NUMBER_OF_SUB_BANDS_5];
871         s8  tx_offset_db_5[CONF_NUMBER_OF_SUB_BANDS_5];
872
873         s8  tx_rate_limits_normal_5[CONF_NUMBER_OF_RATE_GROUPS];
874         s8  tx_rate_limits_degraded_5[CONF_NUMBER_OF_RATE_GROUPS];
875
876         s8  tx_channel_limits_ofdm_5[CONF_NUMBER_OF_CHANNELS_5];
877         s8  tx_pdv_rate_offsets_5[CONF_NUMBER_OF_RATE_GROUPS];
878
879         /* FIXME: this is inconsistent with the types for 2.4GHz */
880         s8  tx_ibias_5[CONF_NUMBER_OF_RATE_GROUPS];
881         s8  rx_fem_insertion_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
882 };
883
884 #define CONF_SR_ERR_TBL_COUNT        3
885
886 struct conf_init_settings {
887         /*
888          * Configure Smart Reflex error table values.
889          */
890         struct conf_mart_reflex_err_table sr_err_tbl[CONF_SR_ERR_TBL_COUNT];
891
892         /*
893          * Smart Reflex enable flag.
894          *
895          * Range: 1 - Smart Reflex enabled, 0 - Smart Reflex disabled
896          */
897         u8 sr_enable;
898
899         /*
900          * Configure general parameters.
901          */
902         struct conf_general_parms genparam;
903
904         /*
905          * Configure radio parameters.
906          */
907         struct conf_radio_parms radioparam;
908
909 };
910
911 struct conf_drv_settings {
912         struct conf_sg_settings sg;
913         struct conf_rx_settings rx;
914         struct conf_tx_settings tx;
915         struct conf_conn_settings conn;
916         struct conf_init_settings init;
917 };
918
919 #endif