From f1b455c7b5e89e4d0ff635b38574bd42514b2c8d Mon Sep 17 00:00:00 2001 From: Paul Zhang Date: Mon, 26 Sep 2016 14:54:19 +0800 Subject: [PATCH] qcacld-3.0: Ensure the fw parameters are restored Propagation from qcacld-2.0 to qcacld-3.0. It is the regression issue caused by ChangeId I6223ab27c2285c53c45fd388bd56cadc6d348324. When changing the TX_WAKE_THRESHOLD to TX_WAKE_THRESHOLD_NEVER, the function wmi_unified_set_sta_ps_param will set iface->ps_enabled to FALSE. Because of this in function wma_set_vdev_resume_dtim, "iface->ps_enabled == TRUE" check fails which is not expected. To mitigate this issue, remove the unnecessary code related to iface->ps_enabled. Change-Id: I59a8b150cf8383bf265c048c9fa1b26646e68dc0 CRs-Fixed: 1039904 --- core/wma/inc/wma.h | 1 - core/wma/src/wma_power.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index ba99b9585100..a01d33fa55f0 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -1061,7 +1061,6 @@ struct wma_txrx_node { int8_t max_tx_power; uint32_t nwType; void *staKeyParams; - bool ps_enabled; uint32_t dtim_policy; uint32_t peer_count; bool roam_synch_in_progress; diff --git a/core/wma/src/wma_power.c b/core/wma/src/wma_power.c index 0154f7bb9901..23a7f6d4b5c5 100644 --- a/core/wma/src/wma_power.c +++ b/core/wma/src/wma_power.c @@ -135,8 +135,6 @@ QDF_STATUS wma_unified_set_sta_ps_param(wmi_unified_t wmi_handle, status = wmi_unified_sta_ps_cmd_send(wmi_handle, &sta_ps_param); if (QDF_IS_STATUS_ERROR(status)) return status; - /* Store the PS Status */ - iface->ps_enabled = value ? true : false; return status; } @@ -1744,7 +1742,6 @@ static void wma_set_vdev_suspend_dtim(tp_wma_handle wma, uint8_t vdev_id) enum powersave_qpower_mode qpower_config = wma_get_qpower_config(wma); if ((iface->type == WMI_VDEV_TYPE_STA) && - (iface->ps_enabled == true) && (iface->dtimPeriod != 0)) { QDF_STATUS ret; uint32_t listen_interval; @@ -1797,8 +1794,6 @@ static void wma_set_vdev_suspend_dtim(tp_wma_handle wma, uint8_t vdev_id) 0); if (QDF_IS_STATUS_ERROR(ret)) WMA_LOGE("Failed to disable Qpower in suspend mode!"); - - iface->ps_enabled = true; } ret = wma_vdev_set_param(wma->wmi_handle, vdev_id, @@ -1850,7 +1845,6 @@ static void wma_set_vdev_resume_dtim(tp_wma_handle wma, uint8_t vdev_id) enum powersave_qpower_mode qpower_config = wma_get_qpower_config(wma); if ((iface->type == WMI_VDEV_TYPE_STA) && - (iface->ps_enabled == true) && (iface->dtim_policy == NORMAL_DTIM)) { QDF_STATUS ret; uint32_t cfg_data_val = 0;