Browse Source

qcacld-3.0: Call correct PMO API for setting PS params

WMI_STA_PS_PARAM_INACTIVITY_TIME and
WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX
need to be sent as WMI_STA_POWERSAVE_PARAM_CMDID param IDs.
Thus use pmo_tgt_send_vdev_sta_ps_param instead of
pmo_tgt_vdev_update_param_req in appropriate locations.

Change-Id: Ie9438cd88540a9bbcaf120b3d0a32d355f85002d
CRs-fixed: 2457998
Manikandan Mohan 5 years ago
parent
commit
6bd71be66e

+ 8 - 11
components/pmo/core/src/wlan_pmo_suspend_resume.c

@@ -178,10 +178,9 @@ static void pmo_configure_vdev_suspend_params(
 	vdev_id = pmo_vdev_get_id(vdev);
 	if (!PMO_VDEV_IN_STA_MODE(opmode))
 		return;
-	ret = pmo_tgt_vdev_update_param_req(
-				vdev,
-				pmo_vdev_param_inactivity_time,
-				psoc_cfg->wow_data_inactivity_timeout);
+	ret = pmo_tgt_send_vdev_sta_ps_param(vdev,
+					pmo_sta_ps_param_inactivity_time,
+					psoc_cfg->wow_data_inactivity_timeout);
 	if (QDF_IS_STATUS_ERROR(ret)) {
 		pmo_debug("Failed to Set wow inactivity timeout vdevId %d",
 			  vdev_id);
@@ -197,9 +196,8 @@ static void pmo_configure_vdev_suspend_params(
 				  wow_inactivity_time) *
 					psoc_cfg->ito_repeat_count;
 	if (ito_repeat_count_value)
-		ret = pmo_tgt_vdev_update_param_req(
-					vdev,
-					pmo_vdev_param_ito_repeat_count,
+		ret = pmo_tgt_send_vdev_sta_ps_param(vdev,
+					pmo_sta_ps_param_ito_repeat_count,
 					psoc_cfg->wow_data_inactivity_timeout);
 	if (QDF_IS_STATUS_ERROR(ret)) {
 		pmo_err("Failed to Set ito repeat count vdevId %d",
@@ -224,10 +222,9 @@ static void pmo_configure_vdev_resume_params(
 	vdev_id = pmo_vdev_get_id(vdev);
 	if (!PMO_VDEV_IN_STA_MODE(opmode))
 		return;
-	ret = pmo_tgt_vdev_update_param_req(
-					vdev,
-					pmo_vdev_param_inactivity_time,
-					psoc_cfg->ps_data_inactivity_timeout);
+	ret = pmo_tgt_send_vdev_sta_ps_param(vdev,
+					 pmo_sta_ps_param_inactivity_time,
+					 psoc_cfg->ps_data_inactivity_timeout);
 	if (QDF_IS_STATUS_ERROR(ret)) {
 		pmo_debug("Failed to Set inactivity timeout vdevId %d",
 			  vdev_id);

+ 2 - 4
components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h

@@ -60,14 +60,10 @@
  * @pmo_vdev_param_listen_interval: vdev listen interval param id
  * @pmo_vdev_param_dtim_policy: vdev param dtim policy
  * @pmo_vdev_max_param: Max vdev param id
- * @pmo_vdev_param_inactivity_time: inactivity time value
- * @pmo_vdev_param_ito_repeat_count: Indicates ito repeated count
  */
 enum pmo_vdev_param_id {
 	pmo_vdev_param_listen_interval = 0,
 	pmo_vdev_param_dtim_policy,
-	pmo_vdev_param_inactivity_time,
-	pmo_vdev_param_ito_repeat_count,
 	pmo_vdev_max_param
 };
 
@@ -98,6 +94,7 @@ enum pmo_beacon_dtim_policy {
  * @pmo_sta_ps_enable_qpower:  Enable QPower
  * @pmo_sta_ps_param_qpower_max_tx_before_wake: Number of TX frames before the
     entering the Active state
+ * @pmo_sta_ps_param_ito_repeat_count: Indicates ito repeated count
  */
 enum pmo_sta_powersave_param {
 	pmo_sta_ps_param_rx_wake_policy = 0,
@@ -108,6 +105,7 @@ enum pmo_sta_powersave_param {
 	pmo_sta_ps_param_qpower_pspoll_count = 5,
 	pmo_sta_ps_enable_qpower = 6,
 	pmo_sta_ps_param_qpower_max_tx_before_wake = 7,
+	pmo_sta_ps_param_ito_repeat_count = 8,
 };
 
 /**

+ 13 - 6
components/target_if/pmo/src/target_if_pmo_suspend_resume.c

@@ -55,6 +55,7 @@ QDF_STATUS target_if_pmo_send_vdev_update_param_req(
 	 * so that it will not invoke runtime PM "get" which will
 	 * result resume right after suspend (WOW_ENABLE).
 	 */
+
 	switch (param_id) {
 	case pmo_vdev_param_listen_interval:
 		param_id = WMI_VDEV_PARAM_LISTEN_INTERVAL;
@@ -62,12 +63,6 @@ QDF_STATUS target_if_pmo_send_vdev_update_param_req(
 	case pmo_vdev_param_dtim_policy:
 		param_id = WMI_VDEV_PARAM_DTIM_POLICY;
 		break;
-	case pmo_vdev_param_inactivity_time:
-		param_id = WMI_STA_PS_PARAM_INACTIVITY_TIME;
-		break;
-	case pmo_vdev_param_ito_repeat_count:
-		param_id = WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX;
-		break;
 	default:
 		target_if_err("invalid vdev param id %d", param_id);
 		return QDF_STATUS_E_INVAL;
@@ -110,10 +105,22 @@ QDF_STATUS target_if_pmo_send_vdev_ps_param_req(
 		return QDF_STATUS_E_INVAL;
 	}
 
+	/*
+	 * Any new param_id added here must be added to
+	 * wmi_tag_sta_powersave_cmd() to be tagged for runtime PM feature
+	 * so that it will not invoke runtime PM "get" which will
+	 * result resume right after suspend (WOW_ENABLE).
+	 */
 	switch (param_id) {
 	case pmo_sta_ps_enable_qpower:
 		param_id = WMI_STA_PS_ENABLE_QPOWER;
 		break;
+	case pmo_sta_ps_param_inactivity_time:
+		param_id = WMI_STA_PS_PARAM_INACTIVITY_TIME;
+		break;
+	case pmo_sta_ps_param_ito_repeat_count:
+		param_id = WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX;
+		break;
 	default:
 		target_if_err("invalid vdev param id %d", param_id);
 		return QDF_STATUS_E_INVAL;