From 06f9cd1d0b18849a4c81eea2d2b77a5d0430eb81 Mon Sep 17 00:00:00 2001 From: Yeshwanth Sriram Guntuka Date: Thu, 6 Dec 2018 17:25:23 +0530 Subject: [PATCH] qcacld-3.0: Validate session id before checking ps enable timer state Change interface received fails due to peer existing with same MAC address. As a result of this, session id is set to invalid in adapter. hdd_stop invoked after this disables auto ps timer but since session id is invalid, assert happens since the timer state is invalid. Fix is to validate session id before checking auto ps timer state. Change-Id: Ie5b5860dfdcc4d678021d8aa2d643f29465d4735 CRs-Fixed: 2365726 --- core/sme/src/common/sme_power_save.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c index 44620d6329f2..fe67550c7976 100644 --- a/core/sme/src/common/sme_power_save.c +++ b/core/sme/src/common/sme_power_save.c @@ -773,7 +773,12 @@ QDF_STATUS sme_ps_disable_auto_ps_timer(mac_handle_t mac_handle, { struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle); struct ps_global_info *ps_global_info = &mac_ctx->sme.ps_global_info; - struct ps_params *ps_param = &ps_global_info->ps_params[session_id]; + struct ps_params *ps_param; + + if (!sme_is_session_id_valid(mac_handle, session_id)) + return QDF_STATUS_SUCCESS; + + ps_param = &ps_global_info->ps_params[session_id]; /* * Stop the auto ps entry timer if runnin */