瀏覽代碼

qcacld-3.0: Remove INI parameter gDataInactivityTimeout

As part of WiFi ini clean-up FR, the ini parameter
gDataInactivityTimeout, is identified as it is no longer used
and hence it can be deprecated.

Change-Id: Ic01ba8934058cf2fb3bec042f11b01ea70ef7a3f
CRs-Fixed: 2896042
Aditya Kodukula 4 年之前
父節點
當前提交
7beff561cc

+ 0 - 2
components/mlme/core/src/wlan_mlme_main.c

@@ -684,8 +684,6 @@ static void mlme_init_timeout_cfg(struct wlan_objmgr_psoc *psoc,
 			cfg_get(psoc, CFG_AP_KEEP_ALIVE_TIMEOUT);
 	timeouts->ap_link_monitor_timeout =
 			cfg_get(psoc, CFG_AP_LINK_MONITOR_TIMEOUT);
-	timeouts->ps_data_inactivity_timeout =
-			cfg_get(psoc, CFG_PS_DATA_INACTIVITY_TIMEOUT);
 	timeouts->wmi_wq_watchdog_timeout =
 			cfg_get(psoc, CFG_WMI_WQ_WATCHDOG);
 }

+ 2 - 27
components/mlme/dispatcher/inc/cfg_mlme_timeout.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2019, 2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -262,30 +262,6 @@
 		CFG_VALUE_OR_DEFAULT, \
 		"AP link monitor timeout")
 
-/*
- * <ini>
- * gDataInactivityTimeout - Data inactivity timeout for non wow mode.
- * @Min: 1
- * @Max: 255
- * @Default: 200
- *
- * This ini is used to set data inactivity timeout value, in milliseconds, of
- * non wow mode.
- *
- * Supported Feature: inactivity timeout in non wow mode
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_PS_DATA_INACTIVITY_TIMEOUT CFG_INI_UINT( \
-		"gDataInactivityTimeout", \
-		1, \
-		255, \
-		200, \
-		CFG_VALUE_OR_DEFAULT, \
-		"PS data inactivity timeout")
-
 /*
  * <ini>
  * wmi_wq_watchdog - Sets timeout period for wmi watchdog bite.
@@ -324,7 +300,6 @@
 	CFG(CFG_HEART_BEAT_THRESHOLD) \
 	CFG(CFG_AP_KEEP_ALIVE_TIMEOUT) \
 	CFG(CFG_AP_LINK_MONITOR_TIMEOUT) \
-	CFG(CFG_WMI_WQ_WATCHDOG) \
-	CFG(CFG_PS_DATA_INACTIVITY_TIMEOUT)
+	CFG(CFG_WMI_WQ_WATCHDOG)
 
 #endif /* __CFG_MLME_TIMEOUT_H */

