Skip to content

Commit

Permalink
wl1271: Add proper WLAN-BT co-ex configuration, and enable co-ex.
Browse files Browse the repository at this point in the history
Add configuration values for the varous WLAN-BT co-ex configuration parameters,
and finally enable WLAN-BT co-ex. Based on preliminary measurements, it
appears the co-ex feature is not increasing WLAN power consumption, if BT
is not activated.

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>
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Mar 23, 2010
1 parent 885c990 commit 1b00f54
Show file tree
Hide file tree
Showing 5 changed files with 328 additions and 139 deletions.
9 changes: 5 additions & 4 deletions drivers/net/wireless/wl12xx/wl1271_acx.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ int wl1271_acx_sg_enable(struct wl1271 *wl)
goto out;
}

pta->enable = ACX_SG_DISABLE;
pta->enable = wl->conf.sg.state;

ret = wl1271_cmd_configure(wl, ACX_SG_ENABLE, pta, sizeof(*pta));
if (ret < 0) {
Expand All @@ -564,7 +564,7 @@ int wl1271_acx_sg_cfg(struct wl1271 *wl)
{
struct acx_bt_wlan_coex_param *param;
struct conf_sg_settings *c = &wl->conf.sg;
int ret;
int i, ret;

wl1271_debug(DEBUG_ACX, "acx sg cfg");

Expand All @@ -575,8 +575,9 @@ int wl1271_acx_sg_cfg(struct wl1271 *wl)
}

/* BT-WLAN coext parameters */
param->params[ACX_SG_BT_PER_THRESHOLD] = c->per_threshold;
param->param_idx = ACX_SG_BT_PER_THRESHOLD;
for (i = 0; i < CONF_SG_PARAMS_MAX; i++)
param->params[i] = c->params[i];
param->param_idx = CONF_SG_PARAMS_ALL;

ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param));
if (ret < 0) {
Expand Down
62 changes: 1 addition & 61 deletions drivers/net/wireless/wl12xx/wl1271_acx.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,77 +392,17 @@ struct acx_conn_monit_params {
__le32 bss_lose_timeout; /* number of TU's from synch fail */
} __attribute__ ((packed));

enum {
ACX_SG_DISABLE = 0,
ACX_SG_PROTECTIVE,
ACX_SG_OPPORTUNISTIC
};

struct acx_bt_wlan_coex {
struct acx_header header;

u8 enable;
u8 pad[3];
} __attribute__ ((packed));

enum {
ACX_SG_BT_PER_THRESHOLD = 0,
ACX_SG_HV3_MAX_OVERRIDE,
ACX_SG_BT_NFS_SAMPLE_INTERVAL,
ACX_SG_BT_LOAD_RATIO,
ACX_SG_AUTO_PS_MODE,
ACX_SG_AUTO_SCAN_PROBE_REQ,
ACX_SG_ACTIVE_SCAN_DURATION_FACTOR_HV3,
ACX_SG_ANTENNA_CONFIGURATION,
ACX_SG_BEACON_MISS_PERCENT,
ACX_SG_RATE_ADAPT_THRESH,
ACX_SG_RATE_ADAPT_SNR,
ACX_SG_WLAN_PS_BT_ACL_MASTER_MIN_BR,
ACX_SG_WLAN_PS_BT_ACL_MASTER_MAX_BR,
ACX_SG_WLAN_PS_MAX_BT_ACL_MASTER_BR,
ACX_SG_WLAN_PS_BT_ACL_SLAVE_MIN_BR,
ACX_SG_WLAN_PS_BT_ACL_SLAVE_MAX_BR,
ACX_SG_WLAN_PS_MAX_BT_ACL_SLAVE_BR,
ACX_SG_WLAN_PS_BT_ACL_MASTER_MIN_EDR,
ACX_SG_WLAN_PS_BT_ACL_MASTER_MAX_EDR,
ACX_SG_WLAN_PS_MAX_BT_ACL_MASTER_EDR,
ACX_SG_WLAN_PS_BT_ACL_SLAVE_MIN_EDR,
ACX_SG_WLAN_PS_BT_ACL_SLAVE_MAX_EDR,
ACX_SG_WLAN_PS_MAX_BT_ACL_SLAVE_EDR,
ACX_SG_RXT,
ACX_SG_TXT,
ACX_SG_ADAPTIVE_RXT_TXT,
ACX_SG_PS_POLL_TIMEOUT,
ACX_SG_UPSD_TIMEOUT,
ACX_SG_WLAN_ACTIVE_BT_ACL_MASTER_MIN_EDR,
ACX_SG_WLAN_ACTIVE_BT_ACL_MASTER_MAX_EDR,
ACX_SG_WLAN_ACTIVE_MAX_BT_ACL_MASTER_EDR,
ACX_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MIN_EDR,
ACX_SG_WLAN_ACTIVE_BT_ACL_SLAVE_MAX_EDR,
ACX_SG_WLAN_ACTIVE_MAX_BT_ACL_SLAVE_EDR,
ACX_SG_WLAN_ACTIVE_BT_ACL_MIN_BR,
ACX_SG_WLAN_ACTIVE_BT_ACL_MAX_BR,
ACX_SG_WLAN_ACTIVE_MAX_BT_ACL_BR,
ACX_SG_PASSIVE_SCAN_DURATION_FACTOR_HV3,
ACX_SG_PASSIVE_SCAN_DURATION_FACTOR_A2DP,
ACX_SG_PASSIVE_SCAN_A2DP_BT_TIME,
ACX_SG_PASSIVE_SCAN_A2DP_WLAN_TIME,
ACX_SG_HV3_MAX_SERVED,
ACX_SG_DHCP_TIME,
ACX_SG_ACTIVE_SCAN_DURATION_FACTOR_A2DP,
ACX_SG_TEMP_PARAM_1,
ACX_SG_TEMP_PARAM_2,
ACX_SG_TEMP_PARAM_3,
ACX_SG_TEMP_PARAM_4,
ACX_SG_TEMP_PARAM_5,
ACX_SG_PARAMS_MAX,
ACX_SG_PARAMS_ALL = 0xff
};

struct acx_bt_wlan_coex_param {
struct acx_header header;

__le32 params[ACX_SG_PARAMS_MAX];
__le32 params[CONF_SG_PARAMS_MAX];
u8 param_idx;
u8 padding[3];
} __attribute__ ((packed));
Expand Down
Loading

0 comments on commit 1b00f54

Please sign in to comment.