summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrunal Soni <ksoni@codeaurora.org>2018-02-02 01:25:19 -0800
committersnandini <snandini@codeaurora.org>2018-02-09 13:47:39 -0800
commit1f8be25f699c4602270cc3c28a5fcdcf0b66a0b2 (patch)
tree69d77d8f1d19246640fd6bd14ec2f0da37a3e93f
parent8799542b3cd69a8eb9cc5c5faafc44bfabe793ef (diff)
qcacld-3.0: Send certain DTIM params when LI offload is enabled
It is decided to centralize the logic of programming LI based on modulated/dynamic DTIM in FW to address the concerns with LFR3.0 in WoW mode. In order to make it work, following steps need to be performed. 1) If listen interval offload bit is enabled in service ready extension then, a) Driver needs to send "gEnableModulatedDTIM", "gMaxLIModulatedDTIM" and "gEnableDynamicDTIM" params' value to FW via VDEV PARAM up on each successful association. b) Driver should not program LI during suspend()/resume() 2) If listen interval offload bit is disabled in service ready extension then don't trigger above changes. Change-Id: I6f94c95bd83e5846d7290d5dc752b14da5951a76 CRs-Fixed: 2187597
-rw-r--r--core/wma/src/wma_dev_if.c35
-rw-r--r--core/wma/src/wma_power.c22
2 files changed, 54 insertions, 3 deletions
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index 4941536108d1..14d76329dbb2 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/core/wma/src/wma_dev_if.c
@@ -4764,6 +4764,41 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
if (params->enableAmpduPs && (params->htCapable || params->vhtCapable))
wma_set_ppsconfig(params->smesessionId,
WMA_VHT_PPS_DELIM_CRC_FAIL, 1);
+ if (WMI_SERVICE_EXT_IS_ENABLED(wma->wmi_service_bitmap,
+ wma->wmi_service_ext_bitmap,
+ WMI_SERVICE_LISTEN_INTERVAL_OFFLOAD_SUPPORT)) {
+ WMA_LOGD("%s: listen interval offload enabled, setting params",
+ __func__);
+ status = wma_vdev_set_param(wma->wmi_handle,
+ params->smesessionId,
+ WMI_VDEV_PARAM_MAX_LI_OF_MODDTIM,
+ wma->staMaxLIModDtim);
+ if (status != QDF_STATUS_SUCCESS) {
+ WMA_LOGE(FL("can't set MAX_LI for session: %d"),
+ params->smesessionId);
+ }
+ status = wma_vdev_set_param(wma->wmi_handle,
+ params->smesessionId,
+ WMI_VDEV_PARAM_DYNDTIM_CNT,
+ wma->staDynamicDtim);
+ if (status != QDF_STATUS_SUCCESS) {
+ WMA_LOGE(FL("can't set DYNDTIM_CNT for session: %d"),
+ params->smesessionId);
+ }
+ status = wma_vdev_set_param(wma->wmi_handle,
+ params->smesessionId,
+ WMI_VDEV_PARAM_MODDTIM_CNT,
+ wma->staModDtim);
+ if (status != QDF_STATUS_SUCCESS) {
+ WMA_LOGE(FL("can't set DTIM_CNT for session: %d"),
+ params->smesessionId);
+ }
+
+ } else {
+ WMA_LOGD("%s: listen interval offload is not set",
+ __func__);
+ }
+
iface->aid = params->assocId;
params->nss = iface->nss;
out:
diff --git a/core/wma/src/wma_power.c b/core/wma/src/wma_power.c
index cf13afeed47e..721be0443b4d 100644
--- a/core/wma/src/wma_power.c
+++ b/core/wma/src/wma_power.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1951,15 +1951,23 @@ static inline uint8_t wma_is_user_set_li_params(struct wma_txrx_node *iface)
void wma_set_suspend_dtim(tp_wma_handle wma)
{
uint8_t i;
+ bool li_offload_support = false;
if (NULL == wma) {
WMA_LOGE("%s: wma is NULL", __func__);
return;
}
+ if (WMI_SERVICE_EXT_IS_ENABLED(wma->wmi_service_bitmap,
+ wma->wmi_service_ext_bitmap,
+ WMI_SERVICE_LISTEN_INTERVAL_OFFLOAD_SUPPORT)) {
+ WMA_LOGD("%s: listen interval support is enabled", __func__);
+ li_offload_support = true;
+ }
for (i = 0; i < wma->max_bssid; i++) {
if (wma->interfaces[i].handle) {
- if (!wma_is_user_set_li_params(&wma->interfaces[i]))
+ if (!wma_is_user_set_li_params(&wma->interfaces[i]) &&
+ !li_offload_support)
wma_set_vdev_suspend_dtim(wma, i);
wma_configure_vdev_suspend_params(wma, i);
}
@@ -2099,15 +2107,23 @@ static void wma_set_vdev_resume_dtim(tp_wma_handle wma, uint8_t vdev_id)
void wma_set_resume_dtim(tp_wma_handle wma)
{
uint8_t i;
+ bool li_offload_support = false;
if (NULL == wma) {
WMA_LOGE("%s: wma is NULL", __func__);
return;
}
+ if (WMI_SERVICE_EXT_IS_ENABLED(wma->wmi_service_bitmap,
+ wma->wmi_service_ext_bitmap,
+ WMI_SERVICE_LISTEN_INTERVAL_OFFLOAD_SUPPORT)) {
+ WMA_LOGD("%s: listen interval support is enabled", __func__);
+ li_offload_support = true;
+ }
for (i = 0; i < wma->max_bssid; i++) {
if (wma->interfaces[i].handle) {
- if (!wma_is_user_set_li_params(&wma->interfaces[i]))
+ if (!wma_is_user_set_li_params(&wma->interfaces[i]) &&
+ !li_offload_support)
wma_set_vdev_resume_dtim(wma, i);
wma_configure_vdev_resume_params(wma, i);
}