浏览代码

qcacld-3.0: Add gScanBackoffMultiplier ini item

For Network Listen Offload and Preferred Network Offload, the fast scan
period is multiplied by scan_backoff_multiplier after max cycles have
occurred. Add a new configuration item, gScanBackoffMultiplier, to
configure scan_backoff_multiplier.

Change-Id: I832d3e058d1c6c0b441090039204d68502e2b96d
CRs-Fixed: 2035197
Dustin Brown 8 年之前
父节点
当前提交
20b6fcfc17
共有 3 个文件被更改,包括 44 次插入1 次删除
  1. 32 0
      core/hdd/inc/wlan_hdd_cfg.h
  2. 10 0
      core/hdd/src/wlan_hdd_cfg.c
  3. 2 1
      core/hdd/src/wlan_hdd_scan.c

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

@@ -10056,6 +10056,37 @@ enum l1ss_sleep_allowed {
 #define CFG_MAX_MPDUS_IN_AMPDU_MAX              (64)
 #define CFG_MAX_MPDUS_IN_AMPDU_DEFAULT          (0)
 
+/*
+ * <ini>
+ * gScanBackoffMultiplier - For NLO/PNO, multiply fast scan period by this every
+ *	max cycles
+ * @Min: 0
+ * @Max: 255
+ * @Default: 0
+ *
+ * For Network Listen Offload and Perfered Network Offload, multiply the fast
+ * scan period by this value after max cycles have occurred. Setting this to 0
+ * disables the feature.
+ *
+ * @E.g.
+ *	# Disable scan backoff multiplier
+ *	gScanBackoffMultiplier=0
+ *	# Effectively the same
+ *	gScanBackoffMultiplier=1
+ *	# Double the scan period after each max cycles have occurred
+ *	gScanBackoffMultiplier=2
+ *
+ * Related: NLO, PNO
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_SCAN_BACKOFF_MULTIPLIER_NAME	"gScanBackoffMultiplier"
+#define CFG_SCAN_BACKOFF_MULTIPLIER_MIN		(0)
+#define CFG_SCAN_BACKOFF_MULTIPLIER_MAX		(255)
+#define CFG_SCAN_BACKOFF_MULTIPLIER_DEFAULT	(0)
+
 /*
  * enum hdd_external_acs_policy - External ACS policy
  * @HDD_EXTERNAL_ACS_PCL_PREFERRED -Preferable for ACS to select a
@@ -10875,6 +10906,7 @@ struct hdd_config {
 	bool reg_offload_enabled;
 	uint32_t timer_multiplier;
 	uint8_t fils_max_chan_guard_time;
+	uint8_t scan_backoff_multiplier;
 	enum hdd_external_acs_policy external_acs_policy;
 	enum hdd_external_acs_freq_band external_acs_freq_band;
 	/* threshold of packet drops at which FW initiates disconnect */

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

@@ -4327,6 +4327,13 @@ struct reg_table_entry g_registry_table[] = {
 		CFG_FILS_MAX_CHAN_GUARD_TIME_MIN,
 		CFG_FILS_MAX_CHAN_GUARD_TIME_MAX),
 
+	REG_VARIABLE(CFG_SCAN_BACKOFF_MULTIPLIER_NAME, WLAN_PARAM_Integer,
+		struct hdd_config, scan_backoff_multiplier,
+		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		CFG_SCAN_BACKOFF_MULTIPLIER_DEFAULT,
+		CFG_SCAN_BACKOFF_MULTIPLIER_MIN,
+		CFG_SCAN_BACKOFF_MULTIPLIER_MAX),
+
 	REG_VARIABLE(CFG_EXTERNAL_ACS_POLICY, WLAN_PARAM_Integer,
 		     struct hdd_config, external_acs_policy,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -5879,6 +5886,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
 	hdd_info("Name = [%s] Value = [%d]",
 		CFG_ARP_AC_CATEGORY,
 		pHddCtx->config->arp_ac_category);
+	hdd_info("Name = [%s] Value = [%u]",
+		CFG_SCAN_BACKOFF_MULTIPLIER_NAME,
+		pHddCtx->config->scan_backoff_multiplier);
 	hdd_info("Name = [%s] Value = [%d]",
 		 CFG_EXTERNAL_ACS_POLICY,
 		 pHddCtx->config->external_acs_policy);

+ 2 - 1
core/hdd/src/wlan_hdd_scan.c

@@ -2551,7 +2551,8 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
-	return wlan_cfg80211_sched_scan_start(pHddCtx->hdd_pdev, dev, request);
+	return wlan_cfg80211_sched_scan_start(pHddCtx->hdd_pdev, dev, request,
+				      pHddCtx->config->scan_backoff_multiplier);
 }
 
 /**