qcacld-3.0: Add fils code for connection manager

Add fils code for connection manager.

Change-Id: Icabc91605077c483487d6070ccc3fc714ba2d315
CRs-Fixed: 2857915
This commit is contained in:
gaurank kathpalia
2021-01-19 18:37:07 +05:30
committed by snandini
parent ae0f754c4a
commit 0030dee8db
12 changed files with 354 additions and 26 deletions

View File

@@ -491,6 +491,7 @@ struct wlan_fils_connection_info *wlan_cm_get_fils_connection_info(
struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id);
#ifndef FEATURE_CM_ENABLE
/**
* wlan_cm_update_mlme_fils_connection_info - Update FILS connection info
* to mlme vdev private object
@@ -504,7 +505,19 @@ QDF_STATUS wlan_cm_update_mlme_fils_connection_info(
struct wlan_objmgr_psoc *psoc,
struct wlan_fils_connection_info *src_fils_info,
uint8_t vdev_id);
#else
/**
* wlan_cm_update_mlme_fils_info - Update FILS connection info
* to mlme vdev private object
* @vdev: Pointer to pdev object
* @src_fils_info: Current profile FILS connection information
*
* Return: QDF_STATUS
*/
QDF_STATUS
wlan_cm_update_mlme_fils_info(struct wlan_objmgr_vdev *vdev,
struct wlan_fils_con_info *src_fils_info);
#endif
/**
* wlan_cm_update_fils_ft - Update the FILS FT derived to mlme
* @psoc: Psoc pointer

View File

@@ -27,6 +27,7 @@
#include "wlan_blm_public_struct.h"
#include "wmi_unified_param.h"
#include "wmi_unified_sta_param.h"
#include "wlan_cm_public_struct.h"
#define ROAM_SCAN_OFFLOAD_START 1
#define ROAM_SCAN_OFFLOAD_STOP 2
@@ -87,9 +88,16 @@
#define REASON_ROAM_HANDOFF_DONE 52
#define REASON_ROAM_ABORT 53
#ifdef FEATURE_CM_ENABLE
#define FILS_MAX_KEYNAME_NAI_LENGTH WLAN_CM_FILS_MAX_KEYNAME_NAI_LENGTH
#define WLAN_FILS_MAX_REALM_LEN WLAN_CM_FILS_MAX_REALM_LEN
#define WLAN_FILS_MAX_RRK_LENGTH WLAN_CM_FILS_MAX_RRK_LENGTH
#else
#define FILS_MAX_KEYNAME_NAI_LENGTH 253
#define WLAN_FILS_MAX_REALM_LEN 255
#define WLAN_FILS_MAX_RRK_LENGTH 64
#endif
#define WLAN_FILS_MAX_RIK_LENGTH WLAN_FILS_MAX_RRK_LENGTH
#define WLAN_FILS_FT_MAX_LEN 48

View File

@@ -1414,6 +1414,7 @@ rel_vdev_ref:
}
#ifdef WLAN_FEATURE_FILS_SK
#ifndef FEATURE_CM_ENABLE
QDF_STATUS wlan_cm_update_mlme_fils_connection_info(
struct wlan_objmgr_psoc *psoc,
struct wlan_fils_connection_info *src_fils_info,
@@ -1462,7 +1463,58 @@ QDF_STATUS wlan_cm_update_mlme_fils_connection_info(
return QDF_STATUS_SUCCESS;
}
#else
QDF_STATUS
wlan_cm_update_mlme_fils_info(struct wlan_objmgr_vdev *vdev,
struct wlan_fils_con_info *src_fils_info)
{
struct mlme_legacy_priv *mlme_priv;
uint8_t vdev_id = wlan_vdev_get_id(vdev);
struct wlan_fils_connection_info *tgt_info;
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
if (!mlme_priv) {
mlme_err("vdev legacy private object is NULL fro vdev %d",
vdev_id);
return QDF_STATUS_E_FAILURE;
}
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;
return QDF_STATUS_SUCCESS;
}
if (mlme_priv->fils_con_info)
qdf_mem_free(mlme_priv->fils_con_info);
mlme_priv->fils_con_info =
qdf_mem_malloc(sizeof(struct wlan_fils_connection_info));
if (!mlme_priv->fils_con_info)
return QDF_STATUS_E_NOMEM;
tgt_info = mlme_priv->fils_con_info;
mlme_debug("FILS: vdev:%d update fils info", vdev_id);
tgt_info->is_fils_connection = src_fils_info->is_fils_connection;
tgt_info->key_nai_length = src_fils_info->username_len;
qdf_mem_copy(tgt_info->keyname_nai, src_fils_info->username,
tgt_info->key_nai_length);
tgt_info->realm_len = src_fils_info->realm_len;
qdf_mem_copy(tgt_info->realm, src_fils_info->realm,
tgt_info->realm_len);
tgt_info->r_rk_length = src_fils_info->rrk_len;
qdf_mem_copy(tgt_info->r_rk, src_fils_info->rrk,
tgt_info->r_rk_length);
tgt_info->erp_sequence_number = src_fils_info->next_seq_num;
tgt_info->auth_type = src_fils_info->auth_type;
return QDF_STATUS_SUCCESS;
}
#endif
struct wlan_fils_connection_info *wlan_cm_get_fils_connection_info(
struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id)