Linux Audio

Check our new training course

Linux debugging, profiling, tracing and performance analysis training

Apr 14-17, 2025
Register
Loading...
  1/*
  2 * This file is part of wl12xx
  3 *
  4 * Copyright (C) 2011 Texas Instruments Inc.
  5 *
  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.
  9 *
 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.
 14 *
 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
 18 * 02110-1301 USA
 19 *
 20 */
 21
 22#ifndef __WL12XX_CONF_H__
 23#define __WL12XX_CONF_H__
 24
 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
 28
 29struct wl12xx_conf_rf {
 30	/*
 31	 * Per channel power compensation for 2.4GHz
 32	 *
 33	 * Range: s8
 34	 */
 35	u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2];
 36
 37	/*
 38	 * Per channel power compensation for 5GHz
 39	 *
 40	 * Range: s8
 41	 */
 42	u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5];
 43};
 44
 45struct wl12xx_priv_conf {
 46	struct wl12xx_conf_rf rf;
 47	struct conf_memory_settings mem_wl127x;
 48};
 49
 50enum wl12xx_sg_params {
 51	/*
 52	* Configure the min and max time BT gains the antenna
 53	* in WLAN / BT master basic rate
 54	*
 55	* Range: 0 - 255 (ms)
 56	*/
 57	WL12XX_CONF_SG_ACL_BT_MASTER_MIN_BR = 0,
 58	WL12XX_CONF_SG_ACL_BT_MASTER_MAX_BR,
 59
 60	/*
 61	* Configure the min and max time BT gains the antenna
 62	* in WLAN / BT slave basic rate
 63	*
 64	* Range: 0 - 255 (ms)
 65	*/
 66	WL12XX_CONF_SG_ACL_BT_SLAVE_MIN_BR,
 67	WL12XX_CONF_SG_ACL_BT_SLAVE_MAX_BR,
 68
 69	/*
 70	* Configure the min and max time BT gains the antenna
 71	* in WLAN / BT master EDR
 72	*
 73	* Range: 0 - 255 (ms)
 74	*/
 75	WL12XX_CONF_SG_ACL_BT_MASTER_MIN_EDR,
 76	WL12XX_CONF_SG_ACL_BT_MASTER_MAX_EDR,
 77
 78	/*
 79	* Configure the min and max time BT gains the antenna
 80	* in WLAN / BT slave EDR
 81	*
 82	* Range: 0 - 255 (ms)
 83	*/
 84	WL12XX_CONF_SG_ACL_BT_SLAVE_MIN_EDR,
 85	WL12XX_CONF_SG_ACL_BT_SLAVE_MAX_EDR,
 86
 87	/*
 88	* The maximum time WLAN can gain the antenna
 89	* in WLAN PSM / BT master/slave BR
 90	*
 91	* Range: 0 - 255 (ms)
 92	*/
 93	WL12XX_CONF_SG_ACL_WLAN_PS_MASTER_BR,
 94	WL12XX_CONF_SG_ACL_WLAN_PS_SLAVE_BR,
 95
 96	/*
 97	* The maximum time WLAN can gain the antenna
 98	* in WLAN PSM / BT master/slave EDR
 99	*
100	* Range: 0 - 255 (ms)
101	*/
102	WL12XX_CONF_SG_ACL_WLAN_PS_MASTER_EDR,
103	WL12XX_CONF_SG_ACL_WLAN_PS_SLAVE_EDR,
104
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,
114
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,
121
122	/*
123	* Compensation percentage of probe requests when scan initiated
124	* during BT voice/ACL link.
125	*
126	* Range: 0 - 255 (%)
127	*/
128	WL12XX_CONF_SG_AUTO_SCAN_PROBE_REQ,
129
130	/*
131	* Compensation percentage of probe requests when active scan initiated
132	* during BT voice
133	*
134	* Range: 0 - 255 (%)
135	*/
136	WL12XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3,
137
138	/*
139	* Compensation percentage of WLAN active scan window if initiated
140	* during BT A2DP
141	*
142	* Range: 0 - 1000 (%)
143	*/
144	WL12XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP,
145
146	/*
147	* Compensation percentage of WLAN passive scan window if initiated
148	* during BT A2DP BR
149	*
150	* Range: 0 - 1000 (%)
151	*/
152	WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_A2DP_BR,
153
154	/*
155	* Compensation percentage of WLAN passive scan window if initiated
156	* during BT A2DP EDR
157	*
158	* Range: 0 - 1000 (%)
159	*/
160	WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_A2DP_EDR,
161
162	/*
163	* Compensation percentage of WLAN passive scan window if initiated
164	* during BT voice
165	*
166	* Range: 0 - 1000 (%)
167	*/
168	WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_HV3,
169
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,
174
175	/*
176	* Defines whether the SG will force WLAN host to enter/exit PSM
177	*
178	* Range: 1 - SG can force, 0 - host handles PSM
179	*/
180	WL12XX_CONF_SG_STA_FORCE_PS_IN_BT_SCO,
181
182	/*
183	* Defines antenna configuration (single/dual antenna)
184	*
185	* Range: 0 - single antenna, 1 - dual antenna
186	*/
187	WL12XX_CONF_SG_ANTENNA_CONFIGURATION,
188
189	/*
190	* The threshold (percent) of max consecutive beacon misses before
191	* increasing priority of beacon reception.
192	*
193	* Range: 0 - 100 (%)
194	*/
195	WL12XX_CONF_SG_BEACON_MISS_PERCENT,
196
197	/*
198	* Protection time of the DHCP procedure.
199	*
200	* Range: 0 - 100000 (ms)
201	*/
202	WL12XX_CONF_SG_DHCP_TIME,
203
204	/*
205	* RX guard time before the beginning of a new BT voice frame during
206	* which no new WLAN trigger frame is transmitted.
207	*
208	* Range: 0 - 100000 (us)
209	*/
210	WL12XX_CONF_SG_RXT,
211
212	/*
213	* TX guard time before the beginning of a new BT voice frame during
214	* which no new WLAN frame is transmitted.
215	*
216	* Range: 0 - 100000 (us)
217	*/
218	WL12XX_CONF_SG_TXT,
219
220	/*
221	* Enable adaptive RXT/TXT algorithm. If disabled, the host values
222	* will be utilized.
223	*
224	* Range: 0 - disable, 1 - enable
225	*/
226	WL12XX_CONF_SG_ADAPTIVE_RXT_TXT,
227
228	/* TODO: explain this value */
229	WL12XX_CONF_SG_GENERAL_USAGE_BIT_MAP,
230
231	/*
232	* Number of consecutive BT voice frames not interrupted by WLAN
233	*
234	* Range: 0 - 100
235	*/
236	WL12XX_CONF_SG_HV3_MAX_SERVED,
237
238	/*
239	* The used WLAN legacy service period during active BT ACL link
240	*
241	* Range: 0 - 255 (ms)
242	*/
243	WL12XX_CONF_SG_PS_POLL_TIMEOUT,
244
245	/*
246	* The used WLAN UPSD service period during active BT ACL link
247	*
248	* Range: 0 - 255 (ms)
249	*/
250	WL12XX_CONF_SG_UPSD_TIMEOUT,
251
252	WL12XX_CONF_SG_CONSECUTIVE_CTS_THRESHOLD,
253	WL12XX_CONF_SG_STA_RX_WINDOW_AFTER_DTIM,
254	WL12XX_CONF_SG_STA_CONNECTION_PROTECTION_TIME,
255
256	/* AP params */
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,
263
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,
267
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,
278
279	WL12XX_CONF_SG_PARAMS_MAX,
280	WL12XX_CONF_SG_PARAMS_ALL = 0xff
281};
282
283#endif /* __WL12XX_CONF_H__ */
  1/* SPDX-License-Identifier: GPL-2.0-only */
  2/*
  3 * This file is part of wl12xx
  4 *
  5 * Copyright (C) 2011 Texas Instruments Inc.
  6 */
  7
  8#ifndef __WL12XX_CONF_H__
  9#define __WL12XX_CONF_H__
 10
 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
 14
 15struct wl12xx_conf_rf {
 16	/*
 17	 * Per channel power compensation for 2.4GHz
 18	 *
 19	 * Range: s8
 20	 */
 21	u8 tx_per_channel_power_compensation_2[CONF_TX_PWR_COMPENSATION_LEN_2];
 22
 23	/*
 24	 * Per channel power compensation for 5GHz
 25	 *
 26	 * Range: s8
 27	 */
 28	u8 tx_per_channel_power_compensation_5[CONF_TX_PWR_COMPENSATION_LEN_5];
 29};
 30
 31struct wl12xx_priv_conf {
 32	struct wl12xx_conf_rf rf;
 33	struct conf_memory_settings mem_wl127x;
 34};
 35
 36enum wl12xx_sg_params {
 37	/*
 38	* Configure the min and max time BT gains the antenna
 39	* in WLAN / BT master basic rate
 40	*
 41	* Range: 0 - 255 (ms)
 42	*/
 43	WL12XX_CONF_SG_ACL_BT_MASTER_MIN_BR = 0,
 44	WL12XX_CONF_SG_ACL_BT_MASTER_MAX_BR,
 45
 46	/*
 47	* Configure the min and max time BT gains the antenna
 48	* in WLAN / BT slave basic rate
 49	*
 50	* Range: 0 - 255 (ms)
 51	*/
 52	WL12XX_CONF_SG_ACL_BT_SLAVE_MIN_BR,
 53	WL12XX_CONF_SG_ACL_BT_SLAVE_MAX_BR,
 54
 55	/*
 56	* Configure the min and max time BT gains the antenna
 57	* in WLAN / BT master EDR
 58	*
 59	* Range: 0 - 255 (ms)
 60	*/
 61	WL12XX_CONF_SG_ACL_BT_MASTER_MIN_EDR,
 62	WL12XX_CONF_SG_ACL_BT_MASTER_MAX_EDR,
 63
 64	/*
 65	* Configure the min and max time BT gains the antenna
 66	* in WLAN / BT slave EDR
 67	*
 68	* Range: 0 - 255 (ms)
 69	*/
 70	WL12XX_CONF_SG_ACL_BT_SLAVE_MIN_EDR,
 71	WL12XX_CONF_SG_ACL_BT_SLAVE_MAX_EDR,
 72
 73	/*
 74	* The maximum time WLAN can gain the antenna
 75	* in WLAN PSM / BT master/slave BR
 76	*
 77	* Range: 0 - 255 (ms)
 78	*/
 79	WL12XX_CONF_SG_ACL_WLAN_PS_MASTER_BR,
 80	WL12XX_CONF_SG_ACL_WLAN_PS_SLAVE_BR,
 81
 82	/*
 83	* The maximum time WLAN can gain the antenna
 84	* in WLAN PSM / BT master/slave EDR
 85	*
 86	* Range: 0 - 255 (ms)
 87	*/
 88	WL12XX_CONF_SG_ACL_WLAN_PS_MASTER_EDR,
 89	WL12XX_CONF_SG_ACL_WLAN_PS_SLAVE_EDR,
 90
 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,
100
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,
107
108	/*
109	* Compensation percentage of probe requests when scan initiated
110	* during BT voice/ACL link.
111	*
112	* Range: 0 - 255 (%)
113	*/
114	WL12XX_CONF_SG_AUTO_SCAN_PROBE_REQ,
115
116	/*
117	* Compensation percentage of probe requests when active scan initiated
118	* during BT voice
119	*
120	* Range: 0 - 255 (%)
121	*/
122	WL12XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3,
123
124	/*
125	* Compensation percentage of WLAN active scan window if initiated
126	* during BT A2DP
127	*
128	* Range: 0 - 1000 (%)
129	*/
130	WL12XX_CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP,
131
132	/*
133	* Compensation percentage of WLAN passive scan window if initiated
134	* during BT A2DP BR
135	*
136	* Range: 0 - 1000 (%)
137	*/
138	WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_A2DP_BR,
139
140	/*
141	* Compensation percentage of WLAN passive scan window if initiated
142	* during BT A2DP EDR
143	*
144	* Range: 0 - 1000 (%)
145	*/
146	WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_A2DP_EDR,
147
148	/*
149	* Compensation percentage of WLAN passive scan window if initiated
150	* during BT voice
151	*
152	* Range: 0 - 1000 (%)
153	*/
154	WL12XX_CONF_SG_PASSIVE_SCAN_DUR_FACTOR_HV3,
155
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,
160
161	/*
162	* Defines whether the SG will force WLAN host to enter/exit PSM
163	*
164	* Range: 1 - SG can force, 0 - host handles PSM
165	*/
166	WL12XX_CONF_SG_STA_FORCE_PS_IN_BT_SCO,
167
168	/*
169	* Defines antenna configuration (single/dual antenna)
170	*
171	* Range: 0 - single antenna, 1 - dual antenna
172	*/
173	WL12XX_CONF_SG_ANTENNA_CONFIGURATION,
174
175	/*
176	* The threshold (percent) of max consecutive beacon misses before
177	* increasing priority of beacon reception.
178	*
179	* Range: 0 - 100 (%)
180	*/
181	WL12XX_CONF_SG_BEACON_MISS_PERCENT,
182
183	/*
184	* Protection time of the DHCP procedure.
185	*
186	* Range: 0 - 100000 (ms)
187	*/
188	WL12XX_CONF_SG_DHCP_TIME,
189
190	/*
191	* RX guard time before the beginning of a new BT voice frame during
192	* which no new WLAN trigger frame is transmitted.
193	*
194	* Range: 0 - 100000 (us)
195	*/
196	WL12XX_CONF_SG_RXT,
197
198	/*
199	* TX guard time before the beginning of a new BT voice frame during
200	* which no new WLAN frame is transmitted.
201	*
202	* Range: 0 - 100000 (us)
203	*/
204	WL12XX_CONF_SG_TXT,
205
206	/*
207	* Enable adaptive RXT/TXT algorithm. If disabled, the host values
208	* will be utilized.
209	*
210	* Range: 0 - disable, 1 - enable
211	*/
212	WL12XX_CONF_SG_ADAPTIVE_RXT_TXT,
213
214	/* TODO: explain this value */
215	WL12XX_CONF_SG_GENERAL_USAGE_BIT_MAP,
216
217	/*
218	* Number of consecutive BT voice frames not interrupted by WLAN
219	*
220	* Range: 0 - 100
221	*/
222	WL12XX_CONF_SG_HV3_MAX_SERVED,
223
224	/*
225	* The used WLAN legacy service period during active BT ACL link
226	*
227	* Range: 0 - 255 (ms)
228	*/
229	WL12XX_CONF_SG_PS_POLL_TIMEOUT,
230
231	/*
232	* The used WLAN UPSD service period during active BT ACL link
233	*
234	* Range: 0 - 255 (ms)
235	*/
236	WL12XX_CONF_SG_UPSD_TIMEOUT,
237
238	WL12XX_CONF_SG_CONSECUTIVE_CTS_THRESHOLD,
239	WL12XX_CONF_SG_STA_RX_WINDOW_AFTER_DTIM,
240	WL12XX_CONF_SG_STA_CONNECTION_PROTECTION_TIME,
241
242	/* AP params */
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,
249
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,
253
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,
264
265	WL12XX_CONF_SG_PARAMS_MAX,
266	WL12XX_CONF_SG_PARAMS_ALL = 0xff
267};
268
269#endif /* __WL12XX_CONF_H__ */