浏览代码

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
Yeshwanth Sriram Guntuka 6 年之前
父节点
当前提交
06f9cd1d0b
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      core/sme/src/common/sme_power_save.c

+ 6 - 1
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
 	 */