summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiran Kumar Lokere <klokere@codeaurora.org>2017-09-19 20:44:14 -0700
committersnandini <snandini@codeaurora.org>2017-09-20 18:37:27 -0700
commit0276f9f4cfebcfe310d86bdbb493c8461e0257df (patch)
tree79a02bb84fe0d97aa96b705768884770085e63b5
parent9ecd24b1185b4d5ed3f9354ad1a4058513851ca0 (diff)
qcacld-3.0: Do not restart PS timer if PS check fails
Power save checks for user configuration and STA connection state, if either of these fails then do not restart the auto power save timer. Change-Id: I83a337b828677464c74800adf690c00fda68fadc CRs-Fixed: 2112585
-rw-r--r--core/sme/src/common/sme_power_save.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c
index fc2d4e40acb5..fc2911067051 100644
--- a/core/sme/src/common/sme_power_save.c
+++ b/core/sme/src/common/sme_power_save.c
@@ -1129,24 +1129,26 @@ QDF_STATUS sme_ps_open_per_session(tHalHandle hal_ctx, uint32_t session_id)
void sme_auto_ps_entry_timer_expired(void *data)
{
struct ps_params *ps_params = (struct ps_params *)data;
- tpAniSirGlobal mac_ctx = (tpAniSirGlobal)ps_params->mac_ctx;
- uint32_t session_id = ps_params->session_id;
+ tpAniSirGlobal mac_ctx;
+ uint32_t session_id;
QDF_STATUS status;
+ if (!ps_params) {
+ sme_err("ps_params is NULL");
+ return;
+ }
+ mac_ctx = (tpAniSirGlobal)ps_params->mac_ctx;
+ if (!mac_ctx) {
+ sme_err("mac_ctx is NULL");
+ return;
+ }
+ session_id = ps_params->session_id;
sme_debug("auto_ps_timer expired, enabling powersave");
status = sme_enable_sta_ps_check(mac_ctx, session_id);
if (QDF_STATUS_SUCCESS == status)
sme_ps_enable_disable((tHalHandle)mac_ctx, session_id,
SME_PS_ENABLE);
- else {
- sme_debug("failed to enable powersave, restarting timer");
- status = qdf_mc_timer_start(&ps_params->auto_ps_enable_timer,
- AUTO_PS_ENTRY_TIMER_DEFAULT_VALUE);
- if (!QDF_IS_STATUS_SUCCESS(status)
- && (QDF_STATUS_E_ALREADY != status))
- sme_err("Cannot start traffic timer");
- }
}
QDF_STATUS sme_ps_close(tHalHandle hal_ctx)