1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * This file is part of wl12xx
5 * Copyright (C) 2011 Texas Instruments Inc.
8 #ifndef __WL12XX_CONF_H__
9 #define __WL12XX_CONF_H__
11 /* these are number of channels on the band divided by two, rounded up */
12 #define CONF_TX_PWR_COMPENSATION_LEN_2 7
13 #define CONF_TX_PWR_COMPENSATION_LEN_5 18
15 struct wl12xx_conf_rf
{
17 * Per channel power compensation for 2.4GHz
21 u8 tx_per_channel_power_compensation_2
[CONF_TX_PWR_COMPENSATION_LEN_2
];
24 * Per channel power compensation for 5GHz
28 u8 tx_per_channel_power_compensation_5
[CONF_TX_PWR_COMPENSATION_LEN_5
];
31 struct wl12xx_priv_conf
{
32 struct wl12xx_conf_rf rf
;
33 struct conf_memory_settings mem_wl127x
;
36 enum wl12xx_sg_params
{
38 * Configure the min and max time BT gains the antenna
39 * in WLAN / BT master basic rate
43 WL12XX_CONF_SG_ACL_BT_MASTER_MIN_BR
= 0,
44 WL12XX_CONF_SG_ACL_BT_MASTER_MAX_BR
,
47 * Configure the min and max time BT gains the antenna
48 * in WLAN / BT slave basic rate
52 WL12XX_CONF_SG_ACL_BT_SLAVE_MIN_BR
,
53 WL12XX_CONF_SG_ACL_BT_SLAVE_MAX_BR
,
56 * Configure the min and max time BT gains the antenna
57 * in WLAN / BT master EDR
61 WL12XX_CONF_SG_ACL_BT_MASTER_MIN_EDR
,
62 WL12XX_CONF_SG_ACL_BT_MASTER_MAX_EDR
,
65 * Configure the min and max time BT gains the antenna
66 * in WLAN / BT slave EDR
70 WL12XX_CONF_SG_ACL_BT_SLAVE_MIN_EDR
,
71 WL12XX_CONF_SG_ACL_BT_SLAVE_MAX_EDR
,
74 * The maximum time WLAN can gain the antenna
75 * in WLAN PSM / BT master/slave BR
79 WL12XX_CONF_SG_ACL_WLAN_PS_MASTER_BR
,
80 WL12XX_CONF_SG_ACL_WLAN_PS_SLAVE_BR
,
83 * The maximum time WLAN can gain the antenna
84 * in WLAN PSM / BT master/slave EDR
88 WL12XX_CONF_SG_ACL_WLAN_PS_MASTER_EDR
,
89 WL12XX_CONF_SG_ACL_WLAN_PS_SLAVE_EDR
,
91 /* TODO: explain these values */
92 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_BR
,
93 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_BR
,
94 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_BR
,
95 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_BR
,
96 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_EDR
,
97 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_EDR
,
98 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_EDR
,
99 WL12XX_CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_EDR
,
101 WL12XX_CONF_SG_ACL_ACTIVE_SCAN_WLAN_BR
,
102 WL12XX_CONF_SG_ACL_ACTIVE_SCAN_WLAN_EDR
,
103 WL12XX_CONF_SG_ACL_PASSIVE_SCAN_BT_BR
,
104 WL12XX_CONF_SG_ACL_PASSIVE_SCAN_WLAN_BR
,
105 WL12XX_CONF_SG_ACL_PASSIVE_SCAN_BT_EDR
,
106 WL12XX_CONF_SG_ACL_PASSIVE_SCAN_WLAN_EDR
,
109 * Compensation percentage of probe requests when scan initiated
110 * during BT voice/ACL link.
114 WL12XX_CONF_SG_AUTO_SCAN_PROBE_REQ
,
117 * Compensation percentage of probe requests when active scan initiated
122 WL12XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3
,
125 * Compensation percentage of WLAN active scan window if initiated
128 * Range: 0 - 1000 (%)
130 WL12XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP
,
133 * Compensation percentage of WLAN passive scan window if initiated
136 * Range: 0 - 1000 (%)
138 WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_A2DP_BR
,
141 * Compensation percentage of WLAN passive scan window if initiated
144 * Range: 0 - 1000 (%)
146 WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_A2DP_EDR
,
149 * Compensation percentage of WLAN passive scan window if initiated
152 * Range: 0 - 1000 (%)
154 WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_HV3
,
156 /* TODO: explain these values */
157 WL12XX_CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN
,
158 WL12XX_CONF_SG_BCN_HV3_COLL_THR_IN_PASSIVE_SCAN
,
159 WL12XX_CONF_SG_TX_RX_PROTECT_BW_IN_PASSIVE_SCAN
,
162 * Defines whether the SG will force WLAN host to enter/exit PSM
164 * Range: 1 - SG can force, 0 - host handles PSM
166 WL12XX_CONF_SG_STA_FORCE_PS_IN_BT_SCO
,
169 * Defines antenna configuration (single/dual antenna)
171 * Range: 0 - single antenna, 1 - dual antenna
173 WL12XX_CONF_SG_ANTENNA_CONFIGURATION
,
176 * The threshold (percent) of max consecutive beacon misses before
177 * increasing priority of beacon reception.
181 WL12XX_CONF_SG_BEACON_MISS_PERCENT
,
184 * Protection time of the DHCP procedure.
186 * Range: 0 - 100000 (ms)
188 WL12XX_CONF_SG_DHCP_TIME
,
191 * RX guard time before the beginning of a new BT voice frame during
192 * which no new WLAN trigger frame is transmitted.
194 * Range: 0 - 100000 (us)
199 * TX guard time before the beginning of a new BT voice frame during
200 * which no new WLAN frame is transmitted.
202 * Range: 0 - 100000 (us)
207 * Enable adaptive RXT/TXT algorithm. If disabled, the host values
210 * Range: 0 - disable, 1 - enable
212 WL12XX_CONF_SG_ADAPTIVE_RXT_TXT
,
214 /* TODO: explain this value */
215 WL12XX_CONF_SG_GENERAL_USAGE_BIT_MAP
,
218 * Number of consecutive BT voice frames not interrupted by WLAN
222 WL12XX_CONF_SG_HV3_MAX_SERVED
,
225 * The used WLAN legacy service period during active BT ACL link
227 * Range: 0 - 255 (ms)
229 WL12XX_CONF_SG_PS_POLL_TIMEOUT
,
232 * The used WLAN UPSD service period during active BT ACL link
234 * Range: 0 - 255 (ms)
236 WL12XX_CONF_SG_UPSD_TIMEOUT
,
238 WL12XX_CONF_SG_CONSECUTIVE_CTS_THRESHOLD
,
239 WL12XX_CONF_SG_STA_RX_WINDOW_AFTER_DTIM
,
240 WL12XX_CONF_SG_STA_CONNECTION_PROTECTION_TIME
,
243 WL12XX_CONF_AP_BEACON_MISS_TX
,
244 WL12XX_CONF_AP_RX_WINDOW_AFTER_BEACON
,
245 WL12XX_CONF_AP_BEACON_WINDOW_INTERVAL
,
246 WL12XX_CONF_AP_CONNECTION_PROTECTION_TIME
,
247 WL12XX_CONF_AP_BT_ACL_VAL_BT_SERVE_TIME
,
248 WL12XX_CONF_AP_BT_ACL_VAL_WL_SERVE_TIME
,
250 /* CTS Diluting params */
251 WL12XX_CONF_SG_CTS_DILUTED_BAD_RX_PACKETS_TH
,
252 WL12XX_CONF_SG_CTS_CHOP_IN_DUAL_ANT_SCO_MASTER
,
254 WL12XX_CONF_SG_TEMP_PARAM_1
,
255 WL12XX_CONF_SG_TEMP_PARAM_2
,
256 WL12XX_CONF_SG_TEMP_PARAM_3
,
257 WL12XX_CONF_SG_TEMP_PARAM_4
,
258 WL12XX_CONF_SG_TEMP_PARAM_5
,
259 WL12XX_CONF_SG_TEMP_PARAM_6
,
260 WL12XX_CONF_SG_TEMP_PARAM_7
,
261 WL12XX_CONF_SG_TEMP_PARAM_8
,
262 WL12XX_CONF_SG_TEMP_PARAM_9
,
263 WL12XX_CONF_SG_TEMP_PARAM_10
,
265 WL12XX_CONF_SG_PARAMS_MAX
,
266 WL12XX_CONF_SG_PARAMS_ALL
= 0xff
269 #endif /* __WL12XX_CONF_H__ */