diff options
| author | Kiran Kumar Lokere <klokere@codeaurora.org> | 2017-03-07 19:28:36 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-03-09 22:55:25 -0800 |
| commit | 57dcc43ba415e2240e7ae4d426bfdeca0647ce2d (patch) | |
| tree | 9b428a7ea9472209066c51ff076e2d676321dacc | |
| parent | 954d86c71e2aa04e3aaa5f7640df5012c86e5ebb (diff) | |
qcacld-3.0: Disable Qpower with UAPSD or max ps-poll enabled
Disable Qpower when UAPSD is enabled or if the max ps poll is
configured by user.
Change-Id: If9c747406d65a6f89fa123592c3f9d79724b8ae0
CRs-Fixed: 2017432
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 19 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_power.c | 8 | ||||
| -rw-r--r-- | core/sme/src/qos/sme_qos.c | 3 | ||||
| -rw-r--r-- | core/wma/src/wma_power.c | 19 |
4 files changed, 47 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 8613ee344d0e..345a9abffcf2 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -7246,8 +7246,23 @@ static int hdd_update_cds_config(hdd_context_t *hdd_ctx) } cds_cfg->driver_type = DRIVER_TYPE_PRODUCTION; - cds_cfg->powersave_offload_enabled = - hdd_ctx->config->enablePowersaveOffload; + if (!hdd_ctx->config->nMaxPsPoll || + !hdd_ctx->config->enablePowersaveOffload) { + cds_cfg->powersave_offload_enabled = + hdd_ctx->config->enablePowersaveOffload; + } else { + if ((hdd_ctx->config->enablePowersaveOffload == + PS_QPOWER_NODEEPSLEEP) || + (hdd_ctx->config->enablePowersaveOffload == + PS_LEGACY_NODEEPSLEEP)) + cds_cfg->powersave_offload_enabled = + PS_LEGACY_NODEEPSLEEP; + else + cds_cfg->powersave_offload_enabled = + PS_LEGACY_DEEPSLEEP; + hdd_info("Qpower disabled in cds config, %d", + cds_cfg->powersave_offload_enabled); + } cds_cfg->sta_dynamic_dtim = hdd_ctx->config->enableDynamicDTIM; cds_cfg->sta_mod_dtim = hdd_ctx->config->enableModulatedDTIM; cds_cfg->sta_maxlimod_dtim = hdd_ctx->config->fMaxLIModulatedDTIM; diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index da78c0c7df5a..7d67d06d1580 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -2512,6 +2512,14 @@ int hdd_set_qpower_config(hdd_context_t *hddctx, hdd_adapter_t *adapter, return -EINVAL; } + if (hddctx->config->nMaxPsPoll) { + if ((qpower == PS_QPOWER_NODEEPSLEEP) || + (qpower == PS_LEGACY_NODEEPSLEEP)) + qpower = PS_LEGACY_NODEEPSLEEP; + else + qpower = PS_LEGACY_DEEPSLEEP; + hdd_info("Qpower disabled, %d", qpower); + } status = wma_set_qpower_config(adapter->sessionId, qpower); if (status != QDF_STATUS_SUCCESS) { hdd_err("failed to configure qpower: %d", status); diff --git a/core/sme/src/qos/sme_qos.c b/core/sme/src/qos/sme_qos.c index 5d3eef1782ce..f6db2f6f593f 100644 --- a/core/sme/src/qos/sme_qos.c +++ b/core/sme/src/qos/sme_qos.c @@ -4261,6 +4261,7 @@ QDF_STATUS sme_qos_process_del_ts_ind(tpAniSirGlobal pMac, void *pMsgBuf) uint8_t sessionId = pdeltsind->sessionId; sme_QosEdcaAcType ac; sme_QosSearchInfo search_key; + tSirMacTSInfo *tsinfo; sme_QosWmmUpType up = (sme_QosWmmUpType) pdeltsind->rsp.tspec.tsinfo.traffic.userPrio; #ifdef FEATURE_WLAN_DIAG_SUPPORT @@ -4269,6 +4270,7 @@ QDF_STATUS sme_qos_process_del_ts_ind(tpAniSirGlobal pMac, void *pMsgBuf) QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG, "%s: %d: Invoked on session %d for UP %d", __func__, __LINE__, sessionId, up); + tsinfo = &pdeltsind->rsp.tspec.tsinfo; ac = sme_qos_up_to_ac(up); if (SME_QOS_EDCA_AC_MAX == ac) { /* err msg */ @@ -4295,6 +4297,7 @@ QDF_STATUS sme_qos_process_del_ts_ind(tpAniSirGlobal pMac, void *pMsgBuf) QDF_ASSERT(0); return QDF_STATUS_E_FAILURE; } + sme_set_tspec_uapsd_mask_per_session(pMac, tsinfo, sessionId); /* event: EVENT_WLAN_QOS */ #ifdef FEATURE_WLAN_DIAG_SUPPORT qos.eventId = SME_QOS_DIAG_DELTS; diff --git a/core/wma/src/wma_power.c b/core/wma/src/wma_power.c index b422ee044837..19759451ffb3 100644 --- a/core/wma/src/wma_power.c +++ b/core/wma/src/wma_power.c @@ -771,6 +771,10 @@ void wma_enable_sta_ps_mode(tp_wma_handle wma, tpEnablePsParams ps_req) return; } if (eSIR_ADDON_NOTHING == ps_req->psSetting) { + if (qpower_config && iface->uapsd_cached_val) { + qpower_config = 0; + WMA_LOGD("Qpower is disabled"); + } WMA_LOGD("Enable Sta Mode Ps vdevId %d", vdev_id); ret = wma_unified_set_sta_ps_param(wma->wmi_handle, vdev_id, WMI_STA_PS_PARAM_UAPSD, 0); @@ -808,6 +812,10 @@ void wma_enable_sta_ps_mode(tp_wma_handle wma, tpEnablePsParams ps_req) vdev_id, uapsd_val); } + if (qpower_config && iface->uapsd_cached_val) { + qpower_config = 0; + WMA_LOGD("Qpower is disabled"); + } WMA_LOGD("Enable Forced Sleep vdevId %d", vdev_id); ret = wma_set_force_sleep(wma, vdev_id, true, qpower_config, true); @@ -886,6 +894,12 @@ void wma_enable_uapsd_mode(tp_wma_handle wma, tpEnableUapsdParams ps_req) uint32_t vdev_id = ps_req->sessionid; uint32_t uapsd_val = 0; enum powersave_qpower_mode qpower_config = wma_get_qpower_config(wma); + struct wma_txrx_node *iface = &wma->interfaces[vdev_id]; + + if (!iface->handle) { + WMA_LOGE("vdev id %d is not active", vdev_id); + return; + } /* Disable Sta Mode Power save */ ret = wmi_unified_set_sta_ps(wma->wmi_handle, vdev_id, false); @@ -904,6 +918,11 @@ void wma_enable_uapsd_mode(tp_wma_handle wma, tpEnableUapsdParams ps_req) return; } + if (qpower_config && uapsd_val) { + qpower_config = 0; + WMA_LOGD("Disable Qpower %d", vdev_id); + } + iface->uapsd_cached_val = uapsd_val; WMA_LOGD("Enable Forced Sleep vdevId %d", vdev_id); ret = wma_set_force_sleep(wma, vdev_id, true, qpower_config, ps_req->uapsdParams.enable_ps); |
