2 * This file is part of wl18xx
4 * Copyright (C) 2011 Texas Instruments Inc.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * version 2 as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22 #ifndef __WL18XX_CONF_H__
23 #define __WL18XX_CONF_H__
25 #define WL18XX_CONF_MAGIC 0x10e100ca
26 #define WL18XX_CONF_VERSION (WLCORE_CONF_VERSION | 0x0007)
27 #define WL18XX_CONF_MASK 0x0000ffff
28 #define WL18XX_CONF_SIZE (WLCORE_CONF_SIZE + \
29 sizeof(struct wl18xx_priv_conf))
31 #define NUM_OF_CHANNELS_11_ABG 150
32 #define NUM_OF_CHANNELS_11_P 7
33 #define SRF_TABLE_LEN 16
34 #define PIN_MUXING_SIZE 2
35 #define WL18XX_TRACE_LOSS_GAPS_TX 10
36 #define WL18XX_TRACE_LOSS_GAPS_RX 18
38 struct wl18xx_mac_and_phy_params
{
42 u8 enable_tx_low_pwr_on_siso_rdl
;
46 u8 low_band_component
;
48 /* Bit 0: One Hot, Bit 1: Control Enable, Bit 2: 1.8V, Bit 3: 3V */
49 u8 low_band_component_type
;
51 u8 high_band_component
;
53 /* Bit 0: One Hot, Bit 1: Control Enable, Bit 2: 1.8V, Bit 3: 3V */
54 u8 high_band_component_type
;
55 u8 number_of_assembled_ant2_4
;
56 u8 number_of_assembled_ant5
;
57 u8 pin_muxing_platform_options
[PIN_MUXING_SIZE
];
62 u8 srf1
[SRF_TABLE_LEN
];
63 u8 srf2
[SRF_TABLE_LEN
];
64 u8 srf3
[SRF_TABLE_LEN
];
66 u8 sdio_configuration
;
69 u8 per_chan_pwr_limit_arr_11abg
[NUM_OF_CHANNELS_11_ABG
];
70 u8 pwr_limit_reference_11_abg
;
71 u8 per_chan_pwr_limit_arr_11p
[NUM_OF_CHANNELS_11_P
];
72 u8 pwr_limit_reference_11p
;
74 u8 per_chan_bo_mode_11_abg
[13];
75 u8 per_chan_bo_mode_11_p
[4];
76 u8 primary_clock_setting_time
;
77 u8 clock_valid_on_wake_up
;
78 u8 secondary_clock_setting_time
;
80 /* enable point saturation */
82 /* low/medium/high Tx power in dBm for STA-HP BG */
86 s8 per_sub_band_tx_trace_loss
[WL18XX_TRACE_LOSS_GAPS_TX
];
87 s8 per_sub_band_rx_trace_loss
[WL18XX_TRACE_LOSS_GAPS_RX
];
89 /* low/medium/high Tx power in dBm for other role */
92 s8 high_power_val_2nd
;
98 /* Default - use MIMO, fallback to SISO20 */
101 /* Wide - use SISO40 */
108 struct wl18xx_ht_settings
{
109 /* DEFAULT / WIDE / SISO20 */
113 struct conf_ap_sleep_settings
{
114 /* Duty Cycle (20-80% of staying Awake) for IDLE AP
118 /* Duty Cycle (20-80% of staying Awake) for Connected AP
121 u8 connected_duty_cycle
;
122 /* Maximum stations that are allowed to be connected to AP
125 u8 max_stations_thresh
;
126 /* Timeout till enabling the Sleep Mechanism after data stops
132 struct wl18xx_priv_conf
{
133 /* Module params structures */
134 struct wl18xx_ht_settings ht
;
136 /* this structure is copied wholesale to FW */
137 struct wl18xx_mac_and_phy_params phy
;
139 struct conf_ap_sleep_settings ap_sleep
;
142 enum wl18xx_sg_params
{
143 WL18XX_CONF_SG_PARAM_0
= 0,
145 /* Configuration Parameters */
146 WL18XX_CONF_SG_ANTENNA_CONFIGURATION
,
147 WL18XX_CONF_SG_ZIGBEE_COEX
,
148 WL18XX_CONF_SG_TIME_SYNC
,
150 WL18XX_CONF_SG_PARAM_4
,
151 WL18XX_CONF_SG_PARAM_5
,
152 WL18XX_CONF_SG_PARAM_6
,
153 WL18XX_CONF_SG_PARAM_7
,
154 WL18XX_CONF_SG_PARAM_8
,
155 WL18XX_CONF_SG_PARAM_9
,
156 WL18XX_CONF_SG_PARAM_10
,
157 WL18XX_CONF_SG_PARAM_11
,
158 WL18XX_CONF_SG_PARAM_12
,
159 WL18XX_CONF_SG_PARAM_13
,
160 WL18XX_CONF_SG_PARAM_14
,
161 WL18XX_CONF_SG_PARAM_15
,
162 WL18XX_CONF_SG_PARAM_16
,
163 WL18XX_CONF_SG_PARAM_17
,
164 WL18XX_CONF_SG_PARAM_18
,
165 WL18XX_CONF_SG_PARAM_19
,
166 WL18XX_CONF_SG_PARAM_20
,
167 WL18XX_CONF_SG_PARAM_21
,
168 WL18XX_CONF_SG_PARAM_22
,
169 WL18XX_CONF_SG_PARAM_23
,
170 WL18XX_CONF_SG_PARAM_24
,
171 WL18XX_CONF_SG_PARAM_25
,
173 /* Active Scan Parameters */
174 WL18XX_CONF_SG_AUTO_SCAN_PROBE_REQ
,
175 WL18XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3
,
177 WL18XX_CONF_SG_PARAM_28
,
179 /* Passive Scan Parameters */
180 WL18XX_CONF_SG_PARAM_29
,
181 WL18XX_CONF_SG_PARAM_30
,
182 WL18XX_CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3
,
184 /* Passive Scan in Dual Antenna Parameters */
185 WL18XX_CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN
,
186 WL18XX_CONF_SG_BEACON_HV3_COLL_TH_IN_PASSIVE_SCAN
,
187 WL18XX_CONF_SG_TX_RX_PROTECT_BW_IN_PASSIVE_SCAN
,
189 /* General Parameters */
190 WL18XX_CONF_SG_STA_FORCE_PS_IN_BT_SCO
,
191 WL18XX_CONF_SG_PARAM_36
,
192 WL18XX_CONF_SG_BEACON_MISS_PERCENT
,
193 WL18XX_CONF_SG_PARAM_38
,
195 WL18XX_CONF_SG_UNUSED
,
196 WL18XX_CONF_SG_ADAPTIVE_RXT_TXT
,
197 WL18XX_CONF_SG_GENERAL_USAGE_BIT_MAP
,
198 WL18XX_CONF_SG_HV3_MAX_SERVED
,
199 WL18XX_CONF_SG_PARAM_44
,
200 WL18XX_CONF_SG_PARAM_45
,
201 WL18XX_CONF_SG_CONSECUTIVE_CTS_THRESHOLD
,
202 WL18XX_CONF_SG_GEMINI_PARAM_47
,
203 WL18XX_CONF_SG_STA_CONNECTION_PROTECTION_TIME
,
206 WL18XX_CONF_SG_AP_BEACON_MISS_TX
,
207 WL18XX_CONF_SG_PARAM_50
,
208 WL18XX_CONF_SG_AP_BEACON_WINDOW_INTERVAL
,
209 WL18XX_CONF_SG_AP_CONNECTION_PROTECTION_TIME
,
210 WL18XX_CONF_SG_PARAM_53
,
211 WL18XX_CONF_SG_PARAM_54
,
213 /* CTS Diluting Parameters */
214 WL18XX_CONF_SG_CTS_DILUTED_BAD_RX_PACKETS_TH
,
215 WL18XX_CONF_SG_CTS_CHOP_IN_DUAL_ANT_SCO_MASTER
,
217 WL18XX_CONF_SG_TEMP_PARAM_1
,
218 WL18XX_CONF_SG_TEMP_PARAM_2
,
219 WL18XX_CONF_SG_TEMP_PARAM_3
,
220 WL18XX_CONF_SG_TEMP_PARAM_4
,
221 WL18XX_CONF_SG_TEMP_PARAM_5
,
222 WL18XX_CONF_SG_TEMP_PARAM_6
,
223 WL18XX_CONF_SG_TEMP_PARAM_7
,
224 WL18XX_CONF_SG_TEMP_PARAM_8
,
225 WL18XX_CONF_SG_TEMP_PARAM_9
,
226 WL18XX_CONF_SG_TEMP_PARAM_10
,
228 WL18XX_CONF_SG_PARAMS_MAX
,
229 WL18XX_CONF_SG_PARAMS_ALL
= 0xff
232 #endif /* __WL18XX_CONF_H__ */