aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-08-14 06:17:19 -0400
committerLuciano Coelho <coelho@ti.com>2011-08-22 05:35:27 -0400
commit3be4112cb2c53fcda85fb408aea9a6f94075683b (patch)
treeb09ffedabc911a5eef05eccece24cf99b5d1df8a
parent251c177f886027fbce494202e44935762f103137 (diff)
wl12xx: update BT coex configuration params
The BT coex params api have been changed. Update it, and init coex for both sta and ap. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r--drivers/net/wireless/wl12xx/acx.c40
-rw-r--r--drivers/net/wireless/wl12xx/acx.h16
-rw-r--r--drivers/net/wireless/wl12xx/conf.h318
-rw-r--r--drivers/net/wireless/wl12xx/init.c5
-rw-r--r--drivers/net/wireless/wl12xx/main.c165
5 files changed, 177 insertions, 367 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c
index a784ba6a8ef6..d783fce45613 100644
--- a/drivers/net/wireless/wl12xx/acx.c
+++ b/drivers/net/wireless/wl12xx/acx.c
@@ -528,13 +528,13 @@ out:
528 return ret; 528 return ret;
529} 529}
530 530
531int wl1271_acx_sta_sg_cfg(struct wl1271 *wl) 531int wl12xx_acx_sg_cfg(struct wl1271 *wl)
532{ 532{
533 struct acx_sta_bt_wlan_coex_param *param; 533 struct acx_bt_wlan_coex_param *param;
534 struct conf_sg_settings *c = &wl->conf.sg; 534 struct conf_sg_settings *c = &wl->conf.sg;
535 int i, ret; 535 int i, ret;
536 536
537 wl1271_debug(DEBUG_ACX, "acx sg sta cfg"); 537 wl1271_debug(DEBUG_ACX, "acx sg cfg");
538 538
539 param = kzalloc(sizeof(*param), GFP_KERNEL); 539 param = kzalloc(sizeof(*param), GFP_KERNEL);
540 if (!param) { 540 if (!param) {
@@ -543,38 +543,8 @@ int wl1271_acx_sta_sg_cfg(struct wl1271 *wl)
543 } 543 }
544 544
545 /* BT-WLAN coext parameters */ 545 /* BT-WLAN coext parameters */
546 for (i = 0; i < CONF_SG_STA_PARAMS_MAX; i++) 546 for (i = 0; i < CONF_SG_PARAMS_MAX; i++)
547 param->params[i] = cpu_to_le32(c->sta_params[i]); 547 param->params[i] = cpu_to_le32(c->params[i]);
548 param->param_idx = CONF_SG_PARAMS_ALL;
549
550 ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param));
551 if (ret < 0) {
552 wl1271_warning("failed to set sg config: %d", ret);
553 goto out;
554 }
555
556out:
557 kfree(param);
558 return ret;
559}
560
561int wl1271_acx_ap_sg_cfg(struct wl1271 *wl)
562{
563 struct acx_ap_bt_wlan_coex_param *param;
564 struct conf_sg_settings *c = &wl->conf.sg;
565 int i, ret;
566
567 wl1271_debug(DEBUG_ACX, "acx sg ap cfg");
568
569 param = kzalloc(sizeof(*param), GFP_KERNEL);
570 if (!param) {
571 ret = -ENOMEM;
572 goto out;
573 }
574
575 /* BT-WLAN coext parameters */
576 for (i = 0; i < CONF_SG_AP_PARAMS_MAX; i++)
577 param->params[i] = cpu_to_le32(c->ap_params[i]);
578 param->param_idx = CONF_SG_PARAMS_ALL; 548 param->param_idx = CONF_SG_PARAMS_ALL;
579 549
580 ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param)); 550 ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param));
diff --git a/drivers/net/wireless/wl12xx/acx.h b/drivers/net/wireless/wl12xx/acx.h
index 6909bc535a5d..5b3fabde0afe 100644
--- a/drivers/net/wireless/wl12xx/acx.h
+++ b/drivers/net/wireless/wl12xx/acx.h
@@ -302,23 +302,14 @@ struct acx_bt_wlan_coex {
302 u8 pad[3]; 302 u8 pad[3];
303} __packed; 303} __packed;
304 304
305struct acx_sta_bt_wlan_coex_param { 305struct acx_bt_wlan_coex_param {
306 struct acx_header header; 306 struct acx_header header;
307 307
308 __le32 params[CONF_SG_STA_PARAMS_MAX]; 308 __le32 params[CONF_SG_PARAMS_MAX];
309 u8 param_idx; 309 u8 param_idx;
310 u8 padding[3]; 310 u8 padding[3];
311} __packed; 311} __packed;
312 312
313struct acx_ap_bt_wlan_coex_param {
314 struct acx_header header;
315
316 __le32 params[CONF_SG_AP_PARAMS_MAX];
317 u8 param_idx;
318 u8 padding[3];
319} __packed;
320
321
322struct acx_dco_itrim_params { 313struct acx_dco_itrim_params {
323 struct acx_header header; 314 struct acx_header header;
324 315
@@ -1269,8 +1260,7 @@ int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter);
1269int wl1271_acx_beacon_filter_table(struct wl1271 *wl); 1260int wl1271_acx_beacon_filter_table(struct wl1271 *wl);
1270int wl1271_acx_conn_monit_params(struct wl1271 *wl, bool enable); 1261int wl1271_acx_conn_monit_params(struct wl1271 *wl, bool enable);
1271int wl1271_acx_sg_enable(struct wl1271 *wl, bool enable); 1262int wl1271_acx_sg_enable(struct wl1271 *wl, bool enable);
1272int wl1271_acx_sta_sg_cfg(struct wl1271 *wl); 1263int wl12xx_acx_sg_cfg(struct wl1271 *wl);
1273int wl1271_acx_ap_sg_cfg(struct wl1271 *wl);
1274int wl1271_acx_cca_threshold(struct wl1271 *wl); 1264int wl1271_acx_cca_threshold(struct wl1271 *wl);
1275int wl1271_acx_bcn_dtim_options(struct wl1271 *wl); 1265int wl1271_acx_bcn_dtim_options(struct wl1271 *wl);
1276int wl1271_acx_aid(struct wl1271 *wl, u16 aid); 1266int wl1271_acx_aid(struct wl1271 *wl, u16 aid);
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h
index 30ee7d304bcc..a7c147838ab8 100644
--- a/drivers/net/wireless/wl12xx/conf.h
+++ b/drivers/net/wireless/wl12xx/conf.h
@@ -99,40 +99,75 @@ enum {
99 99
100enum { 100enum {
101 /* 101 /*
102 * PER threshold in PPM of the BT voice 102 * Configure the min and max time BT gains the antenna
103 * in WLAN / BT master basic rate
103 * 104 *
104 * Range: 0 - 10000000 105 * Range: 0 - 255 (ms)
105 */ 106 */
106 CONF_SG_BT_PER_THRESHOLD = 0, 107 CONF_SG_ACL_BT_MASTER_MIN_BR = 0,
108 CONF_SG_ACL_BT_MASTER_MAX_BR,
107 109
108 /* 110 /*
109 * Number of consequent RX_ACTIVE activities to override BT voice 111 * Configure the min and max time BT gains the antenna
110 * frames to ensure WLAN connection 112 * in WLAN / BT slave basic rate
111 * 113 *
112 * Range: 0 - 100 114 * Range: 0 - 255 (ms)
113 */ 115 */
114 CONF_SG_HV3_MAX_OVERRIDE, 116 CONF_SG_ACL_BT_SLAVE_MIN_BR,
117 CONF_SG_ACL_BT_SLAVE_MAX_BR,
115 118
116 /* 119 /*
117 * Defines the PER threshold of the BT voice 120 * Configure the min and max time BT gains the antenna
121 * in WLAN / BT master EDR
118 * 122 *
119 * Range: 0 - 65000 123 * Range: 0 - 255 (ms)
120 */ 124 */
121 CONF_SG_BT_NFS_SAMPLE_INTERVAL, 125 CONF_SG_ACL_BT_MASTER_MIN_EDR,
126 CONF_SG_ACL_BT_MASTER_MAX_EDR,
122 127
123 /* 128 /*
124 * Defines the load ratio of BT 129 * Configure the min and max time BT gains the antenna
130 * in WLAN / BT slave EDR
125 * 131 *
126 * Range: 0 - 100 (%) 132 * Range: 0 - 255 (ms)
127 */ 133 */
128 CONF_SG_BT_LOAD_RATIO, 134 CONF_SG_ACL_BT_SLAVE_MIN_EDR,
135 CONF_SG_ACL_BT_SLAVE_MAX_EDR,
129 136
130 /* 137 /*
131 * Defines whether the SG will force WLAN host to enter/exit PSM 138 * The maximum time WLAN can gain the antenna
139 * in WLAN PSM / BT master/slave BR
132 * 140 *
133 * Range: 1 - SG can force, 0 - host handles PSM 141 * Range: 0 - 255 (ms)
134 */ 142 */
135 CONF_SG_AUTO_PS_MODE, 143 CONF_SG_ACL_WLAN_PS_MASTER_BR,
144 CONF_SG_ACL_WLAN_PS_SLAVE_BR,
145
146 /*
147 * The maximum time WLAN can gain the antenna
148 * in WLAN PSM / BT master/slave EDR
149 *
150 * Range: 0 - 255 (ms)
151 */
152 CONF_SG_ACL_WLAN_PS_MASTER_EDR,
153 CONF_SG_ACL_WLAN_PS_SLAVE_EDR,
154
155 /* TODO: explain these values */
156 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_BR,
157 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_BR,
158 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_BR,
159 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_BR,
160 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_EDR,
161 CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_EDR,
162 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_EDR,
163 CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_EDR,
164
165 CONF_SG_ACL_ACTIVE_SCAN_WLAN_BR,
166 CONF_SG_ACL_ACTIVE_SCAN_WLAN_EDR,
167 CONF_SG_ACL_PASSIVE_SCAN_BT_BR,
168 CONF_SG_ACL_PASSIVE_SCAN_WLAN_BR,
169 CONF_SG_ACL_PASSIVE_SCAN_BT_EDR,
170 CONF_SG_ACL_PASSIVE_SCAN_WLAN_EDR,
136 171
137 /* 172 /*
138 * Compensation percentage of probe requests when scan initiated 173 * Compensation percentage of probe requests when scan initiated
@@ -151,102 +186,70 @@ enum {
151 CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3, 186 CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3,
152 187
153 /* 188 /*
154 * Defines antenna configuration (single/dual antenna) 189 * Compensation percentage of WLAN active scan window if initiated
155 * 190 * during BT A2DP
156 * Range: 0 - single antenna, 1 - dual antenna
157 */
158 CONF_SG_ANTENNA_CONFIGURATION,
159
160 /*
161 * The threshold (percent) of max consequtive beacon misses before
162 * increasing priority of beacon reception.
163 *
164 * Range: 0 - 100 (%)
165 */
166 CONF_SG_BEACON_MISS_PERCENT,
167
168 /*
169 * The rate threshold below which receiving a data frame from the AP
170 * will increase the priority of the data frame above BT traffic.
171 *
172 * Range: 0,2, 5(=5.5), 6, 9, 11, 12, 18, 24, 36, 48, 54
173 */
174 CONF_SG_RATE_ADAPT_THRESH,
175
176 /*
177 * Not used currently.
178 * 191 *
179 * Range: 0 192 * Range: 0 - 1000 (%)
180 */ 193 */
181 CONF_SG_RATE_ADAPT_SNR, 194 CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP,
182 195
183 /* 196 /*
184 * Configure the min and max time BT gains the antenna 197 * Compensation percentage of WLAN passive scan window if initiated
185 * in WLAN PSM / BT master basic rate 198 * during BT A2DP BR
186 * 199 *
187 * Range: 0 - 255 (ms) 200 * Range: 0 - 1000 (%)
188 */ 201 */
189 CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_BR, 202 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_BR,
190 CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_BR,
191 203
192 /* 204 /*
193 * The time after it expires no new WLAN trigger frame is trasmitted 205 * Compensation percentage of WLAN passive scan window if initiated
194 * in WLAN PSM / BT master basic rate 206 * during BT A2DP EDR
195 * 207 *
196 * Range: 0 - 255 (ms) 208 * Range: 0 - 1000 (%)
197 */ 209 */
198 CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_BR, 210 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_EDR,
199 211
200 /* 212 /*
201 * Configure the min and max time BT gains the antenna 213 * Compensation percentage of WLAN passive scan window if initiated
202 * in WLAN PSM / BT slave basic rate 214 * during BT voice
203 * 215 *
204 * Range: 0 - 255 (ms) 216 * Range: 0 - 1000 (%)
205 */ 217 */
206 CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_BR, 218 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3,
207 CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_BR,
208 219
209 /* 220 /* TODO: explain these values */
210 * The time after it expires no new WLAN trigger frame is trasmitted 221 CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN,
211 * in WLAN PSM / BT slave basic rate 222 CONF_SG_BCN_HV3_COLLISION_THRESH_IN_PASSIVE_SCAN,
212 * 223 CONF_SG_TX_RX_PROTECTION_BWIDTH_IN_PASSIVE_SCAN,
213 * Range: 0 - 255 (ms)
214 */
215 CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_BR,
216 224
217 /* 225 /*
218 * Configure the min and max time BT gains the antenna 226 * Defines whether the SG will force WLAN host to enter/exit PSM
219 * in WLAN PSM / BT master EDR
220 * 227 *
221 * Range: 0 - 255 (ms) 228 * Range: 1 - SG can force, 0 - host handles PSM
222 */ 229 */
223 CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_EDR, 230 CONF_SG_STA_FORCE_PS_IN_BT_SCO,
224 CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_EDR,
225 231
226 /* 232 /*
227 * The time after it expires no new WLAN trigger frame is trasmitted 233 * Defines antenna configuration (single/dual antenna)
228 * in WLAN PSM / BT master EDR
229 * 234 *
230 * Range: 0 - 255 (ms) 235 * Range: 0 - single antenna, 1 - dual antenna
231 */ 236 */
232 CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_EDR, 237 CONF_SG_ANTENNA_CONFIGURATION,
233 238
234 /* 239 /*
235 * Configure the min and max time BT gains the antenna 240 * The threshold (percent) of max consecutive beacon misses before
236 * in WLAN PSM / BT slave EDR 241 * increasing priority of beacon reception.
237 * 242 *
238 * Range: 0 - 255 (ms) 243 * Range: 0 - 100 (%)
239 */ 244 */
240 CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_EDR, 245 CONF_SG_BEACON_MISS_PERCENT,
241 CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_EDR,
242 246
243 /* 247 /*
244 * The time after it expires no new WLAN trigger frame is trasmitted 248 * Protection time of the DHCP procedure.
245 * in WLAN PSM / BT slave EDR
246 * 249 *
247 * Range: 0 - 255 (ms) 250 * Range: 0 - 100000 (ms)
248 */ 251 */
249 CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_EDR, 252 CONF_SG_DHCP_TIME,
250 253
251 /* 254 /*
252 * RX guard time before the beginning of a new BT voice frame during 255 * RX guard time before the beginning of a new BT voice frame during
@@ -273,166 +276,59 @@ enum {
273 */ 276 */
274 CONF_SG_ADAPTIVE_RXT_TXT, 277 CONF_SG_ADAPTIVE_RXT_TXT,
275 278
276 /* 279 /* TODO: explain this value */
277 * The used WLAN legacy service period during active BT ACL link 280 CONF_SG_GENERAL_USAGE_BIT_MAP,
278 *
279 * Range: 0 - 255 (ms)
280 */
281 CONF_SG_PS_POLL_TIMEOUT,
282
283 /*
284 * The used WLAN UPSD service period during active BT ACL link
285 *
286 * Range: 0 - 255 (ms)
287 */
288 CONF_SG_UPSD_TIMEOUT,
289
290 /*
291 * Configure the min and max time BT gains the antenna
292 * in WLAN Active / BT master EDR
293 *
294 * Range: 0 - 255 (ms)
295 */
296 CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR,
297 CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR,
298
299 /*
300 * The maximum time WLAN can gain the antenna for
301 * in WLAN Active / BT master EDR
302 *
303 * Range: 0 - 255 (ms)
304 */
305 CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR,
306 281
307 /* 282 /*
308 * Configure the min and max time BT gains the antenna 283 * Number of consecutive BT voice frames not interrupted by WLAN
309 * in WLAN Active / BT slave EDR
310 * 284 *
311 * Range: 0 - 255 (ms) 285 * Range: 0 - 100
312 */
313 CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR,
314 CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR,
315
316 /*
317 * The maximum time WLAN can gain the antenna for
318 * in WLAN Active / BT slave EDR
319 *
320 * Range: 0 - 255 (ms)
321 */ 286 */
322 CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR, 287 CONF_SG_HV3_MAX_SERVED,
323 288
324 /* 289 /*
325 * Configure the min and max time BT gains the antenna 290 * The used WLAN legacy service period during active BT ACL link
326 * in WLAN Active / BT basic rate
327 * 291 *
328 * Range: 0 - 255 (ms) 292 * Range: 0 - 255 (ms)
329 */ 293 */
330 CONF_SG_WLAN_ACTIVE_BT_ACL_MIN_BR, 294 CONF_SG_PS_POLL_TIMEOUT,
331 CONF_SG_WLAN_ACTIVE_BT_ACL_MAX_BR,
332 295
333 /* 296 /*
334 * The maximum time WLAN can gain the antenna for 297 * The used WLAN UPSD service period during active BT ACL link
335 * in WLAN Active / BT basic rate
336 * 298 *
337 * Range: 0 - 255 (ms) 299 * Range: 0 - 255 (ms)
338 */ 300 */
339 CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_BR, 301 CONF_SG_UPSD_TIMEOUT,
340
341 /*
342 * Compensation percentage of WLAN passive scan window if initiated
343 * during BT voice
344 *
345 * Range: 0 - 1000 (%)
346 */
347 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3,
348
349 /*
350 * Compensation percentage of WLAN passive scan window if initiated
351 * during BT A2DP
352 *
353 * Range: 0 - 1000 (%)
354 */
355 CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP,
356 302
357 /* 303 CONF_SG_CONSECUTIVE_CTS_THRESHOLD,
358 * Fixed time ensured for BT traffic to gain the antenna during WLAN 304 CONF_SG_STA_RX_WINDOW_AFTER_DTIM,
359 * passive scan. 305 CONF_SG_STA_CONNECTION_PROTECTION_TIME,
360 *
361 * Range: 0 - 1000 ms
362 */
363 CONF_SG_PASSIVE_SCAN_A2DP_BT_TIME,
364 306
365 /* 307 /* AP params */
366 * Fixed time ensured for WLAN traffic to gain the antenna during WLAN 308 CONF_AP_BEACON_MISS_TX,
367 * passive scan. 309 CONF_AP_RX_WINDOW_AFTER_BEACON,
368 * 310 CONF_AP_BEACON_WINDOW_INTERVAL,
369 * Range: 0 - 1000 ms 311 CONF_AP_CONNECTION_PROTECTION_TIME,
370 */ 312 CONF_AP_BT_ACL_VAL_BT_SERVE_TIME,
371 CONF_SG_PASSIVE_SCAN_A2DP_WLAN_TIME, 313 CONF_AP_BT_ACL_VAL_WL_SERVE_TIME,
372 314
373 /*
374 * Number of consequent BT voice frames not interrupted by WLAN
375 *
376 * Range: 0 - 100
377 */
378 CONF_SG_HV3_MAX_SERVED,
379
380 /*
381 * Protection time of the DHCP procedure.
382 *
383 * Range: 0 - 100000 (ms)
384 */
385 CONF_SG_DHCP_TIME,
386
387 /*
388 * Compensation percentage of WLAN active scan window if initiated
389 * during BT A2DP
390 *
391 * Range: 0 - 1000 (%)
392 */
393 CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP,
394 CONF_SG_TEMP_PARAM_1, 315 CONF_SG_TEMP_PARAM_1,
395 CONF_SG_TEMP_PARAM_2, 316 CONF_SG_TEMP_PARAM_2,
396 CONF_SG_TEMP_PARAM_3, 317 CONF_SG_TEMP_PARAM_3,
397 CONF_SG_TEMP_PARAM_4, 318 CONF_SG_TEMP_PARAM_4,
398 CONF_SG_TEMP_PARAM_5, 319 CONF_SG_TEMP_PARAM_5,
399
400 /*
401 * AP beacon miss
402 *
403 * Range: 0 - 255
404 */
405 CONF_SG_AP_BEACON_MISS_TX,
406
407 /*
408 * AP RX window length
409 *
410 * Range: 0 - 50
411 */
412 CONF_SG_RX_WINDOW_LENGTH,
413
414 /*
415 * AP connection protection time
416 *
417 * Range: 0 - 5000
418 */
419 CONF_SG_AP_CONNECTION_PROTECTION_TIME,
420
421 CONF_SG_TEMP_PARAM_6, 320 CONF_SG_TEMP_PARAM_6,
422 CONF_SG_TEMP_PARAM_7, 321 CONF_SG_TEMP_PARAM_7,
423 CONF_SG_TEMP_PARAM_8, 322 CONF_SG_TEMP_PARAM_8,
424 CONF_SG_TEMP_PARAM_9, 323 CONF_SG_TEMP_PARAM_9,
425 CONF_SG_TEMP_PARAM_10, 324 CONF_SG_TEMP_PARAM_10,
426 325
427 CONF_SG_STA_PARAMS_MAX = CONF_SG_TEMP_PARAM_5 + 1, 326 CONF_SG_PARAMS_MAX,
428 CONF_SG_AP_PARAMS_MAX = CONF_SG_TEMP_PARAM_10 + 1,
429
430 CONF_SG_PARAMS_ALL = 0xff 327 CONF_SG_PARAMS_ALL = 0xff
431}; 328};
432 329
433struct conf_sg_settings { 330struct conf_sg_settings {
434 u32 sta_params[CONF_SG_STA_PARAMS_MAX]; 331 u32 params[CONF_SG_PARAMS_MAX];
435 u32 ap_params[CONF_SG_AP_PARAMS_MAX];
436 u8 state; 332 u8 state;
437}; 333};
438 334
@@ -913,7 +809,7 @@ struct conf_conn_settings {
913 struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT]; 809 struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT];
914 810
915 /* 811 /*
916 * The number of consequtive beacons to lose, before the firmware 812 * The number of consecutive beacons to lose, before the firmware
917 * becomes out of synch. 813 * becomes out of synch.
918 * 814 *
919 * Range: u32 815 * Range: u32
@@ -951,7 +847,7 @@ struct conf_conn_settings {
951 u8 rx_broadcast_in_ps; 847 u8 rx_broadcast_in_ps;
952 848
953 /* 849 /*
954 * Consequtive PS Poll failures before sending event to driver 850 * Consecutive PS Poll failures before sending event to driver
955 * 851 *
956 * Range: u8 852 * Range: u8
957 */ 853 */
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c
index 1bc246f42a65..47d87aaa63a7 100644
--- a/drivers/net/wireless/wl12xx/init.c
+++ b/drivers/net/wireless/wl12xx/init.c
@@ -277,10 +277,7 @@ int wl1271_init_pta(struct wl1271 *wl)
277{ 277{
278 int ret; 278 int ret;
279 279
280 if (wl->bss_type == BSS_TYPE_AP_BSS) 280 ret = wl12xx_acx_sg_cfg(wl);
281 ret = wl1271_acx_ap_sg_cfg(wl);
282 else
283 ret = wl1271_acx_sta_sg_cfg(wl);
284 if (ret < 0) 281 if (ret < 0)
285 return ret; 282 return ret;
286 283
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 57b10e98730e..1774a6672314 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -52,110 +52,67 @@
52 52
53static struct conf_drv_settings default_conf = { 53static struct conf_drv_settings default_conf = {
54 .sg = { 54 .sg = {
55 .sta_params = { 55 .params = {
56 [CONF_SG_BT_PER_THRESHOLD] = 7500, 56 [CONF_SG_ACL_BT_MASTER_MIN_BR] = 10,
57 [CONF_SG_HV3_MAX_OVERRIDE] = 0, 57 [CONF_SG_ACL_BT_MASTER_MAX_BR] = 180,
58 [CONF_SG_BT_NFS_SAMPLE_INTERVAL] = 400, 58 [CONF_SG_ACL_BT_SLAVE_MIN_BR] = 10,
59 [CONF_SG_BT_LOAD_RATIO] = 200, 59 [CONF_SG_ACL_BT_SLAVE_MAX_BR] = 180,
60 [CONF_SG_AUTO_PS_MODE] = 1, 60 [CONF_SG_ACL_BT_MASTER_MIN_EDR] = 10,
61 [CONF_SG_AUTO_SCAN_PROBE_REQ] = 170, 61 [CONF_SG_ACL_BT_MASTER_MAX_EDR] = 80,
62 [CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3] = 50, 62 [CONF_SG_ACL_BT_SLAVE_MIN_EDR] = 10,
63 [CONF_SG_ANTENNA_CONFIGURATION] = 0, 63 [CONF_SG_ACL_BT_SLAVE_MAX_EDR] = 80,
64 [CONF_SG_BEACON_MISS_PERCENT] = 60, 64 [CONF_SG_ACL_WLAN_PS_MASTER_BR] = 8,
65 [CONF_SG_RATE_ADAPT_THRESH] = 12, 65 [CONF_SG_ACL_WLAN_PS_SLAVE_BR] = 8,
66 [CONF_SG_RATE_ADAPT_SNR] = 0, 66 [CONF_SG_ACL_WLAN_PS_MASTER_EDR] = 20,
67 [CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_BR] = 10, 67 [CONF_SG_ACL_WLAN_PS_SLAVE_EDR] = 20,
68 [CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_BR] = 30, 68 [CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_BR] = 20,
69 [CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_BR] = 8, 69 [CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_BR] = 35,
70 [CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_BR] = 20, 70 [CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_BR] = 16,
71 [CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_BR] = 50, 71 [CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_BR] = 35,
72 /* Note: with UPSD, this should be 4 */ 72 [CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_EDR] = 32,
73 [CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_BR] = 8, 73 [CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_EDR] = 50,
74 [CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_EDR] = 7, 74 [CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_EDR] = 28,
75 [CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_EDR] = 25, 75 [CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_EDR] = 50,
76 [CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_EDR] = 20, 76 [CONF_SG_ACL_ACTIVE_SCAN_WLAN_BR] = 10,
77 /* Note: with UPDS, this should be 15 */ 77 [CONF_SG_ACL_ACTIVE_SCAN_WLAN_EDR] = 20,
78 [CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_EDR] = 8, 78 [CONF_SG_ACL_PASSIVE_SCAN_BT_BR] = 75,
79 /* Note: with UPDS, this should be 50 */ 79 [CONF_SG_ACL_PASSIVE_SCAN_WLAN_BR] = 15,
80 [CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_EDR] = 40, 80 [CONF_SG_ACL_PASSIVE_SCAN_BT_EDR] = 27,
81 /* Note: with UPDS, this should be 10 */ 81 [CONF_SG_ACL_PASSIVE_SCAN_WLAN_EDR] = 17,
82 [CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_EDR] = 20, 82 /* active scan params */
83 [CONF_SG_RXT] = 1200, 83 [CONF_SG_AUTO_SCAN_PROBE_REQ] = 170,
84 [CONF_SG_TXT] = 1000, 84 [CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3] = 50,
85 [CONF_SG_ADAPTIVE_RXT_TXT] = 1, 85 [CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP] = 100,
86 [CONF_SG_PS_POLL_TIMEOUT] = 10, 86 /* passive scan params */
87 [CONF_SG_UPSD_TIMEOUT] = 10, 87 [CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_BR] = 800,
88 [CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR] = 7, 88 [CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_EDR] = 200,
89 [CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR] = 15, 89 [CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3] = 200,
90 [CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR] = 15, 90 /* passive scan in dual antenna params */
91 [CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR] = 8, 91 [CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN] = 0,
92 [CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR] = 20, 92 [CONF_SG_BCN_HV3_COLLISION_THRESH_IN_PASSIVE_SCAN] = 0,
93 [CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR] = 15, 93 [CONF_SG_TX_RX_PROTECTION_BWIDTH_IN_PASSIVE_SCAN] = 0,
94 [CONF_SG_WLAN_ACTIVE_BT_ACL_MIN_BR] = 20, 94 /* general params */
95 [CONF_SG_WLAN_ACTIVE_BT_ACL_MAX_BR] = 50, 95 [CONF_SG_STA_FORCE_PS_IN_BT_SCO] = 1,
96 [CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_BR] = 10, 96 [CONF_SG_ANTENNA_CONFIGURATION] = 0,
97 [CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3] = 200, 97 [CONF_SG_BEACON_MISS_PERCENT] = 60,
98 [CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP] = 800, 98 [CONF_SG_DHCP_TIME] = 5000,
99 [CONF_SG_PASSIVE_SCAN_A2DP_BT_TIME] = 75, 99 [CONF_SG_RXT] = 1200,
100 [CONF_SG_PASSIVE_SCAN_A2DP_WLAN_TIME] = 15, 100 [CONF_SG_TXT] = 1000,
101 [CONF_SG_HV3_MAX_SERVED] = 6, 101 [CONF_SG_ADAPTIVE_RXT_TXT] = 1,
102 [CONF_SG_DHCP_TIME] = 5000, 102 [CONF_SG_GENERAL_USAGE_BIT_MAP] = 3,
103 [CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP] = 100, 103 [CONF_SG_HV3_MAX_SERVED] = 6,
104 }, 104 [CONF_SG_PS_POLL_TIMEOUT] = 10,
105 .ap_params = { 105 [CONF_SG_UPSD_TIMEOUT] = 10,
106 [CONF_SG_BT_PER_THRESHOLD] = 7500, 106 [CONF_SG_CONSECUTIVE_CTS_THRESHOLD] = 2,
107 [CONF_SG_HV3_MAX_OVERRIDE] = 0, 107 [CONF_SG_STA_RX_WINDOW_AFTER_DTIM] = 5,
108 [CONF_SG_BT_NFS_SAMPLE_INTERVAL] = 400, 108 [CONF_SG_STA_CONNECTION_PROTECTION_TIME] = 30,
109 [CONF_SG_BT_LOAD_RATIO] = 50, 109 /* AP params */
110 [CONF_SG_AUTO_PS_MODE] = 1, 110 [CONF_AP_BEACON_MISS_TX] = 3,
111 [CONF_SG_AUTO_SCAN_PROBE_REQ] = 170, 111 [CONF_AP_RX_WINDOW_AFTER_BEACON] = 10,
112 [CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3] = 50, 112 [CONF_AP_BEACON_WINDOW_INTERVAL] = 2,
113 [CONF_SG_ANTENNA_CONFIGURATION] = 0, 113 [CONF_AP_CONNECTION_PROTECTION_TIME] = 0,
114 [CONF_SG_BEACON_MISS_PERCENT] = 60, 114 [CONF_AP_BT_ACL_VAL_BT_SERVE_TIME] = 25,
115 [CONF_SG_RATE_ADAPT_THRESH] = 64, 115 [CONF_AP_BT_ACL_VAL_WL_SERVE_TIME] = 25,
116 [CONF_SG_RATE_ADAPT_SNR] = 1,
117 [CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_BR] = 10,
118 [CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_BR] = 25,
119 [CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_BR] = 25,
120 [CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_BR] = 20,
121 [CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_BR] = 25,
122 [CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_BR] = 25,
123 [CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_EDR] = 7,
124 [CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_EDR] = 25,
125 [CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_EDR] = 25,
126 [CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_EDR] = 8,
127 [CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_EDR] = 25,
128 [CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_EDR] = 25,
129 [CONF_SG_RXT] = 1200,
130 [CONF_SG_TXT] = 1000,
131 [CONF_SG_ADAPTIVE_RXT_TXT] = 1,
132 [CONF_SG_PS_POLL_TIMEOUT] = 10,
133 [CONF_SG_UPSD_TIMEOUT] = 10,
134 [CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR] = 7,
135 [CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR] = 15,
136 [CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR] = 15,
137 [CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR] = 8,
138 [CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR] = 20,
139 [CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR] = 15,
140 [CONF_SG_WLAN_ACTIVE_BT_ACL_MIN_BR] = 20,
141 [CONF_SG_WLAN_ACTIVE_BT_ACL_MAX_BR] = 50,
142 [CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_BR] = 10,
143 [CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3] = 200,
144 [CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP] = 800,
145 [CONF_SG_PASSIVE_SCAN_A2DP_BT_TIME] = 75,
146 [CONF_SG_PASSIVE_SCAN_A2DP_WLAN_TIME] = 15,
147 [CONF_SG_HV3_MAX_SERVED] = 6,
148 [CONF_SG_DHCP_TIME] = 5000,
149 [CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP] = 100,
150 [CONF_SG_TEMP_PARAM_1] = 0,
151 [CONF_SG_TEMP_PARAM_2] = 0,
152 [CONF_SG_TEMP_PARAM_3] = 0,
153 [CONF_SG_TEMP_PARAM_4] = 0,
154 [CONF_SG_TEMP_PARAM_5] = 0,
155 [CONF_SG_AP_BEACON_MISS_TX] = 3,
156 [CONF_SG_RX_WINDOW_LENGTH] = 6,
157 [CONF_SG_AP_CONNECTION_PROTECTION_TIME] = 50,
158 [CONF_SG_TEMP_PARAM_6] = 1,
159 }, 116 },
160 .state = CONF_SG_PROTECTIVE, 117 .state = CONF_SG_PROTECTIVE,
161 }, 118 },