Browse Source

qcacmn: Modify scan type for RRM scan request

Currently in the case of concurrent sessions running,
the driver updates the active dwell time for the scan
request to the default value, overwriting the already
filled active dwell time which the DUT got from the
AP as part of RRM request, which results in violation
of protocol.

Fix is to not update the concurrency params if the scan
request is of type RRM.

Change-Id: Ifbb4b45fc111851f544fd39187e4113bda5f7348
CRs-Fixed: 2436893
gaurank kathpalia 6 years ago
parent
commit
5ba222aea6

+ 1 - 1
os_if/linux/scan/src/wlan_cfg80211_scan.c

@@ -1402,7 +1402,7 @@ int wlan_cfg80211_scan(struct wlan_objmgr_vdev *vdev,
 		is_p2p_scan = true;
 
 	if (is_p2p_scan && request->no_cck)
-		req->scan_req.p2p_scan_type = SCAN_P2P_SEARCH;
+		req->scan_req.scan_type = SCAN_TYPE_P2P_SEARCH;
 
 	/* Set dwell time mode according to scan policy type flags */
 	if (req->scan_req.scan_policy_high_accuracy)

+ 17 - 20
umac/scan/core/src/wlan_scan_manager.c

@@ -590,6 +590,9 @@ static void scm_req_update_concurrency_params(struct wlan_objmgr_vdev *vdev,
 		go_peer_count =
 		wlan_util_get_peer_count_for_mode(pdev, QDF_P2P_GO_MODE);
 
+	if (!req->scan_req.scan_f_passive)
+		scm_update_passive_dwell_time(vdev, req);
+
 	if (policy_mgr_get_connection_count(psoc)) {
 		if (req->scan_req.scan_f_passive)
 			req->scan_req.dwell_time_passive =
@@ -625,7 +628,7 @@ static void scm_req_update_concurrency_params(struct wlan_objmgr_vdev *vdev,
 	if (vdev->vdev_mlme.vdev_opmode == QDF_SAP_MODE)
 		req->scan_req.dwell_time_active_2g = 0;
 
-	if (req->scan_req.p2p_scan_type == SCAN_NON_P2P_DEFAULT) {
+	if (req->scan_req.scan_type == SCAN_TYPE_DEFAULT) {
 		/*
 		 * Decide burst_duration and dwell_time_active based on
 		 * what type of devices are active.
@@ -747,12 +750,6 @@ void scm_req_update_concurrency_params(struct wlan_objmgr_vdev *vdev,
 {
 }
 
-static inline void
-scm_update_passive_dwell_time(struct wlan_objmgr_vdev *vdev,
-			      struct scan_start_request *req)
-{
-}
-
 static inline void
 scm_update_dbs_scan_ctrl_ext_flag(struct scan_start_request *req)
 {
@@ -792,7 +789,7 @@ scm_update_channel_list(struct scan_start_request *req,
 		scan_vdev_obj->first_scan_done = true;
 	}
 
-	if(req->scan_req.p2p_scan_type == SCAN_P2P_SEARCH)
+	if (req->scan_req.scan_type == SCAN_TYPE_P2P_SEARCH)
 		p2p_search = true;
 	/*
 	 * No need to update channels if req is passive scan and single channel
@@ -864,17 +861,11 @@ scm_scan_req_update_params(struct wlan_objmgr_vdev *vdev,
 					  req->scan_req.dwell_time_active /
 					  req->scan_req.repeat_probe_time : 0;
 
-	if (req->scan_req.p2p_scan_type == SCAN_NON_P2P_DEFAULT) {
-		req->scan_req.scan_f_cck_rates = true;
-		if (!req->scan_req.num_ssids)
-			req->scan_req.scan_f_bcast_probe = true;
-		req->scan_req.scan_f_add_ds_ie_in_probe = true;
-		req->scan_req.scan_f_filter_prb_req = true;
-		req->scan_req.scan_f_add_tpc_ie_in_probe = true;
-	} else {
+	if (req->scan_req.scan_type == SCAN_TYPE_P2P_SEARCH ||
+	    req->scan_req.scan_type == SCAN_TYPE_P2P_LISTEN) {
 		req->scan_req.adaptive_dwell_time_mode = SCAN_DWELL_MODE_STATIC;
 		req->scan_req.dwell_time_active_2g = 0;
-		if (req->scan_req.p2p_scan_type == SCAN_P2P_LISTEN) {
+		if (req->scan_req.scan_type == SCAN_TYPE_P2P_LISTEN) {
 			req->scan_req.repeat_probe_time = 0;
 		} else {
 			req->scan_req.scan_f_filter_prb_req = true;
@@ -922,10 +913,15 @@ scm_scan_req_update_params(struct wlan_objmgr_vdev *vdev,
 			}
 			req->scan_req.scan_ev_bss_chan = false;
 		}
+	} else {
+		req->scan_req.scan_f_cck_rates = true;
+		if (!req->scan_req.num_ssids)
+			req->scan_req.scan_f_bcast_probe = true;
+		req->scan_req.scan_f_add_ds_ie_in_probe = true;
+		req->scan_req.scan_f_filter_prb_req = true;
+		req->scan_req.scan_f_add_tpc_ie_in_probe = true;
 	}
 
-	if (!req->scan_req.scan_f_passive)
-		scm_update_passive_dwell_time(vdev, req);
 	scm_update_dbs_scan_ctrl_ext_flag(req);
 
 	/*
@@ -933,7 +929,8 @@ scm_scan_req_update_params(struct wlan_objmgr_vdev *vdev,
 	 * single channel ie ROC, Preauth etc
 	 */
 	if (!(req->scan_req.scan_f_passive &&
-	      req->scan_req.chan_list.num_chan == 1))
+	      req->scan_req.chan_list.num_chan == 1) &&
+	      req->scan_req.scan_type != SCAN_TYPE_RRM)
 		scm_req_update_concurrency_params(vdev, req, scan_obj);
 
 	/*

+ 11 - 9
umac/scan/dispatcher/inc/wlan_scan_public_structs.h

@@ -783,15 +783,17 @@ struct chan_list {
 };
 
 /**
- * enum scan_type: scan type
- * @SCAN_NON_P2P_DEFAULT: Def scan
- * @SCAN_P2P_SEARCH: P2P Search
- * @SCAN_P2P_LISTEN: P2P listed
+ * enum scan_request_type: scan type
+ * @SCAN_TYPE_DEFAULT: Def scan
+ * @SCAN_TYPE_P2P_SEARCH: P2P Search
+ * @SCAN_TYPE_P2P_LISTEN: P2P listed
+ * @SCAN_TYPE_RRM: RRM scan request
  */
-enum p2p_scan_type {
-	SCAN_NON_P2P_DEFAULT = 0,
-	SCAN_P2P_SEARCH = 1,
-	SCAN_P2P_LISTEN = 2,
+enum scan_request_type {
+	SCAN_TYPE_DEFAULT = 0,
+	SCAN_TYPE_P2P_SEARCH = 1,
+	SCAN_TYPE_P2P_LISTEN = 2,
+	SCAN_TYPE_RRM = 3
 };
 
 /**
@@ -876,7 +878,7 @@ struct scan_req_params {
 	uint32_t vdev_id;
 	uint32_t pdev_id;
 	enum scan_priority scan_priority;
-	enum p2p_scan_type p2p_scan_type;
+	enum scan_request_type scan_type;
 	union {
 		struct {
 			uint32_t scan_ev_started:1,

+ 1 - 1
umac/scan/dispatcher/src/wlan_scan_ucfg_api.c

@@ -1142,7 +1142,7 @@ ucfg_scan_init_default_params(struct wlan_objmgr_vdev *vdev,
 
 	req->vdev = vdev;
 	req->scan_req.vdev_id = wlan_vdev_get_id(vdev);
-	req->scan_req.p2p_scan_type = SCAN_NON_P2P_DEFAULT;
+	req->scan_req.scan_type = SCAN_TYPE_DEFAULT;
 	req->scan_req.scan_priority = def->scan_priority;
 	req->scan_req.dwell_time_active = def->active_dwell;
 	req->scan_req.dwell_time_active_2g = def->active_dwell_2g;