Ver Fonte

qcacld-3.0: Fix connection with PMF required AP

rso config is not updated from connect profile and thus the PMF
required is not set and thusconnect fails with PMF required AP.

Fix is to update the rso config during connect req from profile.

Change-Id: I4a6ee6ef54358a59c169bf3f495483b3b4a105df
CRs-fixed: 2880665
Abhishek Singh há 4 anos atrás
pai
commit
0c3c0b153a
2 ficheiros alterados com 14 adições e 11 exclusões
  1. 14 2
      core/sme/src/csr/csr_api_roam.c
  2. 0 9
      core/sme/src/csr/csr_util.c

+ 14 - 2
core/sme/src/csr/csr_api_roam.c

@@ -9922,11 +9922,14 @@ static void csr_copy_ssids_from_profile(tCsrSSIDs *ssid_list,
 			       &ssid_list->SSIDList[i].SSID);
 }
 
-static QDF_STATUS csr_fill_filter_from_vdev_crypto(struct mac_context *mac_ctx,
+static
+QDF_STATUS csr_fill_filter_from_vdev_crypto(struct mac_context *mac_ctx,
+					    struct csr_roam_profile *profile,
 					    struct scan_filter *filter,
 					    uint8_t vdev_id)
 {
 	struct wlan_objmgr_vdev *vdev;
+	struct rso_config *rso_cfg;
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, vdev_id,
 						    WLAN_LEGACY_SME_ID);
@@ -9934,6 +9937,14 @@ static QDF_STATUS csr_fill_filter_from_vdev_crypto(struct mac_context *mac_ctx,
 		sme_err("Invalid vdev");
 		return QDF_STATUS_E_FAILURE;
 	}
+	rso_cfg = wlan_cm_get_rso_config(vdev);
+	if (rso_cfg) {
+		rso_cfg->rsn_cap = 0;
+		if (profile->MFPRequired)
+			rso_cfg->rsn_cap |= WLAN_CRYPTO_RSN_CAP_MFP_REQUIRED;
+		if (profile->MFPCapable)
+			rso_cfg->rsn_cap |= WLAN_CRYPTO_RSN_CAP_MFP_ENABLED;
+	}
 
 	wlan_cm_fill_crypto_filter_from_vdev(vdev, filter);
 
@@ -9953,7 +9964,8 @@ static QDF_STATUS csr_fill_crypto_params(struct mac_context *mac_ctx,
 		return QDF_STATUS_SUCCESS;
 	}
 
-	return csr_fill_filter_from_vdev_crypto(mac_ctx, filter, vdev_id);
+	return csr_fill_filter_from_vdev_crypto(mac_ctx, profile, filter,
+						vdev_id);
 }
 
 QDF_STATUS

+ 0 - 9
core/sme/src/csr/csr_util.c

@@ -2310,7 +2310,6 @@ uint8_t csr_construct_rsn_ie(struct mac_context *mac, uint32_t sessionId,
 	uint16_t rsn_cap = 0, self_rsn_cap;
 	int32_t rsn_val;
 	struct wlan_crypto_pmksa pmksa, *pmksa_peer;
-	struct rso_config *rso_cfg;
 
 	if (!local_ap_ie &&
 	    (!QDF_IS_STATUS_SUCCESS(csr_get_parsed_bss_description_ies
@@ -2390,14 +2389,6 @@ uint8_t csr_construct_rsn_ie(struct mac_context *mac, uint32_t sessionId,
 				    pmksa_peer->pmk, pmksa_peer->pmk_len);
 		csr_update_pmksa_to_profile(vdev, pmksa_peer);
 	}
-	rso_cfg = wlan_cm_get_rso_config(vdev);
-	if (rso_cfg) {
-		rso_cfg->rsn_cap = 0;
-		if (pProfile->MFPRequired)
-			rso_cfg->rsn_cap |= WLAN_CRYPTO_RSN_CAP_MFP_REQUIRED;
-		if (pProfile->MFPCapable)
-			rso_cfg->rsn_cap |= WLAN_CRYPTO_RSN_CAP_MFP_ENABLED;
-	}
 
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);