summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rsi/rsi_91x_ps.c
diff options
context:
space:
mode:
authorKarun Eagalapati <karun256@gmail.com>2017-08-03 19:59:00 +0530
committerKalle Valo <kvalo@codeaurora.org>2017-08-08 14:46:02 +0300
commitdb07971d085fa637816ce029a5411f2ce83ee672 (patch)
tree68dc1490fc23efbace4b48321d71b1892abfd7f9 /drivers/net/wireless/rsi/rsi_91x_ps.c
parentce86893fa8d8509d69bef70170ed8c797275c411 (diff)
rsi: add support for U-APSD power save
This patch adds support for U-APSD power save. Configuration frame is downloaded to firmware with default settings and support is advertised to mac80211 Signed-off-by: Karun Eagalapati <karun256@gmail.com> Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/rsi/rsi_91x_ps.c')
-rw-r--r--drivers/net/wireless/rsi/rsi_91x_ps.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_ps.c b/drivers/net/wireless/rsi/rsi_91x_ps.c
index 25e8f853837b..48c79f035c59 100644
--- a/drivers/net/wireless/rsi/rsi_91x_ps.c
+++ b/drivers/net/wireless/rsi/rsi_91x_ps.c
@@ -105,6 +105,22 @@ void rsi_disable_ps(struct rsi_hw *adapter)
rsi_modify_ps_state(adapter, PS_DISABLE_REQ_SENT);
}
+void rsi_conf_uapsd(struct rsi_hw *adapter)
+{
+ int ret;
+
+ if (adapter->ps_state != PS_ENABLED)
+ return;
+
+ ret = rsi_send_ps_request(adapter, false);
+ if (!ret)
+ ret = rsi_send_ps_request(adapter, true);
+ if (ret)
+ rsi_dbg(ERR_ZONE,
+ "%s: Failed to send PS request to device\n",
+ __func__);
+}
+
int rsi_handle_ps_confirm(struct rsi_hw *adapter, u8 *msg)
{
u16 cfm_type = get_unaligned_le16(msg + PS_CONFIRM_INDEX);
@@ -127,3 +143,4 @@ int rsi_handle_ps_confirm(struct rsi_hw *adapter, u8 *msg)
return 0;
}
+