summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wl18xx/acx.c
diff options
context:
space:
mode:
authorKobi L2014-12-29 07:24:06 +0100
committerKalle Valo2015-01-09 14:47:56 +0100
commite2f1e50f62ae70c7ddde8420ed586c6a1aa1e28c (patch)
treeac6899c92762ba38f8f2eb0c3fc251b09044fec0 /drivers/net/wireless/ti/wl18xx/acx.c
parentwlcore: enable AP wowlan (diff)
downloadkernel-qcow2-linux-e2f1e50f62ae70c7ddde8420ed586c6a1aa1e28c.tar.gz
kernel-qcow2-linux-e2f1e50f62ae70c7ddde8420ed586c6a1aa1e28c.tar.xz
kernel-qcow2-linux-e2f1e50f62ae70c7ddde8420ed586c6a1aa1e28c.zip
wlcore: enable sleep during AP mode operation
Enable ELP authorization in AP mode and enable the use of the wakeup bit in the ELP register. Introduce AP role sleep configuration which is disabled by default. When configured, it allows the AP to sleep when ELP is authorized for it. Signed-off-by: Kobi Leibovitch <kobi.lev100@gmail.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx/acx.c')
-rw-r--r--drivers/net/wireless/ti/wl18xx/acx.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/acx.c b/drivers/net/wireless/ti/wl18xx/acx.c
index 9d4b9aacd037..67f2a0eec854 100644
--- a/drivers/net/wireless/ti/wl18xx/acx.c
+++ b/drivers/net/wireless/ti/wl18xx/acx.c
@@ -24,6 +24,7 @@
#include "../wlcore/acx.h"
#include "acx.h"
+#include "wl18xx.h"
int wl18xx_acx_host_if_cfg_bitmap(struct wl1271 *wl, u32 host_cfg_bitmap,
u32 sdio_blk_size, u32 extra_mem_blks,
@@ -250,3 +251,34 @@ out:
kfree(acx);
return ret;
}
+
+int wl18xx_acx_ap_sleep(struct wl1271 *wl)
+{
+ struct wl18xx_priv *priv = wl->priv;
+ struct acx_ap_sleep_cfg *acx;
+ struct conf_ap_sleep_settings *conf = &priv->conf.ap_sleep;
+ int ret;
+
+ wl1271_debug(DEBUG_ACX, "acx config ap sleep");
+
+ acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+ if (!acx) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ acx->idle_duty_cycle = conf->idle_duty_cycle;
+ acx->connected_duty_cycle = conf->connected_duty_cycle;
+ acx->max_stations_thresh = conf->max_stations_thresh;
+ acx->idle_conn_thresh = conf->idle_conn_thresh;
+
+ ret = wl1271_cmd_configure(wl, ACX_AP_SLEEP_CFG, acx, sizeof(*acx));
+ if (ret < 0) {
+ wl1271_warning("acx config ap-sleep failed: %d", ret);
+ goto out;
+ }
+
+out:
+ kfree(acx);
+ return ret;
+}