Commit 3be4112c authored by Eliad Peller's avatar Eliad Peller Committed by Luciano Coelho

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: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 251c177f
......@@ -528,13 +528,13 @@ int wl1271_acx_sg_enable(struct wl1271 *wl, bool enable)
return ret;
}
int wl1271_acx_sta_sg_cfg(struct wl1271 *wl)
int wl12xx_acx_sg_cfg(struct wl1271 *wl)
{
struct acx_sta_bt_wlan_coex_param *param;
struct acx_bt_wlan_coex_param *param;
struct conf_sg_settings *c = &wl->conf.sg;
int i, ret;
wl1271_debug(DEBUG_ACX, "acx sg sta cfg");
wl1271_debug(DEBUG_ACX, "acx sg cfg");
param = kzalloc(sizeof(*param), GFP_KERNEL);
if (!param) {
......@@ -543,38 +543,8 @@ int wl1271_acx_sta_sg_cfg(struct wl1271 *wl)
}
/* BT-WLAN coext parameters */
for (i = 0; i < CONF_SG_STA_PARAMS_MAX; i++)
param->params[i] = cpu_to_le32(c->sta_params[i]);
param->param_idx = CONF_SG_PARAMS_ALL;
ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param));
if (ret < 0) {
wl1271_warning("failed to set sg config: %d", ret);
goto out;
}
out:
kfree(param);
return ret;
}
int wl1271_acx_ap_sg_cfg(struct wl1271 *wl)
{
struct acx_ap_bt_wlan_coex_param *param;
struct conf_sg_settings *c = &wl->conf.sg;
int i, ret;
wl1271_debug(DEBUG_ACX, "acx sg ap cfg");
param = kzalloc(sizeof(*param), GFP_KERNEL);
if (!param) {
ret = -ENOMEM;
goto out;
}
/* BT-WLAN coext parameters */
for (i = 0; i < CONF_SG_AP_PARAMS_MAX; i++)
param->params[i] = cpu_to_le32(c->ap_params[i]);
for (i = 0; i < CONF_SG_PARAMS_MAX; i++)
param->params[i] = cpu_to_le32(c->params[i]);
param->param_idx = CONF_SG_PARAMS_ALL;
ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param));
......
......@@ -302,23 +302,14 @@ struct acx_bt_wlan_coex {
u8 pad[3];
} __packed;
struct acx_sta_bt_wlan_coex_param {
struct acx_bt_wlan_coex_param {
struct acx_header header;
__le32 params[CONF_SG_STA_PARAMS_MAX];
__le32 params[CONF_SG_PARAMS_MAX];
u8 param_idx;
u8 padding[3];
} __packed;
struct acx_ap_bt_wlan_coex_param {
struct acx_header header;
__le32 params[CONF_SG_AP_PARAMS_MAX];
u8 param_idx;
u8 padding[3];
} __packed;
struct acx_dco_itrim_params {
struct acx_header header;
......@@ -1269,8 +1260,7 @@ int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter);
int wl1271_acx_beacon_filter_table(struct wl1271 *wl);
int wl1271_acx_conn_monit_params(struct wl1271 *wl, bool enable);
int wl1271_acx_sg_enable(struct wl1271 *wl, bool enable);
int wl1271_acx_sta_sg_cfg(struct wl1271 *wl);
int wl1271_acx_ap_sg_cfg(struct wl1271 *wl);
int wl12xx_acx_sg_cfg(struct wl1271 *wl);
int wl1271_acx_cca_threshold(struct wl1271 *wl);
int wl1271_acx_bcn_dtim_options(struct wl1271 *wl);
int wl1271_acx_aid(struct wl1271 *wl, u16 aid);
......
This diff is collapsed.
......@@ -277,10 +277,7 @@ int wl1271_init_pta(struct wl1271 *wl)
{
int ret;
if (wl->bss_type == BSS_TYPE_AP_BSS)
ret = wl1271_acx_ap_sg_cfg(wl);
else
ret = wl1271_acx_sta_sg_cfg(wl);
ret = wl12xx_acx_sg_cfg(wl);
if (ret < 0)
return ret;
......
......@@ -52,110 +52,67 @@
static struct conf_drv_settings default_conf = {
.sg = {
.sta_params = {
[CONF_SG_BT_PER_THRESHOLD] = 7500,
[CONF_SG_HV3_MAX_OVERRIDE] = 0,
[CONF_SG_BT_NFS_SAMPLE_INTERVAL] = 400,
[CONF_SG_BT_LOAD_RATIO] = 200,
[CONF_SG_AUTO_PS_MODE] = 1,
.params = {
[CONF_SG_ACL_BT_MASTER_MIN_BR] = 10,
[CONF_SG_ACL_BT_MASTER_MAX_BR] = 180,
[CONF_SG_ACL_BT_SLAVE_MIN_BR] = 10,
[CONF_SG_ACL_BT_SLAVE_MAX_BR] = 180,
[CONF_SG_ACL_BT_MASTER_MIN_EDR] = 10,
[CONF_SG_ACL_BT_MASTER_MAX_EDR] = 80,
[CONF_SG_ACL_BT_SLAVE_MIN_EDR] = 10,
[CONF_SG_ACL_BT_SLAVE_MAX_EDR] = 80,
[CONF_SG_ACL_WLAN_PS_MASTER_BR] = 8,
[CONF_SG_ACL_WLAN_PS_SLAVE_BR] = 8,
[CONF_SG_ACL_WLAN_PS_MASTER_EDR] = 20,
[CONF_SG_ACL_WLAN_PS_SLAVE_EDR] = 20,
[CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_BR] = 20,
[CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_BR] = 35,
[CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_BR] = 16,
[CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_BR] = 35,
[CONF_SG_ACL_WLAN_ACTIVE_MASTER_MIN_EDR] = 32,
[CONF_SG_ACL_WLAN_ACTIVE_MASTER_MAX_EDR] = 50,
[CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MIN_EDR] = 28,
[CONF_SG_ACL_WLAN_ACTIVE_SLAVE_MAX_EDR] = 50,
[CONF_SG_ACL_ACTIVE_SCAN_WLAN_BR] = 10,
[CONF_SG_ACL_ACTIVE_SCAN_WLAN_EDR] = 20,
[CONF_SG_ACL_PASSIVE_SCAN_BT_BR] = 75,
[CONF_SG_ACL_PASSIVE_SCAN_WLAN_BR] = 15,
[CONF_SG_ACL_PASSIVE_SCAN_BT_EDR] = 27,
[CONF_SG_ACL_PASSIVE_SCAN_WLAN_EDR] = 17,
/* active scan params */
[CONF_SG_AUTO_SCAN_PROBE_REQ] = 170,
[CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3] = 50,
[CONF_SG_ANTENNA_CONFIGURATION] = 0,
[CONF_SG_BEACON_MISS_PERCENT] = 60,
[CONF_SG_RATE_ADAPT_THRESH] = 12,
[CONF_SG_RATE_ADAPT_SNR] = 0,
[CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_BR] = 10,
[CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_BR] = 30,
[CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_BR] = 8,
[CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_BR] = 20,
[CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_BR] = 50,
/* Note: with UPSD, this should be 4 */
[CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_BR] = 8,
[CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_EDR] = 7,
[CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_EDR] = 25,
[CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_EDR] = 20,
/* Note: with UPDS, this should be 15 */
[CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_EDR] = 8,
/* Note: with UPDS, this should be 50 */
[CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_EDR] = 40,
/* Note: with UPDS, this should be 10 */
[CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_EDR] = 20,
[CONF_SG_RXT] = 1200,
[CONF_SG_TXT] = 1000,
[CONF_SG_ADAPTIVE_RXT_TXT] = 1,
[CONF_SG_PS_POLL_TIMEOUT] = 10,
[CONF_SG_UPSD_TIMEOUT] = 10,
[CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR] = 7,
[CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR] = 15,
[CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR] = 15,
[CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR] = 8,
[CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR] = 20,
[CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR] = 15,
[CONF_SG_WLAN_ACTIVE_BT_ACL_MIN_BR] = 20,
[CONF_SG_WLAN_ACTIVE_BT_ACL_MAX_BR] = 50,
[CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_BR] = 10,
[CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3] = 200,
[CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP] = 800,
[CONF_SG_PASSIVE_SCAN_A2DP_BT_TIME] = 75,
[CONF_SG_PASSIVE_SCAN_A2DP_WLAN_TIME] = 15,
[CONF_SG_HV3_MAX_SERVED] = 6,
[CONF_SG_DHCP_TIME] = 5000,
[CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP] = 100,
},
.ap_params = {
[CONF_SG_BT_PER_THRESHOLD] = 7500,
[CONF_SG_HV3_MAX_OVERRIDE] = 0,
[CONF_SG_BT_NFS_SAMPLE_INTERVAL] = 400,
[CONF_SG_BT_LOAD_RATIO] = 50,
[CONF_SG_AUTO_PS_MODE] = 1,
[CONF_SG_AUTO_SCAN_PROBE_REQ] = 170,
[CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3] = 50,
/* passive scan params */
[CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_BR] = 800,
[CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP_EDR] = 200,
[CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3] = 200,
/* passive scan in dual antenna params */
[CONF_SG_CONSECUTIVE_HV3_IN_PASSIVE_SCAN] = 0,
[CONF_SG_BCN_HV3_COLLISION_THRESH_IN_PASSIVE_SCAN] = 0,
[CONF_SG_TX_RX_PROTECTION_BWIDTH_IN_PASSIVE_SCAN] = 0,
/* general params */
[CONF_SG_STA_FORCE_PS_IN_BT_SCO] = 1,
[CONF_SG_ANTENNA_CONFIGURATION] = 0,
[CONF_SG_BEACON_MISS_PERCENT] = 60,
[CONF_SG_RATE_ADAPT_THRESH] = 64,
[CONF_SG_RATE_ADAPT_SNR] = 1,
[CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_BR] = 10,
[CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_BR] = 25,
[CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_BR] = 25,
[CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_BR] = 20,
[CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_BR] = 25,
[CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_BR] = 25,
[CONF_SG_WLAN_PS_BT_ACL_MASTER_MIN_EDR] = 7,
[CONF_SG_WLAN_PS_BT_ACL_MASTER_MAX_EDR] = 25,
[CONF_SG_WLAN_PS_MAX_BT_ACL_MASTER_EDR] = 25,
[CONF_SG_WLAN_PS_BT_ACL_SLAVE_MIN_EDR] = 8,
[CONF_SG_WLAN_PS_BT_ACL_SLAVE_MAX_EDR] = 25,
[CONF_SG_WLAN_PS_MAX_BT_ACL_SLAVE_EDR] = 25,
[CONF_SG_DHCP_TIME] = 5000,
[CONF_SG_RXT] = 1200,
[CONF_SG_TXT] = 1000,
[CONF_SG_ADAPTIVE_RXT_TXT] = 1,
[CONF_SG_GENERAL_USAGE_BIT_MAP] = 3,
[CONF_SG_HV3_MAX_SERVED] = 6,
[CONF_SG_PS_POLL_TIMEOUT] = 10,
[CONF_SG_UPSD_TIMEOUT] = 10,
[CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR] = 7,
[CONF_SG_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR] = 15,
[CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR] = 15,
[CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR] = 8,
[CONF_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR] = 20,
[CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR] = 15,
[CONF_SG_WLAN_ACTIVE_BT_ACL_MIN_BR] = 20,
[CONF_SG_WLAN_ACTIVE_BT_ACL_MAX_BR] = 50,
[CONF_SG_WLAN_ACTIVE_MAX_BT_ACL_BR] = 10,
[CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3] = 200,
[CONF_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP] = 800,
[CONF_SG_PASSIVE_SCAN_A2DP_BT_TIME] = 75,
[CONF_SG_PASSIVE_SCAN_A2DP_WLAN_TIME] = 15,
[CONF_SG_HV3_MAX_SERVED] = 6,
[CONF_SG_DHCP_TIME] = 5000,
[CONF_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP] = 100,
[CONF_SG_TEMP_PARAM_1] = 0,
[CONF_SG_TEMP_PARAM_2] = 0,
[CONF_SG_TEMP_PARAM_3] = 0,
[CONF_SG_TEMP_PARAM_4] = 0,
[CONF_SG_TEMP_PARAM_5] = 0,
[CONF_SG_AP_BEACON_MISS_TX] = 3,
[CONF_SG_RX_WINDOW_LENGTH] = 6,
[CONF_SG_AP_CONNECTION_PROTECTION_TIME] = 50,
[CONF_SG_TEMP_PARAM_6] = 1,
[CONF_SG_CONSECUTIVE_CTS_THRESHOLD] = 2,
[CONF_SG_STA_RX_WINDOW_AFTER_DTIM] = 5,
[CONF_SG_STA_CONNECTION_PROTECTION_TIME] = 30,
/* AP params */
[CONF_AP_BEACON_MISS_TX] = 3,
[CONF_AP_RX_WINDOW_AFTER_BEACON] = 10,
[CONF_AP_BEACON_WINDOW_INTERVAL] = 2,
[CONF_AP_CONNECTION_PROTECTION_TIME] = 0,
[CONF_AP_BT_ACL_VAL_BT_SERVE_TIME] = 25,
[CONF_AP_BT_ACL_VAL_WL_SERVE_TIME] = 25,
},
.state = CONF_SG_PROTECTIVE,
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment