qcacld-3.0: Fix RSN not included in FILS connection

When the FILS erp keys are available, the RSN IE is
not included in the assoc request as the function
lim_update_fils_config() returns always if rrk_length is
non zero. Fix this to return only if malloc fails.

Also add additional debugs for RSN IE not included in FILS
authentication frame and remove call to
wlan_cm_update_mlme_fils_connection_info() from
update_profile_fils_info().

Change-Id: I75cc1b04c2fdcbf3e7c55dfac41254a2378233bb
CRs-Fixed: 2789793
Bu işleme şunda yer alıyor:
Pragaspathi Thilagaraj
2020-10-03 00:16:32 +05:30
işlemeyi yapan: snandini
ebeveyn 602802fda0
işleme 4822851798
4 değiştirilmiş dosya ile 14 ekleme ve 12 silme

Dosyayı Görüntüle

@@ -586,6 +586,7 @@ QDF_STATUS wlan_cm_update_mlme_fils_connection_info(
}
if (!src_fils_info) {
mlme_debug("FILS: vdev:%d Clear fils info", vdev_id);
qdf_mem_free(mlme_priv->fils_con_info);
mlme_priv->fils_con_info = NULL;
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
@@ -602,6 +603,7 @@ QDF_STATUS wlan_cm_update_mlme_fils_connection_info(
return QDF_STATUS_E_NOMEM;
}
mlme_debug("FILS: vdev:%d update fils info", vdev_id);
qdf_mem_copy(mlme_priv->fils_con_info, src_fils_info,
sizeof(struct wlan_fils_connection_info));
@@ -616,6 +618,7 @@ struct wlan_fils_connection_info *wlan_cm_get_fils_connection_info(
{
struct wlan_objmgr_vdev *vdev;
struct mlme_legacy_priv *mlme_priv;
struct wlan_fils_connection_info *fils_info;
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
WLAN_MLME_NB_ID);
@@ -631,13 +634,10 @@ struct wlan_fils_connection_info *wlan_cm_get_fils_connection_info(
return NULL;
}
if (!mlme_priv->fils_con_info) {
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
return NULL;
}
fils_info = mlme_priv->fils_con_info;
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
return mlme_priv->fils_con_info;
return fils_info;
}
QDF_STATUS wlan_cm_update_fils_ft(struct wlan_objmgr_psoc *psoc,

Dosyayı Görüntüle

@@ -1419,8 +1419,10 @@ void lim_update_fils_config(struct mac_context *mac_ctx,
fils_info = wlan_cm_get_fils_connection_info(mac_ctx->psoc,
session->vdev_id);
if (!fils_info)
if (!fils_info) {
pe_debug("FILS: CM Fils info is NULL");
return;
}
pe_fils_info = session->fils_info;
if (!pe_fils_info)
@@ -1457,9 +1459,10 @@ void lim_update_fils_config(struct mac_context *mac_ctx,
if (fils_info->r_rk_length) {
pe_fils_info->fils_rrk =
qdf_mem_malloc(fils_info->r_rk_length);
if (!pe_fils_info->fils_rrk)
if (!pe_fils_info->fils_rrk) {
qdf_mem_free(pe_fils_info->keyname_nai_data);
return;
}
if (fils_info->r_rk_length <= WLAN_FILS_MAX_RRK_LENGTH)
qdf_mem_copy(pe_fils_info->fils_rrk,
@@ -1506,6 +1509,7 @@ void lim_update_fils_config(struct mac_context *mac_ctx,
qdf_mem_copy(pe_fils_info->fils_pmk, fils_info->pmk,
fils_info->pmk_len);
}
pe_debug("FILS: fils=%d nai-len=%d rrk_len=%d akm=%d auth=%d pmk_len=%d",
fils_info->is_fils_connection,
fils_info->key_nai_length,

Dosyayı Görüntüle

@@ -74,8 +74,10 @@ lim_is_rsn_ie_valid_in_sme_req_message(struct mac_context *mac_ctx,
rsn_ie->length, privacy, val);
}
if (!rsn_ie->length)
if (!rsn_ie->length) {
pe_debug("RSN IE length is 0");
return true;
}
if ((rsn_ie->rsnIEdata[0] != DOT11F_EID_RSN)
#ifdef FEATURE_WLAN_WAPI

Dosyayı Görüntüle

@@ -7874,10 +7874,6 @@ static void update_profile_fils_info(struct mac_context *mac,
qdf_mem_copy(des_profile->fils_con_info,
src_profile->fils_con_info,
sizeof(struct wlan_fils_connection_info));
wlan_cm_update_mlme_fils_connection_info(mac->psoc,
des_profile->fils_con_info,
vdev_id);
des_profile->hlp_ie =
qdf_mem_malloc(src_profile->hlp_ie_len);
if (!des_profile->hlp_ie)