Prechádzať zdrojové kódy

qcacmn: Add all 6 GHz channels in scan request

User space issues scan, which does not include non-PSC channels.
If user space does not customize these channels, kernel fills
all the supported channels (2 GHz, 5 GHz and 6 GHz all channels).
Driver does not add channels to the scan channel list even if
it is present in RNR IE, as this increases the number of channels
given by user space and increases scan time.
User space should not send customized channel list, even if it
wants to scan the RNR channels.

If the flag NL80211_SCAN_FLAG_COLOCATED_6GHZ is set or at least
one 6 GHz channel is present, driver need to add all 6 GHz
channels which are not present in the scan request and sets
RNR flag for those channels so that FW can do co-located 6 GHz
channel scans on these channels.

Without the change, Driver adds 6 GHz channels to the scan request,
which are present in PSC list only.

Withdraw logic to add all 6 GHz channels to the channel list,
if Scan req carries at least one 6 GHz channel in
scm_add_all_valid_6g_channels, which indicates that the target
or regulatory supports 6 GHz channels, as they are added if
Scan req carries NL80211_SCAN_FLAG_COLOCATED_6GHZ flag.

Change-Id: I3c8f5cd7eadf39557f24f685a260fe76ea5d08be
CRs-Fixed: 3312385
Aravind Kishore Sukla 2 rokov pred
rodič
commit
781d4bb22e
1 zmenil súbory, kde vykonal 13 pridanie a 13 odobranie
  1. 13 13
      umac/scan/core/src/wlan_scan_manager_6ghz.c

+ 13 - 13
umac/scan/core/src/wlan_scan_manager_6ghz.c

@@ -281,21 +281,12 @@ void scm_add_all_valid_6g_channels(struct wlan_objmgr_pdev *pdev,
 	uint8_t i, j;
 	enum channel_enum freq_idx;
 	struct regulatory_channel *cur_chan_list;
-	bool is_6g_ch_present = false, found;
+	bool found;
 	QDF_STATUS status;
 	uint8_t temp_num_chan = 0;
 
-	for (i = 0; i < chan_list->num_chan; i++) {
-		if (wlan_reg_is_6ghz_chan_freq(chan_list->chan[i].freq)) {
-			scm_debug("At least one 6G chan present in scan req:%d",
-				  chan_list->chan[i].freq);
-			is_6g_ch_present = true;
-			break;
-		}
-	}
-
-	if (!is_6g_ch_present && !is_colocated_6ghz_scan_enabled) {
-		scm_debug("Neither 6G chan present nor flag set in scan req");
+	if (!is_colocated_6ghz_scan_enabled) {
+		scm_debug("flag is not set in scan req");
 		return;
 	}
 
@@ -493,7 +484,16 @@ void scm_add_channel_flags(struct wlan_objmgr_vdev *vdev,
 			scm_set_rnr_flag_non_psc_6g_ch(&chan_list->chan[0],
 						       num_scan_chan);
 		}
-		break;
+		fallthrough;
+		/* Even when the scan mode is SCAN_MODE_6G_PSC_DUTY_CYCLE or
+		 * SCAN_MODE_6G_ALL_DUTY_CYCLE, it is better to add other 6 GHz
+		 * channels to the channel list and set the bit
+		 * FLAG_SCAN_ONLY_IF_RNR_FOUND for these new channels.
+		 * This can help to find the APs which have co-located APs in
+		 * given 2 GHz/5 GHz channels.
+		 * Let it fallthrough as this is already addressed through the
+		 * scan mode SCAN_MODE_6G_ALL_CHANNEL.
+		 */
 	case SCAN_MODE_6G_ALL_CHANNEL:
 		/*
 		 * When the ini is set to SCAN_MODE_6G_ALL_CHANNEL,