Browse Source

qcacld-3.0: Only update channel list for STA mode

When DUT as STA and connected to 2G band AP, and trying to connect to
2G band P2P GO as P2P client. It filters out all 2G band before get
scan result. which casue P2P connection failed. So won't call
wlan_cm_dual_sta_roam_update_connect_channels and allow 2G channels
if opmode isn't STA. This change removes codes about getting filter
for NULL profile case since pProfile has been checked and it won't be
NULL.

Change-Id: I9e83e25c19740a3eebc460af0a660b1315556b4f
CRs-Fixed: 2762443
Wu Gao 4 years ago
parent
commit
8022a5b74e
1 changed files with 9 additions and 20 deletions
  1. 9 20
      core/sme/src/csr/csr_api_roam.c

+ 9 - 20
core/sme/src/csr/csr_api_roam.c

@@ -8432,24 +8432,11 @@ QDF_STATUS csr_roam_connect(struct mac_context *mac, uint32_t sessionId,
 		goto error;
 	}
 
-	/* Try to connect to any BSS */
-	if (!pProfile) {
-		/*
-		 * Dual STA roaming is supported only for DBS mode.
-		 * So if dual sta roaming is enabled, fill the channels
-		 * allowed for 2nd STA connection based on the 1st STA
-		 * connected band.
-		 */
-		wlan_cm_dual_sta_roam_update_connect_channels(mac->psoc,
-							      filter);
-		csr_set_open_mode_in_scan_filter(filter);
-	} else {
-		/* Here is the profile we need to connect to */
-		status = csr_roam_get_scan_filter_from_profile(mac, pProfile,
-							       filter, false,
-							       sessionId);
-		opmode = pProfile->csrPersona;
-	}
+	/* Here is the profile we need to connect to */
+	status = csr_roam_get_scan_filter_from_profile(mac, pProfile,
+						       filter, false,
+						       sessionId);
+	opmode = pProfile->csrPersona;
 	roamId = GET_NEXT_ROAM_ID(&mac->roam);
 	if (pRoamId)
 		*pRoamId = roamId;
@@ -10950,8 +10937,10 @@ csr_roam_get_scan_filter_from_profile(struct mac_context *mac_ctx,
 		 * 2nd STA, with the channels other than the 1st connected
 		 * STA, as dual sta roaming is supported only on one band.
 		 */
-		wlan_cm_dual_sta_roam_update_connect_channels(mac_ctx->psoc,
-							      filter);
+		if (profile->csrPersona == QDF_STA_MODE)
+			wlan_cm_dual_sta_roam_update_connect_channels(
+							mac_ctx->psoc,
+							filter);
 	}
 
 	status = csr_fill_crypto_params(mac_ctx, profile, filter, vdev_id);