2 * This file is part of wl12xx
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 __WL12XX_CONF_H__
23 #define __WL12XX_CONF_H__
25 /* these are number of channels on the band divided by two, rounded up */
26 #define CONF_TX_PWR_COMPENSATION_LEN_2 7
27 #define CONF_TX_PWR_COMPENSATION_LEN_5 18
29 struct wl12xx_conf_rf
{
31 * Per channel power compensation for 2.4GHz
35 u8 tx_per_channel_power_compensation_2
[CONF_TX_PWR_COMPENSATION_LEN_2
];
38 * Per channel power compensation for 5GHz
42 u8 tx_per_channel_power_compensation_5
[CONF_TX_PWR_COMPENSATION_LEN_5
];
45 struct wl12xx_priv_conf
{
46 struct wl12xx_conf_rf rf
;
47 struct conf_memory_settings mem_wl127x
;
50 enum wl12xx_sg_params
{
52 * Configure the min and max time BT gains the antenna
53 * in WLAN / BT master basic rate
57 WL12XX_CONF_SG_ACL_BT_MASTER_MIN_BR
= 0,
58 WL12XX_CONF_SG_ACL_BT_MASTER_MAX_BR
,
61 * Configure the min and max time BT gains the antenna
62 * in WLAN / BT slave basic rate
66 WL12XX_CONF_SG_ACL_BT_SLAVE_MIN_BR
,
67 WL12XX_CONF_SG_ACL_BT_SLAVE_MAX_BR
,
70 * Configure the min and max time BT gains the antenna
71 * in WLAN / BT master EDR
75 WL12XX_CONF_SG_ACL_BT_MASTER_MIN_EDR
,
76 WL12XX_CONF_SG_ACL_BT_MASTER_MAX_EDR
,
79 * Configure the min and max time BT gains the antenna
80 * in WLAN / BT slave EDR
84 WL12XX_CONF_SG_ACL_BT_SLAVE_MIN_EDR
,
85 WL12XX_CONF_SG_ACL_BT_SLAVE_MAX_EDR
,
88 * The maximum time WLAN can gain the antenna
89 * in WLAN PSM / BT master/slave BR
93 WL12XX_CONF_SG_ACL_WLAN_PS_MASTER_BR
,
94 WL12XX_CONF_SG_ACL_WLAN_PS_SLAVE_BR
,
97 * The maximum time WLAN can gain the antenna
98 * in WLAN PSM / BT master/slave EDR
100 * Range: 0 - 255 (ms)
102 WL12XX_CONF_SG_ACL_WLAN_PS_MASTER_EDR
,
103 WL12XX_CONF_SG_ACL_WLAN_PS_SLAVE_EDR
,
105 /* TODO: explain these values */
106 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_BR
,
107 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_BR
,
108 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_BR
,
109 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_BR
,
110 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_EDR
,
111 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_EDR
,
112 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_EDR
,
113 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_EDR
,
115 WL12XX_CONF_SG_ACL_ACTIVE_SCAN_WLAN_BR
,
116 WL12XX_CONF_SG_ACL_ACTIVE_SCAN_WLAN_EDR
,
117 WL12XX_CONF_SG_ACL_PASSIVE_SCAN_BT_BR
,
118 WL12XX_CONF_SG_ACL_PASSIVE_SCAN_WLAN_BR
,
119 WL12XX_CONF_SG_ACL_PASSIVE_SCAN_BT_EDR
,
120 WL12XX_CONF_SG_ACL_PASSIVE_SCAN_WLAN_EDR
,
123 * Compensation percentage of probe requests when scan initiated
124 * during BT voice/ACL link.
128 WL12XX_CONF_SG_AUTO_SCAN_PROBE_REQ
,
131 * Compensation percentage of probe requests when active scan initiated
136 WL12XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3
,
139 * Compensation percentage of WLAN active scan window if initiated
142 * Range: 0 - 1000 (%)
144 WL12XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP
,
147 * Compensation percentage of WLAN passive scan window if initiated
150 * Range: 0 - 1000 (%)
152 WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_A2DP_BR
,
155 * Compensation percentage of WLAN passive scan window if initiated
158 * Range: 0 - 1000 (%)
160 WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_A2DP_EDR
,
163 * Compensation percentage of WLAN passive scan window if initiated
166 * Range: 0 - 1000 (%)
168 WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_HV3
,
170 /* TODO: explain these values */
171 WL12XX_CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN
,
172 WL12XX_CONF_SG_BCN_HV3_COLL_THR_IN_PASSIVE_SCAN
,
173 WL12XX_CONF_SG_TX_RX_PROTECT_BW_IN_PASSIVE_SCAN
,
176 * Defines whether the SG will force WLAN host to enter/exit PSM
178 * Range: 1 - SG can force, 0 - host handles PSM
180 WL12XX_CONF_SG_STA_FORCE_PS_IN_BT_SCO
,
183 * Defines antenna configuration (single/dual antenna)
185 * Range: 0 - single antenna, 1 - dual antenna
187 WL12XX_CONF_SG_ANTENNA_CONFIGURATION
,
190 * The threshold (percent) of max consecutive beacon misses before
191 * increasing priority of beacon reception.
195 WL12XX_CONF_SG_BEACON_MISS_PERCENT
,
198 * Protection time of the DHCP procedure.
200 * Range: 0 - 100000 (ms)
202 WL12XX_CONF_SG_DHCP_TIME
,
205 * RX guard time before the beginning of a new BT voice frame during
206 * which no new WLAN trigger frame is transmitted.
208 * Range: 0 - 100000 (us)
213 * TX guard time before the beginning of a new BT voice frame during
214 * which no new WLAN frame is transmitted.
216 * Range: 0 - 100000 (us)
221 * Enable adaptive RXT/TXT algorithm. If disabled, the host values
224 * Range: 0 - disable, 1 - enable
226 WL12XX_CONF_SG_ADAPTIVE_RXT_TXT
,
228 /* TODO: explain this value */
229 WL12XX_CONF_SG_GENERAL_USAGE_BIT_MAP
,
232 * Number of consecutive BT voice frames not interrupted by WLAN
236 WL12XX_CONF_SG_HV3_MAX_SERVED
,
239 * The used WLAN legacy service period during active BT ACL link
241 * Range: 0 - 255 (ms)
243 WL12XX_CONF_SG_PS_POLL_TIMEOUT
,
246 * The used WLAN UPSD service period during active BT ACL link
248 * Range: 0 - 255 (ms)
250 WL12XX_CONF_SG_UPSD_TIMEOUT
,
252 WL12XX_CONF_SG_CONSECUTIVE_CTS_THRESHOLD
,
253 WL12XX_CONF_SG_STA_RX_WINDOW_AFTER_DTIM
,
254 WL12XX_CONF_SG_STA_CONNECTION_PROTECTION_TIME
,
257 WL12XX_CONF_AP_BEACON_MISS_TX
,
258 WL12XX_CONF_AP_RX_WINDOW_AFTER_BEACON
,
259 WL12XX_CONF_AP_BEACON_WINDOW_INTERVAL
,
260 WL12XX_CONF_AP_CONNECTION_PROTECTION_TIME
,
261 WL12XX_CONF_AP_BT_ACL_VAL_BT_SERVE_TIME
,
262 WL12XX_CONF_AP_BT_ACL_VAL_WL_SERVE_TIME
,
264 /* CTS Diluting params */
265 WL12XX_CONF_SG_CTS_DILUTED_BAD_RX_PACKETS_TH
,
266 WL12XX_CONF_SG_CTS_CHOP_IN_DUAL_ANT_SCO_MASTER
,
268 WL12XX_CONF_SG_TEMP_PARAM_1
,
269 WL12XX_CONF_SG_TEMP_PARAM_2
,
270 WL12XX_CONF_SG_TEMP_PARAM_3
,
271 WL12XX_CONF_SG_TEMP_PARAM_4
,
272 WL12XX_CONF_SG_TEMP_PARAM_5
,
273 WL12XX_CONF_SG_TEMP_PARAM_6
,
274 WL12XX_CONF_SG_TEMP_PARAM_7
,
275 WL12XX_CONF_SG_TEMP_PARAM_8
,
276 WL12XX_CONF_SG_TEMP_PARAM_9
,
277 WL12XX_CONF_SG_TEMP_PARAM_10
,
279 WL12XX_CONF_SG_PARAMS_MAX
,
280 WL12XX_CONF_SG_PARAMS_ALL
= 0xff
283 #endif /* __WL12XX_CONF_H__ */