瀏覽代碼

qcacmn: Add dwell time parameters to cfg80211 scan request API

Add active and passive scan dwell time parameters to cfg80211 scan
request API.

Change-Id: I39f479d7b941e4671f1ad4495ab48031153dd5e7
CRs-Fixed: 2598504
Krishna Rao 5 年之前
父節點
當前提交
44de5a5d45
共有 2 個文件被更改,包括 32 次插入1 次删除
  1. 14 1
      os_if/linux/scan/inc/wlan_cfg80211_scan.h
  2. 18 0
      os_if/linux/scan/src/wlan_cfg80211_scan.c

+ 14 - 1
os_if/linux/scan/inc/wlan_cfg80211_scan.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2020 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
@@ -128,6 +128,14 @@ struct scan_req {
  * @half_rate: Half rate flag
  * @quarter_rate: Quarter rate flag
  * @strict_pscan: strict passive scan flag
+ * @dwell_time_active: Active dwell time. Ignored if zero or inapplicable.
+ * @dwell_time_active_2g: 2.4 GHz specific active dwell time. Ignored if zero or
+ * inapplicable.
+ * @dwell_time_passive: Passive dwell time. Ignored if zero or inapplicable.
+ * @dwell_time_active_6g: 6 GHz specific active dwell time. Ignored if zero or
+ * inapplicable.
+ * @dwell_time_passive_6g: 6 GHz specific passive dwell time. Ignored if zero or
+ * inapplicable.
  */
 struct scan_params {
 	uint8_t source;
@@ -137,6 +145,11 @@ struct scan_params {
 	bool half_rate;
 	bool quarter_rate;
 	bool strict_pscan;
+	uint32_t dwell_time_active;
+	uint32_t dwell_time_active_2g;
+	uint32_t dwell_time_passive;
+	uint32_t dwell_time_active_6g;
+	uint32_t dwell_time_passive_6g;
 };
 
 /**

+ 18 - 0
os_if/linux/scan/src/wlan_cfg80211_scan.c

@@ -1407,6 +1407,24 @@ int wlan_cfg80211_scan(struct wlan_objmgr_vdev *vdev,
 	if (is_p2p_scan && request->no_cck)
 		req->scan_req.scan_type = SCAN_TYPE_P2P_SEARCH;
 
+	if (params->dwell_time_active)
+		req->scan_req.dwell_time_active = params->dwell_time_active;
+
+	if (params->dwell_time_active_2g)
+		req->scan_req.dwell_time_active_2g =
+			params->dwell_time_active_2g;
+
+	if (params->dwell_time_passive)
+		req->scan_req.dwell_time_passive = params->dwell_time_passive;
+
+	if (params->dwell_time_active_6g)
+		req->scan_req.dwell_time_active_6g =
+			params->dwell_time_active_6g;
+
+	if (params->dwell_time_passive_6g)
+		req->scan_req.dwell_time_passive_6g =
+			params->dwell_time_passive_6g;
+
 	/* Set dwell time mode according to scan policy type flags */
 	if (ucfg_scan_cfg_honour_nl_scan_policy_flags(psoc)) {
 		if (req->scan_req.scan_policy_high_accuracy)