summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/acx.c
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-04-18 14:15:20 +0300
committerLuciano Coelho <coelho@ti.com>2011-05-02 10:28:49 +0300
commit801f870bc0524bad7ebef9cea52d20e4d4992e4a (patch)
treeb83962d14cbc250cb6e036fd5d296118c8f605ab /drivers/net/wireless/wl12xx/acx.c
parentf7c7c7e69cbc3c5b660a32cc2cb31720b2b420c8 (diff)
wl12xx: add BT-coexistance for AP
Initialize AP specific BT coexitance parameters to default values and enable them in AP mode. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/acx.c')
-rw-r--r--drivers/net/wireless/wl12xx/acx.c40
1 files changed, 35 insertions, 5 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c
index b1b5139139e7..2b5fb3d2df1b 100644
--- a/drivers/net/wireless/wl12xx/acx.c
+++ b/drivers/net/wireless/wl12xx/acx.c
@@ -540,13 +540,13 @@ out:
return ret;
}
-int wl1271_acx_sg_cfg(struct wl1271 *wl)
+int wl1271_acx_sta_sg_cfg(struct wl1271 *wl)
{
- struct acx_bt_wlan_coex_param *param;
+ struct acx_sta_bt_wlan_coex_param *param;
struct conf_sg_settings *c = &wl->conf.sg;
int i, ret;
- wl1271_debug(DEBUG_ACX, "acx sg cfg");
+ wl1271_debug(DEBUG_ACX, "acx sg sta cfg");
param = kzalloc(sizeof(*param), GFP_KERNEL);
if (!param) {
@@ -555,8 +555,38 @@ int wl1271_acx_sg_cfg(struct wl1271 *wl)
}
/* BT-WLAN coext parameters */
- for (i = 0; i < CONF_SG_PARAMS_MAX; i++)
- param->params[i] = cpu_to_le32(c->params[i]);
+ 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]);
param->param_idx = CONF_SG_PARAMS_ALL;
ret = wl1271_cmd_configure(wl, ACX_SG_CFG, param, sizeof(*param));