summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti/wl18xx/acx.c
diff options
context:
space:
mode:
authorRam Amrani2014-12-29 07:24:04 +0100
committerKalle Valo2015-01-09 14:47:53 +0100
commit6d5a748d4836ddd0ca626fe4870942a0e90a5c3d (patch)
treeb4fc2b66953dbe86b4a38f23cc18773f30a79851 /drivers/net/wireless/ti/wl18xx/acx.c
parentwlcore/wl18xx: handle rc updates in a separate work (diff)
downloadkernel-qcow2-linux-6d5a748d4836ddd0ca626fe4870942a0e90a5c3d.tar.gz
kernel-qcow2-linux-6d5a748d4836ddd0ca626fe4870942a0e90a5c3d.tar.xz
kernel-qcow2-linux-6d5a748d4836ddd0ca626fe4870942a0e90a5c3d.zip
wlcore: add ability to reduce FW interrupts during suspend
Add the ability to mask FW interrupts on RX BA activity, PSM entry/exit and fast-link notifications. This is used when the host is suspended in order to decrease redundant wake ups. Signed-off-by: Ram Amrani <ramrani@ti.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.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/acx.c b/drivers/net/wireless/ti/wl18xx/acx.c
index a169bb5a5dbf..9d4b9aacd037 100644
--- a/drivers/net/wireless/ti/wl18xx/acx.c
+++ b/drivers/net/wireless/ti/wl18xx/acx.c
@@ -194,3 +194,59 @@ out:
kfree(acx);
return ret;
}
+
+/*
+ * When the host is suspended, we don't want to get any fast-link/PSM
+ * notifications
+ */
+int wl18xx_acx_interrupt_notify_config(struct wl1271 *wl,
+ bool action)
+{
+ struct wl18xx_acx_interrupt_notify *acx;
+ int ret = 0;
+
+ acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+ if (!acx) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ acx->enable = action;
+ ret = wl1271_cmd_configure(wl, ACX_INTERRUPT_NOTIFY, acx, sizeof(*acx));
+ if (ret < 0) {
+ wl1271_warning("acx interrupt notify setting failed: %d", ret);
+ goto out;
+ }
+
+out:
+ kfree(acx);
+ return ret;
+}
+
+/*
+ * When the host is suspended, we can configure the FW to disable RX BA
+ * notifications.
+ */
+int wl18xx_acx_rx_ba_filter(struct wl1271 *wl, bool action)
+{
+ struct wl18xx_acx_rx_ba_filter *acx;
+ int ret = 0;
+
+ acx = kzalloc(sizeof(*acx), GFP_KERNEL);
+ if (!acx) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ acx->enable = (u32)action;
+ ret = wl1271_cmd_configure(wl, ACX_RX_BA_FILTER, acx, sizeof(*acx));
+ if (ret < 0) {
+ wl1271_warning("acx rx ba activity filter setting failed: %d",
+ ret);
+ goto out;
+ }
+
+out:
+ kfree(acx);
+ return ret;
+}