aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-02-02 02:59:34 -0500
committerLuciano Coelho <coelho@ti.com>2011-02-08 19:51:42 -0500
commitee60833a4f887a09e87be52cdf1247a4963b0aef (patch)
tree590f3e48b52f3328b90abd1bdc87050817d24699 /drivers
parent3ad97fbcc233a295f2ccc2c6bdeb32323e360a5e (diff)
wl12xx: mcp2.5 - add config_ps acx
mcp2.5 uses this acx to configure the fw only once, rather than passing the params in every enter psm command. Signed-off-by: Eliad Peller <eliad@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/acx.c30
-rw-r--r--drivers/net/wireless/wl12xx/acx.h11
-rw-r--r--drivers/net/wireless/wl12xx/conf.h8
-rw-r--r--drivers/net/wireless/wl12xx/main.c1
4 files changed, 50 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c
index afdc601aa7e..84d94b25990 100644
--- a/drivers/net/wireless/wl12xx/acx.c
+++ b/drivers/net/wireless/wl12xx/acx.c
@@ -1476,3 +1476,33 @@ out:
1476 kfree(acx); 1476 kfree(acx);
1477 return ret; 1477 return ret;
1478} 1478}
1479
1480int wl1271_acx_config_ps(struct wl1271 *wl)
1481{
1482 struct wl1271_acx_config_ps *config_ps;
1483 int ret;
1484
1485 wl1271_debug(DEBUG_ACX, "acx config ps");
1486
1487 config_ps = kzalloc(sizeof(*config_ps), GFP_KERNEL);
1488 if (!config_ps) {
1489 ret = -ENOMEM;
1490 goto out;
1491 }
1492
1493 config_ps->exit_retries = wl->conf.conn.psm_exit_retries;
1494 config_ps->enter_retries = wl->conf.conn.psm_entry_retries;
1495 config_ps->null_data_rate = cpu_to_le32(wl->basic_rate);
1496
1497 ret = wl1271_cmd_configure(wl, ACX_CONFIG_PS, config_ps,
1498 sizeof(*config_ps));
1499
1500 if (ret < 0) {
1501 wl1271_warning("acx config ps failed: %d", ret);
1502 goto out;
1503 }
1504
1505out:
1506 kfree(config_ps);
1507 return ret;
1508}
diff --git a/drivers/net/wireless/wl12xx/acx.h b/drivers/net/wireless/wl12xx/acx.h
index 4bbaf04f434..5bc0ca97bec 100644
--- a/drivers/net/wireless/wl12xx/acx.h
+++ b/drivers/net/wireless/wl12xx/acx.h
@@ -1136,6 +1136,15 @@ struct wl1271_acx_max_tx_retry {
1136 u8 padding_1[2]; 1136 u8 padding_1[2];
1137} __packed; 1137} __packed;
1138 1138
1139struct wl1271_acx_config_ps {
1140 struct acx_header header;
1141
1142 u8 exit_retries;
1143 u8 enter_retries;
1144 u8 padding[2];
1145 __le32 null_data_rate;
1146} __packed;
1147
1139enum { 1148enum {
1140 ACX_WAKE_UP_CONDITIONS = 0x0002, 1149 ACX_WAKE_UP_CONDITIONS = 0x0002,
1141 ACX_MEM_CFG = 0x0003, 1150 ACX_MEM_CFG = 0x0003,
@@ -1200,6 +1209,7 @@ enum {
1200 DOT11_RTS_THRESHOLD = 0x1013, 1209 DOT11_RTS_THRESHOLD = 0x1013,
1201 DOT11_GROUP_ADDRESS_TBL = 0x1014, 1210 DOT11_GROUP_ADDRESS_TBL = 0x1014,
1202 ACX_PM_CONFIG = 0x1016, 1211 ACX_PM_CONFIG = 0x1016,
1212 ACX_CONFIG_PS = 0x1017,
1203 1213
1204 MAX_DOT11_IE = DOT11_GROUP_ADDRESS_TBL, 1214 MAX_DOT11_IE = DOT11_GROUP_ADDRESS_TBL,
1205 1215
@@ -1269,5 +1279,6 @@ int wl1271_acx_set_ba_receiver_session(struct wl1271 *wl, u8 tid_index, u16 ssn,
1269 bool enable); 1279 bool enable);
1270int wl1271_acx_tsf_info(struct wl1271 *wl, u64 *mactime); 1280int wl1271_acx_tsf_info(struct wl1271 *wl, u64 *mactime);
1271int wl1271_acx_max_tx_retry(struct wl1271 *wl); 1281int wl1271_acx_max_tx_retry(struct wl1271 *wl);
1282int wl1271_acx_config_ps(struct wl1271 *wl);
1272 1283
1273#endif /* __WL1271_ACX_H__ */ 1284#endif /* __WL1271_ACX_H__ */
diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h
index fd1dac9ab4d..c81aecd755e 100644
--- a/drivers/net/wireless/wl12xx/conf.h
+++ b/drivers/net/wireless/wl12xx/conf.h
@@ -960,6 +960,14 @@ struct conf_conn_settings {
960 u8 psm_entry_retries; 960 u8 psm_entry_retries;
961 961
962 /* 962 /*
963 * Specifies the maximum number of times to try PSM exit if it fails
964 * (if sending the appropriate null-func message fails.)
965 *
966 * Range 0 - 255
967 */
968 u8 psm_exit_retries;
969
970 /*
963 * Specifies the maximum number of times to try transmit the PSM entry 971 * Specifies the maximum number of times to try transmit the PSM entry
964 * null-func frame for each PSM entry attempt 972 * null-func frame for each PSM entry attempt
965 * 973 *
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 254b7daccee..522bb09c953 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -256,6 +256,7 @@ static struct conf_drv_settings default_conf = {
256 .bet_enable = CONF_BET_MODE_ENABLE, 256 .bet_enable = CONF_BET_MODE_ENABLE,
257 .bet_max_consecutive = 10, 257 .bet_max_consecutive = 10,
258 .psm_entry_retries = 5, 258 .psm_entry_retries = 5,
259 .psm_exit_retries = 255,
259 .psm_entry_nullfunc_retries = 3, 260 .psm_entry_nullfunc_retries = 3,
260 .psm_entry_hangover_period = 1, 261 .psm_entry_hangover_period = 1,
261 .keep_alive_interval = 55000, 262 .keep_alive_interval = 55000,