diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-03-18 06:26:29 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-23 16:50:19 -0400 |
commit | 885c9907440947a4f50d4c7a93b1a45266b00b84 (patch) | |
tree | 41852902fc8ea06bad3e08866ad2b21d98cf1f28 /drivers | |
parent | 93f56be146a7be4d3243fc64d9b6313d96eaa62b (diff) |
wl1271: Fix SG configuration message structures
The bluetooth coexistence (SG) configuration messages have changed and
were completely wrong. For instance, intending to enable the SG, it was
instead disabled.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_acx.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_acx.h | 120 |
2 files changed, 66 insertions, 71 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.c b/drivers/net/wireless/wl12xx/wl1271_acx.c index 60e20876e6d8..405ae1bf464f 100644 --- a/drivers/net/wireless/wl12xx/wl1271_acx.c +++ b/drivers/net/wireless/wl12xx/wl1271_acx.c | |||
@@ -547,7 +547,7 @@ int wl1271_acx_sg_enable(struct wl1271 *wl) | |||
547 | goto out; | 547 | goto out; |
548 | } | 548 | } |
549 | 549 | ||
550 | pta->enable = SG_ENABLE; | 550 | pta->enable = ACX_SG_DISABLE; |
551 | 551 | ||
552 | ret = wl1271_cmd_configure(wl, ACX_SG_ENABLE, pta, sizeof(*pta)); | 552 | ret = wl1271_cmd_configure(wl, ACX_SG_ENABLE, pta, sizeof(*pta)); |
553 | if (ret < 0) { | 553 | if (ret < 0) { |
@@ -575,19 +575,8 @@ int wl1271_acx_sg_cfg(struct wl1271 *wl) | |||
575 | } | 575 | } |
576 | 576 | ||
577 | /* BT-WLAN coext parameters */ | 577 | /* BT-WLAN coext parameters */ |
578 | param->per_threshold = cpu_to_le32(c->per_threshold); | 578 | param->params[ACX_SG_BT_PER_THRESHOLD] = c->per_threshold; |
579 | param->max_scan_compensation_time = | 579 | param->param_idx = ACX_SG_BT_PER_THRESHOLD; |
580 | cpu_to_le32(c->max_scan_compensation_time); | ||
581 | param->nfs_sample_interval = cpu_to_le16(c->nfs_sample_interval); | ||
582 | param->load_ratio = c->load_ratio; | ||
583 | param->auto_ps_mode = c->auto_ps_mode; | ||
584 | param->probe_req_compensation = c->probe_req_compensation; | ||
585 | param->scan_window_compensation = c->scan_window_compensation; | ||
586 | param->antenna_config = c->antenna_config; | ||
587 | param->beacon_miss_threshold = c->beacon_miss_threshold; | ||
588 | param->rate_adaptation_threshold = | ||
589 | cpu_to_le32(c->rate_adaptation_threshold); | ||
590 | param->rate_adaptation_snr = c->rate_adaptation_snr; | ||
591 | 580 | ||
592 | ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param)); | 581 | ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param)); |
593 | if (ret < 0) { | 582 | if (ret < 0) { |
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.h b/drivers/net/wireless/wl12xx/wl1271_acx.h index aeccc98581eb..88a05cbd3457 100644 --- a/drivers/net/wireless/wl12xx/wl1271_acx.h +++ b/drivers/net/wireless/wl12xx/wl1271_acx.h | |||
@@ -393,80 +393,86 @@ struct acx_conn_monit_params { | |||
393 | } __attribute__ ((packed)); | 393 | } __attribute__ ((packed)); |
394 | 394 | ||
395 | enum { | 395 | enum { |
396 | SG_ENABLE = 0, | 396 | ACX_SG_DISABLE = 0, |
397 | SG_DISABLE, | 397 | ACX_SG_PROTECTIVE, |
398 | SG_SENSE_NO_ACTIVITY, | 398 | ACX_SG_OPPORTUNISTIC |
399 | SG_SENSE_ACTIVE | ||
400 | }; | 399 | }; |
401 | 400 | ||
402 | struct acx_bt_wlan_coex { | 401 | struct acx_bt_wlan_coex { |
403 | struct acx_header header; | 402 | struct acx_header header; |
404 | 403 | ||
405 | /* | ||
406 | * 0 -> PTA enabled | ||
407 | * 1 -> PTA disabled | ||
408 | * 2 -> sense no active mode, i.e. | ||
409 | * an interrupt is sent upon | ||
410 | * BT activity. | ||
411 | * 3 -> PTA is switched on in response | ||
412 | * to the interrupt sending. | ||
413 | */ | ||
414 | u8 enable; | 404 | u8 enable; |
415 | u8 pad[3]; | 405 | u8 pad[3]; |
416 | } __attribute__ ((packed)); | 406 | } __attribute__ ((packed)); |
417 | 407 | ||
418 | struct acx_dco_itrim_params { | 408 | enum { |
409 | ACX_SG_BT_PER_THRESHOLD = 0, | ||
410 | ACX_SG_HV3_MAX_OVERRIDE, | ||
411 | ACX_SG_BT_NFS_SAMPLE_INTERVAL, | ||
412 | ACX_SG_BT_LOAD_RATIO, | ||
413 | ACX_SG_AUTO_PS_MODE, | ||
414 | ACX_SG_AUTO_SCAN_PROBE_REQ, | ||
415 | ACX_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3, | ||
416 | ACX_SG_ANTENNA_CONFIGURATION, | ||
417 | ACX_SG_BEACON_MISS_PERCENT, | ||
418 | ACX_SG_RATE_ADAPT_THRESH, | ||
419 | ACX_SG_RATE_ADAPT_SNR, | ||
420 | ACX_SG_WLAN_PS_BT_ACL_MASTER_MIN_BR, | ||
421 | ACX_SG_WLAN_PS_BT_ACL_MASTER_MAX_BR, | ||
422 | ACX_SG_WLAN_PS_MAX_BT_ACL_MASTER_BR, | ||
423 | ACX_SG_WLAN_PS_BT_ACL_SLAVE_MIN_BR, | ||
424 | ACX_SG_WLAN_PS_BT_ACL_SLAVE_MAX_BR, | ||
425 | ACX_SG_WLAN_PS_MAX_BT_ACL_SLAVE_BR, | ||
426 | ACX_SG_WLAN_PS_BT_ACL_MASTER_MIN_EDR, | ||
427 | ACX_SG_WLAN_PS_BT_ACL_MASTER_MAX_EDR, | ||
428 | ACX_SG_WLAN_PS_MAX_BT_ACL_MASTER_EDR, | ||
429 | ACX_SG_WLAN_PS_BT_ACL_SLAVE_MIN_EDR, | ||
430 | ACX_SG_WLAN_PS_BT_ACL_SLAVE_MAX_EDR, | ||
431 | ACX_SG_WLAN_PS_MAX_BT_ACL_SLAVE_EDR, | ||
432 | ACX_SG_RXT, | ||
433 | ACX_SG_TXT, | ||
434 | ACX_SG_ADAPTIVE_RXT_TXT, | ||
435 | ACX_SG_PS_POLL_TIMEOUT, | ||
436 | ACX_SG_UPSD_TIMEOUT, | ||
437 | ACX_SG_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR, | ||
438 | ACX_SG_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR, | ||
439 | ACX_SG_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR, | ||
440 | ACX_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR, | ||
441 | ACX_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR, | ||
442 | ACX_SG_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR, | ||
443 | ACX_SG_WLAN_ACTIVE_BT_ACL_MIN_BR, | ||
444 | ACX_SG_WLAN_ACTIVE_BT_ACL_MAX_BR, | ||
445 | ACX_SG_WLAN_ACTIVE_MAX_BT_ACL_BR, | ||
446 | ACX_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3, | ||
447 | ACX_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP, | ||
448 | ACX_SG_PASSIVE_SCAN_A2DP_BT_TIME, | ||
449 | ACX_SG_PASSIVE_SCAN_A2DP_WLAN_TIME, | ||
450 | ACX_SG_HV3_MAX_SERVED, | ||
451 | ACX_SG_DHCP_TIME, | ||
452 | ACX_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP, | ||
453 | ACX_SG_TEMP_PARAM_1, | ||
454 | ACX_SG_TEMP_PARAM_2, | ||
455 | ACX_SG_TEMP_PARAM_3, | ||
456 | ACX_SG_TEMP_PARAM_4, | ||
457 | ACX_SG_TEMP_PARAM_5, | ||
458 | ACX_SG_PARAMS_MAX, | ||
459 | ACX_SG_PARAMS_ALL = 0xff | ||
460 | }; | ||
461 | |||
462 | struct acx_bt_wlan_coex_param { | ||
419 | struct acx_header header; | 463 | struct acx_header header; |
420 | 464 | ||
421 | u8 enable; | 465 | __le32 params[ACX_SG_PARAMS_MAX]; |
466 | u8 param_idx; | ||
422 | u8 padding[3]; | 467 | u8 padding[3]; |
423 | __le32 timeout; | ||
424 | } __attribute__ ((packed)); | 468 | } __attribute__ ((packed)); |
425 | 469 | ||
426 | #define PTA_ANTENNA_TYPE_DEF (0) | 470 | struct acx_dco_itrim_params { |
427 | #define PTA_BT_HP_MAXTIME_DEF (2000) | ||
428 | #define PTA_WLAN_HP_MAX_TIME_DEF (5000) | ||
429 | #define PTA_SENSE_DISABLE_TIMER_DEF (1350) | ||
430 | #define PTA_PROTECTIVE_RX_TIME_DEF (1500) | ||
431 | #define PTA_PROTECTIVE_TX_TIME_DEF (1500) | ||
432 | #define PTA_TIMEOUT_NEXT_BT_LP_PACKET_DEF (3000) | ||
433 | #define PTA_SIGNALING_TYPE_DEF (1) | ||
434 | #define PTA_AFH_LEVERAGE_ON_DEF (0) | ||
435 | #define PTA_NUMBER_QUIET_CYCLE_DEF (0) | ||
436 | #define PTA_MAX_NUM_CTS_DEF (3) | ||
437 | #define PTA_NUMBER_OF_WLAN_PACKETS_DEF (2) | ||
438 | #define PTA_NUMBER_OF_BT_PACKETS_DEF (2) | ||
439 | #define PTA_PROTECTIVE_RX_TIME_FAST_DEF (1500) | ||
440 | #define PTA_PROTECTIVE_TX_TIME_FAST_DEF (3000) | ||
441 | #define PTA_CYCLE_TIME_FAST_DEF (8700) | ||
442 | #define PTA_RX_FOR_AVALANCHE_DEF (5) | ||
443 | #define PTA_ELP_HP_DEF (0) | ||
444 | #define PTA_ANTI_STARVE_PERIOD_DEF (500) | ||
445 | #define PTA_ANTI_STARVE_NUM_CYCLE_DEF (4) | ||
446 | #define PTA_ALLOW_PA_SD_DEF (1) | ||
447 | #define PTA_TIME_BEFORE_BEACON_DEF (6300) | ||
448 | #define PTA_HPDM_MAX_TIME_DEF (1600) | ||
449 | #define PTA_TIME_OUT_NEXT_WLAN_DEF (2550) | ||
450 | #define PTA_AUTO_MODE_NO_CTS_DEF (0) | ||
451 | #define PTA_BT_HP_RESPECTED_DEF (3) | ||
452 | #define PTA_WLAN_RX_MIN_RATE_DEF (24) | ||
453 | #define PTA_ACK_MODE_DEF (1) | ||
454 | |||
455 | struct acx_bt_wlan_coex_param { | ||
456 | struct acx_header header; | 471 | struct acx_header header; |
457 | 472 | ||
458 | __le32 per_threshold; | 473 | u8 enable; |
459 | __le32 max_scan_compensation_time; | ||
460 | __le16 nfs_sample_interval; | ||
461 | u8 load_ratio; | ||
462 | u8 auto_ps_mode; | ||
463 | u8 probe_req_compensation; | ||
464 | u8 scan_window_compensation; | ||
465 | u8 antenna_config; | ||
466 | u8 beacon_miss_threshold; | ||
467 | __le32 rate_adaptation_threshold; | ||
468 | s8 rate_adaptation_snr; | ||
469 | u8 padding[3]; | 474 | u8 padding[3]; |
475 | __le32 timeout; | ||
470 | } __attribute__ ((packed)); | 476 | } __attribute__ ((packed)); |
471 | 477 | ||
472 | struct acx_energy_detection { | 478 | struct acx_energy_detection { |