+ 0 - 2
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -2198,7 +2198,6 @@ struct wlan_mlme_power {
  * @heart_beat_threshold: Heart beat threshold
  * @ap_keep_alive_timeout: AP keep alive timeout value
  * @ap_link_monitor_timeout: AP link monitor timeout value
- * @ps_data_inactivity_timeout: PS data inactivity timeout
  * @wmi_wq_watchdog_timeout: timeout period for wmi watchdog bite
  */
 struct wlan_mlme_timeout {
@@ -2214,7 +2213,6 @@ struct wlan_mlme_timeout {
 	uint32_t heart_beat_threshold;
 	uint32_t ap_keep_alive_timeout;
 	uint32_t ap_link_monitor_timeout;
-	uint32_t ps_data_inactivity_timeout;
 	uint32_t wmi_wq_watchdog_timeout;
 };
 

+ 0 - 22
components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -1272,28 +1272,6 @@ QDF_STATUS
 ucfg_mlme_set_wmi_wq_watchdog_timeout(struct wlan_objmgr_psoc *psoc,
 				      uint32_t wmi_wq_watchdog_timeout);
 
-/**
- * ucfg_mlme_get_ps_data_inactivity_timeout() - Get data inactivity timeout
- * @psoc: pointer to psoc object
- * @inactivity_timeout: buffer to hold value
- *
- * Return: QDF Status
- */
-QDF_STATUS
-ucfg_mlme_get_ps_data_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
-					 uint32_t *inactivity_timeout);
-
-/**
- * ucfg_mlme_set_ps_data_inactivity_timeout() - Set data inactivity timeout
- * @psoc: pointer to psoc object
- * @inactivity_timeout: value to be set
- *
- * Return: QDF Status
- */
-QDF_STATUS
-ucfg_mlme_set_ps_data_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
-					 uint32_t inactivity_timeout);
-
 /**
  * ucfg_mlme_set_sap_listen_interval() - Set the Sap listen interval
  * @psoc: pointer to psoc object

+ 0 - 37
components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c

@@ -1127,43 +1127,6 @@ ucfg_mlme_stats_is_link_speed_report_max_scaled(struct wlan_objmgr_psoc *psoc)
 	return (report_link_speed == CFG_STATS_LINK_SPEED_REPORT_MAX_SCALED);
 }
 
-QDF_STATUS
-ucfg_mlme_get_ps_data_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
-					 uint32_t *inactivity_timeout)
-{
-	struct wlan_mlme_psoc_ext_obj *mlme_obj;
-
-	mlme_obj = mlme_get_psoc_ext_obj(psoc);
-	if (!mlme_obj) {
-		*inactivity_timeout =
-			cfg_default(CFG_PS_DATA_INACTIVITY_TIMEOUT);
-		return QDF_STATUS_E_FAILURE;
-	}
-	*inactivity_timeout = mlme_obj->cfg.timeouts.ps_data_inactivity_timeout;
-
-	return QDF_STATUS_SUCCESS;
-}
-
-QDF_STATUS
-ucfg_mlme_set_ps_data_inactivity_timeout(struct wlan_objmgr_psoc *psoc,
-					 uint32_t inactivity_timeout)
-{
-	struct wlan_mlme_psoc_ext_obj *mlme_obj;
-
-	mlme_obj = mlme_get_psoc_ext_obj(psoc);
-	if (!mlme_obj)
-		return QDF_STATUS_E_INVAL;
-
-	if (!cfg_in_range(CFG_PS_DATA_INACTIVITY_TIMEOUT, inactivity_timeout)) {
-		mlme_legacy_err("inactivity timeout set value is invalid %d",
-				inactivity_timeout);
-		return QDF_STATUS_E_INVAL;
-	}
-	mlme_obj->cfg.timeouts.ps_data_inactivity_timeout = inactivity_timeout;
-
-	return QDF_STATUS_SUCCESS;
-}
-
 QDF_STATUS
 ucfg_mlme_get_sta_keepalive_method(struct wlan_objmgr_psoc *psoc,
 				   enum station_keepalive_method *val)

+ 0 - 2
components/pmo/core/src/wlan_pmo_main.c

@@ -227,8 +227,6 @@ static void wlan_pmo_init_cfg(struct wlan_objmgr_psoc *psoc,
 	psoc_cfg->enable_sap_suspend = cfg_get(psoc, CFG_ENABLE_SAP_SUSPEND);
 	psoc_cfg->wow_data_inactivity_timeout =
 			cfg_get(psoc, CFG_PMO_WOW_DATA_INACTIVITY_TIMEOUT);
-	psoc_cfg->ps_data_inactivity_timeout =
-			cfg_get(psoc, CFG_PS_DATA_INACTIVITY_TIMEOUT);
 	psoc_cfg->active_uc_apf_mode =
 			cfg_get(psoc, CFG_ACTIVE_UC_APF_MODE);
 	psoc_cfg->active_mc_bc_apf_mode =

+ 2 - 3
components/pmo/core/src/wlan_pmo_suspend_resume.c

@@ -199,7 +199,7 @@ static void pmo_configure_vdev_suspend_params(
 			  vdev_id);
 	}
 
-	non_wow_inactivity_time = psoc_cfg->ps_data_inactivity_timeout;
+	non_wow_inactivity_time = PS_DATA_INACTIVITY_TIMEOUT;
 	wow_inactivity_time = psoc_cfg->wow_data_inactivity_timeout;
 	/*
 	 * To keep ito repeat count same in wow mode as in non wow mode,
@@ -228,7 +228,6 @@ static void pmo_configure_vdev_resume_params(
 	QDF_STATUS ret;
 	uint8_t vdev_id;
 	enum QDF_OPMODE opmode = pmo_core_get_vdev_op_mode(vdev);
-	struct pmo_psoc_cfg *psoc_cfg = &vdev_ctx->pmo_psoc_ctx->psoc_cfg;
 
 	pmo_enter();
 
@@ -237,7 +236,7 @@ static void pmo_configure_vdev_resume_params(
 		return;
 	ret = pmo_tgt_send_vdev_sta_ps_param(vdev,
 					 pmo_sta_ps_param_inactivity_time,
-					 psoc_cfg->ps_data_inactivity_timeout);
+					 PS_DATA_INACTIVITY_TIMEOUT);
 	if (QDF_IS_STATUS_ERROR(ret)) {
 		pmo_debug("Failed to Set inactivity timeout vdevId %d",
 			  vdev_id);

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

@@ -317,7 +317,6 @@ enum pmo_gpio_wakeup_mode {
  * @wow_pulse_init_state: Pulse init level
  * @packet_filters_bitmap: Packet filter bitmap configuration
  * @wow_data_inactivity_timeout: power save wow data inactivity timeout
- * @ps_data_inactivity_timeout: Power save data inactivity timeout for non
  *  wow mode
  * @active_uc_apf_mode: Setting that determines how APF is applied in active
  *	mode for uc packets
@@ -389,7 +388,6 @@ struct pmo_psoc_cfg {
 #endif
 	bool enable_sap_suspend;
 	uint8_t wow_data_inactivity_timeout;
-	uint8_t ps_data_inactivity_timeout;
 	enum active_apf_mode active_uc_apf_mode;
 	enum active_apf_mode active_mc_bc_apf_mode;
 	uint8_t ito_repeat_count;

+ 2 - 7
core/hdd/src/wlan_hdd_wext.c

@@ -3674,13 +3674,8 @@ static int hdd_we_set_max_assoc(struct hdd_adapter *adapter, int value)
 static int hdd_we_set_data_inactivity_timeout(struct hdd_adapter *adapter,
 					      int inactivity_timeout)
 {
-	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-	QDF_STATUS status;
-
-	status = ucfg_mlme_set_ps_data_inactivity_timeout(hdd_ctx->psoc,
-							  inactivity_timeout);
-
-	return qdf_status_to_os_return(status);
+	/* data inactivity timeout is no longer supported and is not used */
+	return -ENOTSUPP;
 }
 
 static int hdd_we_set_wow_data_inactivity_timeout(struct hdd_adapter *adapter,

+ 5 - 0
core/mac/inc/sir_api.h

@@ -50,6 +50,11 @@ struct mac_context;
 #include "qca_vendor.h"
 #include "wlan_cp_stats_mc_defs.h"
 
+/* The ini gDataInactivityTimeout is deprecated. So, definng a new macro
+ * PS_DATA_INACTIVITY_TIMEOUT with the ini's default value.
+ */
+#define PS_DATA_INACTIVITY_TIMEOUT (200)
+
 #define OFFSET_OF(structType, fldName)   (&((structType *)0)->fldName)
 #define WLAN_DOT11_BASIC_RATE_MASK (0x80)
 #define BITS_ON(_Field, _Bitmask)  ((_Field) |=  (_Bitmask))

+ 2 - 2
core/wma/src/wma_power.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -475,7 +475,7 @@ static QDF_STATUS wma_set_force_sleep(tp_wma_handle wma,
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	inactivity_time = mac->mlme_cfg->timeouts.ps_data_inactivity_timeout;
+	inactivity_time = PS_DATA_INACTIVITY_TIMEOUT;
 
 	if (enable) {
 		/* override normal configuration and force station asleep */