Эх сурвалжийг харах

qcacld-3.0: Add gTimerMultiplier ini item

Expose the new QDF timer multiplier APIs via a new ini configuration
item, gTimerMultiplier.

Change-Id: I76f86f1488f4335dc7f1f128e1469f3f4cf32645
CRs-Fixed: 2049308
Dustin Brown 8 жил өмнө
parent
commit
7f939930bb

+ 31 - 0
core/hdd/inc/wlan_hdd_cfg.h

@@ -9932,6 +9932,36 @@ enum l1ss_sleep_allowed {
 #define CFG_QCN_IE_SUPPORT_MAX      1
 #define CFG_QCN_IE_SUPPORT_DEFAULT  1
 
+/*
+ * <ini>
+ * gTimerMultiplier - Scale QDF timers by this value
+ * @Min: 1
+ * @Max: 0xFFFFFFFF
+ * @Default: 1 (100 for emulation)
+ *
+ * To assist in debugging emulation setups, scale QDF timers by this factor.
+ *
+ * @E.g.
+ *	# QDF timers expire in real time
+ *	gTimerMultiplier=1
+ *	# QDF timers expire after 100 times real time
+ *	gTimerMultiplier=100
+ *
+ * Related: N/A
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_TIMER_MULTIPLIER_NAME	"gTimerMultiplier"
+#define CFG_TIMER_MULTIPLIER_MIN	(1)
+#define CFG_TIMER_MULTIPLIER_MAX	(0xFFFFFFFF)
+#ifdef QCA_WIFI_NAPIER_EMULATION
+#define CFG_TIMER_MULTIPLIER_DEFAULT	(100)
+#else
+#define CFG_TIMER_MULTIPLIER_DEFAULT	(1)
+#endif
+
 /* enable_reg_offload - enable regulatory offload
  * @Min: 0
  * @Max: 1
@@ -10777,6 +10807,7 @@ struct hdd_config {
 	bool ani_enabled;
 	bool qcn_ie_support;
 	bool reg_offload_enabled;
+	uint32_t timer_multiplier;
 	uint8_t fils_max_chan_guard_time;
 	enum hdd_external_acs_policy external_acs_policy;
 	enum hdd_external_acs_freq_band external_acs_freq_band;

+ 7 - 0
core/hdd/src/wlan_hdd_cfg.c

@@ -4312,6 +4312,13 @@ struct reg_table_entry g_registry_table[] = {
 		CFG_QCN_IE_SUPPORT_MIN,
 		CFG_QCN_IE_SUPPORT_MAX),
 
+	REG_VARIABLE(CFG_TIMER_MULTIPLIER_NAME, WLAN_PARAM_Integer,
+		     struct hdd_config, timer_multiplier,
+		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		     CFG_TIMER_MULTIPLIER_DEFAULT,
+		     CFG_TIMER_MULTIPLIER_MIN,
+		     CFG_TIMER_MULTIPLIER_MAX),
+
 	REG_VARIABLE(CFG_ENABLE_REG_OFFLOAD_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, reg_offload_enabled,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,

+ 4 - 0
core/hdd/src/wlan_hdd_main.c

@@ -7429,6 +7429,10 @@ static hdd_context_t *hdd_context_create(struct device *dev)
 		goto err_free_config;
 	}
 
+	hdd_debug("setting timer multiplier: %u",
+		  hdd_ctx->config->timer_multiplier);
+	qdf_timer_set_multiplier(hdd_ctx->config->timer_multiplier);
+
 	hdd_debug("Setting configuredMcastBcastFilter: %d",
 		   hdd_ctx->config->mcastBcastFilterSetting);