Forráskód Böngészése

qcacmn: Scan channels only from the selected bands

Scan manager currently has two flags - scan_f_2ghz and scan_f_5ghz
for the requestor to specify which channel bands to scan.

Currently, these flags are not utilized by the scan manager to
control the channels selected as part of the scan request channel
list. As a result, specifying a particular band will not
limit the scan manager to scan only the mentioned band - instead
scanning all supported channels.

Add a check to use these flags to avoid channels from bands
which are not selected.

Change-Id: I86e17184b5bb67cbf951eee5d43a8f80a93718d6
CRs-Fixed: 2934215
Aditya Sathish 4 éve
szülő
commit
34bffddfd3
1 módosított fájl, 11 hozzáadás és 2 törlés
  1. 11 2
      umac/scan/dispatcher/src/wlan_scan_ucfg_api.c

+ 11 - 2
umac/scan/dispatcher/src/wlan_scan_ucfg_api.c

@@ -1108,8 +1108,17 @@ ucfg_scan_init_chanlist_params(struct scan_start_request *req,
 
 		for (idx = 0, num_chans = 0;
 			(idx < NUM_CHANNELS && num_chans < max_chans); idx++)
-			if (is_chan_enabled_for_scan(&reg_chan_list[idx],
-					low_2g, high_2g, low_5g, high_5g))
+			if ((is_chan_enabled_for_scan(&reg_chan_list[idx],
+						      low_2g, high_2g,
+						      low_5g, high_5g)) &&
+			    ((req->scan_req.scan_f_2ghz &&
+			     WLAN_REG_IS_24GHZ_CH_FREQ(
+					reg_chan_list[idx].center_freq)) ||
+			     (req->scan_req.scan_f_5ghz &&
+			      (WLAN_REG_IS_5GHZ_CH_FREQ(
+					reg_chan_list[idx].center_freq) ||
+			       WLAN_REG_IS_6GHZ_CHAN_FREQ(
+					reg_chan_list[idx].center_freq)))))
 				scan_freqs[num_chans++] =
 				reg_chan_list[idx].center_freq;