aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/acx.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-08-28 15:11:56 +0300
committerLuciano Coelho <coelho@ti.com>2011-09-14 11:47:26 +0300
commit9487775c5b785d7c1e8182825c9ff9cf5e88149e (patch)
tree2081e8d4ba62c600529a1abdeb6faeab1ae6cb07 /drivers/net/wireless/wl12xx/acx.c
parente0b38265b035a8a2ea05071b67b997f5db181c45 (diff)
wl12xx: add config_hangover command
Add wl12xx_acx_config_hangover() and respective conf values. This command configures how long the chip will stay awake after it was configured to enter psm. Signed-off-by: Eliad Peller <eliad@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, 40 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/acx.c b/drivers/net/wireless/wl12xx/acx.c
index e047594794a..9809e41f06e 100644
--- a/drivers/net/wireless/wl12xx/acx.c
+++ b/drivers/net/wireless/wl12xx/acx.c
@@ -1691,3 +1691,43 @@ out:
kfree(acx);
return ret;
}
+
+int wl12xx_acx_config_hangover(struct wl1271 *wl)
+{
+ struct wl12xx_acx_config_hangover *acx;
+ struct conf_hangover_settings *conf = &wl->conf.hangover;
+ int ret;
+
+ wl1271_debug(DEBUG_ACX, "acx config hangover");
+
+ acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+ if (!acx) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ acx->recover_time = cpu_to_le32(conf->recover_time);
+ acx->hangover_period = conf->hangover_period;
+ acx->dynamic_mode = conf->dynamic_mode;
+ acx->early_termination_mode = conf->early_termination_mode;
+ acx->max_period = conf->max_period;
+ acx->min_period = conf->min_period;
+ acx->increase_delta = conf->increase_delta;
+ acx->decrease_delta = conf->decrease_delta;
+ acx->quiet_time = conf->quiet_time;
+ acx->increase_time = conf->increase_time;
+ acx->window_size = acx->window_size;
+
+ ret = wl1271_cmd_configure(wl, ACX_CONFIG_HANGOVER, acx,
+ sizeof(*acx));
+
+ if (ret < 0) {
+ wl1271_warning("acx config hangover failed: %d", ret);
+ goto out;
+ }
+
+out:
+ kfree(acx);
+ return ret;
+
+}