Browse Source

qcacmn: Copy randomize configuration to sched_scan

Copy randomize configuration to sched_scan, for MAC spoofing.

Change-Id: I357ab5f601bf9e6b17389c621adb63f4977ac844
CRs-Fixed: 2293441
hangtian 6 years ago
parent
commit
71a0cfb91a

+ 4 - 2
os_if/linux/scan/src/wlan_cfg80211_scan.c

@@ -534,8 +534,6 @@ int wlan_cfg80211_sched_scan_start(struct wlan_objmgr_pdev *pdev,
 	cfg80211_notice("Number of hidden networks being Configured = %d",
 		  request->n_ssids);
 
-	if (req->scan_random.randomize)
-		wlan_pno_scan_rand_attr(vdev, request, req);
 	/*
 	 * Before Kernel 4.4
 	 *   Driver gets only one time interval which is hard coded in
@@ -565,6 +563,10 @@ int wlan_cfg80211_sched_scan_start(struct wlan_objmgr_pdev *pdev,
 	ucfg_scan_register_pno_cb(psoc,
 		wlan_cfg80211_pno_callback, NULL);
 	ucfg_scan_get_pno_def_params(vdev, req);
+
+	if (req->scan_random.randomize)
+		wlan_pno_scan_rand_attr(vdev, request, req);
+
 	if (ucfg_ie_whitelist_enabled(psoc, vdev))
 		ucfg_copy_ie_whitelist_attrs(psoc, &req->ie_whitelist);
 	status = ucfg_scan_pno_start(vdev, req);

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

@@ -324,6 +324,7 @@ ucfg_scan_get_pno_def_params(struct wlan_objmgr_vdev *vdev,
 	pno_def = &scan->pno_cfg;
 	req->active_dwell_time = scan_def->active_dwell;
 	req->passive_dwell_time = scan_def->passive_dwell;
+	req->scan_random.randomize = scan_def->enable_mac_spoofing;
 
 	/*
 	 *  Update active and passive dwell time depending