|
@@ -14495,30 +14495,59 @@ static QDF_STATUS csr_set_ldpc_exception(struct mac_context *mac_ctx,
|
|
|
|
|
|
#ifdef WLAN_FEATURE_FILS_SK
|
|
|
/*
|
|
|
- * csr_update_fils_connection_info: Copy fils connection info to join request
|
|
|
+ * csr_validate_and_update_fils_info: Copy fils connection info to join request
|
|
|
* @profile: pointer to profile
|
|
|
* @csr_join_req: csr join request
|
|
|
*
|
|
|
* Return: None
|
|
|
*/
|
|
|
-static void csr_update_fils_connection_info(struct csr_roam_profile *profile,
|
|
|
- struct join_req *csr_join_req)
|
|
|
+static QDF_STATUS
|
|
|
+csr_validate_and_update_fils_info(struct mac_context *mac,
|
|
|
+ struct csr_roam_profile *profile,
|
|
|
+ struct bss_description *bss_desc,
|
|
|
+ struct join_req *csr_join_req,
|
|
|
+ uint8_t vdev_id)
|
|
|
{
|
|
|
+ uint8_t cache_id[CACHE_ID_LEN] = {0};
|
|
|
+
|
|
|
if (!profile->fils_con_info)
|
|
|
- return;
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
|
|
|
- if (profile->fils_con_info->is_fils_connection) {
|
|
|
- qdf_mem_copy(&csr_join_req->fils_con_info,
|
|
|
- profile->fils_con_info,
|
|
|
- sizeof(struct cds_fils_connection_info));
|
|
|
- } else {
|
|
|
+ if (!profile->fils_con_info->is_fils_connection) {
|
|
|
+ sme_debug("FILS_PMKSA: Not a FILS connection");
|
|
|
qdf_mem_zero(&csr_join_req->fils_con_info,
|
|
|
sizeof(struct cds_fils_connection_info));
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
+
|
|
|
+ if (bss_desc->fils_info_element.is_cache_id_present) {
|
|
|
+ qdf_mem_copy(cache_id, bss_desc->fils_info_element.cache_id,
|
|
|
+ CACHE_ID_LEN);
|
|
|
+ sme_debug("FILS_PMKSA: cache_id[0]:%d, cache_id[1]:%d",
|
|
|
+ cache_id[0], cache_id[1]);
|
|
|
+ }
|
|
|
+
|
|
|
+ if ((!profile->fils_con_info->r_rk_length ||
|
|
|
+ !profile->fils_con_info->key_nai_length) &&
|
|
|
+ !bss_desc->fils_info_element.is_cache_id_present &&
|
|
|
+ !csr_lookup_fils_pmkid(mac, vdev_id, cache_id,
|
|
|
+ csr_join_req->ssId.ssId,
|
|
|
+ csr_join_req->ssId.length))
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+
|
|
|
+ qdf_mem_copy(&csr_join_req->fils_con_info,
|
|
|
+ profile->fils_con_info,
|
|
|
+ sizeof(struct cds_fils_connection_info));
|
|
|
+
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
#else
|
|
|
-static void csr_update_fils_connection_info(struct csr_roam_profile *profile,
|
|
|
- struct join_req *csr_join_req)
|
|
|
+static QDF_STATUS
|
|
|
+csr_validate_and_update_fils_info(struct mac_context *mac,
|
|
|
+ struct csr_roam_profile *profile,
|
|
|
+ struct bss_description *bss_desc,
|
|
|
+ struct join_req *csr_join_req,
|
|
|
+ uint8_t vdev_id)
|
|
|
{ }
|
|
|
#endif
|
|
|
|
|
@@ -15692,7 +15721,14 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
|
|
|
qdf_mem_copy(&csr_join_req->bssDescription, pBssDescription,
|
|
|
pBssDescription->length +
|
|
|
sizeof(pBssDescription->length));
|
|
|
- csr_update_fils_connection_info(pProfile, csr_join_req);
|
|
|
+
|
|
|
+ status = csr_validate_and_update_fils_info(mac, pProfile,
|
|
|
+ pBssDescription,
|
|
|
+ csr_join_req,
|
|
|
+ sessionId);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status))
|
|
|
+ return status;
|
|
|
+
|
|
|
csr_update_sae_config(csr_join_req, mac, pSession);
|
|
|
/*
|
|
|
* conc_custom_rule1:
|