qcacld-3.0: Update sae_single_pmk info in RSO start command

Requirement is to allow station to just keeps only one
PMK1 and PMKID1 which gets derived while first connection
and re-use it for roaming to other AP which has some
specific VSIE.

To support this feature, STA should Set new flag in 11i
params during RSO start/update when initial connection is
completed based on the VSIE in AP beacon/probe response
frame. This flag will allow fw to roam to AP(s) which has
VSIE with single PMK.

Update PMK info in RSO start command with
sae_single_pmk info if initial connection is completed
with AP contains VSIE.

Change-Id: I839b48da48f92f24444e69405d87560186d7f986
CRs-Fixed: 2616029
This commit is contained in:
Abhinav Kumar
2020-02-10 18:45:23 +05:30
committed by nshrivas
parent c71e678b18
commit 8747fd098c
5 changed files with 118 additions and 6 deletions

View File

@@ -2324,6 +2324,17 @@ void wlan_mlme_set_sae_single_pmk_bss_cap(struct wlan_objmgr_psoc *psoc,
void
wlan_mlme_update_sae_single_pmk(struct wlan_objmgr_vdev *vdev,
struct mlme_pmk_info *sae_single_pmk);
/**
* wlan_mlme_get_sae_single_pmk_info - API to get mlme_pmkid_info
* @vdev: vdev object
* @pmksa: pointer to PMKSA struct
*
* Return : None
*/
void
wlan_mlme_get_sae_single_pmk_info(struct wlan_objmgr_vdev *vdev,
struct wlan_mlme_sae_single_pmk *pmksa);
#else
static inline void
wlan_mlme_set_sae_single_pmk_bss_cap(struct wlan_objmgr_psoc *psoc,
@@ -2336,6 +2347,12 @@ wlan_mlme_update_sae_single_pmk(struct wlan_objmgr_vdev *vdev,
struct mlme_pmk_info *sae_single_pmk)
{
}
static inline void
wlan_mlme_get_sae_single_pmk_info(struct wlan_objmgr_vdev *vdev,
struct wlan_mlme_sae_single_pmk *pmksa)
{
}
#endif
/**
* mlme_get_roam_fail_reason_str() - Get fail string from enum

View File

@@ -3638,6 +3638,34 @@ void wlan_mlme_update_sae_single_pmk(struct wlan_objmgr_vdev *vdev,
is_sae_connection)
mlme_priv->mlme_roam.sae_single_pmk.pmk_info = *sae_single_pmk;
}
void wlan_mlme_get_sae_single_pmk_info(struct wlan_objmgr_vdev *vdev,
struct wlan_mlme_sae_single_pmk *pmksa)
{
struct mlme_legacy_priv *mlme_priv;
struct mlme_pmk_info pmk_info;
mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
if (!mlme_priv) {
mlme_legacy_err("vdev legacy private object is NULL");
return;
}
pmk_info = mlme_priv->mlme_roam.sae_single_pmk.pmk_info;
pmksa->sae_single_pmk_ap =
mlme_priv->mlme_roam.sae_single_pmk.sae_single_pmk_ap;
if (pmk_info.pmk_len) {
qdf_mem_copy(pmksa->pmk_info.pmk, pmk_info.pmk,
pmk_info.pmk_len);
pmksa->pmk_info.pmk_len = pmk_info.pmk_len;
return;
}
qdf_mem_zero(pmksa->pmk_info.pmk, sizeof(*pmksa->pmk_info.pmk));
pmksa->pmk_info.pmk_len = 0;
}
#endif
char *mlme_get_roam_fail_reason_str(uint32_t result)

View File

@@ -2243,6 +2243,7 @@ struct roam_offload_scan_req {
uint8_t RoamKeyMgmtOffloadEnabled;
struct pmkid_mode_bits pmkid_modes;
bool is_adaptive_11r_connection;
bool is_sae_single_pmk;
/* Idle/Disconnect roam parameters */
struct wmi_idle_roam_params idle_roam_params;

View File

@@ -17375,6 +17375,67 @@ csr_update_roam_req_adaptive_11r(struct csr_roam_session *session,
}
#endif
#if defined(WLAN_SAE_SINGLE_PMK) && defined(WLAN_FEATURE_ROAM_OFFLOAD)
/**
* csr_fill_sae_single_pmk_info() - updates req msg with sae single pmk info
* @mac_ctx: Mac context
* @req_buf: out param, roam offload scan request packet
* @vdev_id: Vdev id
*
* Return: true in case of success
*/
static bool
csr_fill_sae_single_pmk_info(struct mac_context *mac_ctx,
struct roam_offload_scan_req *req_buf,
uint8_t vdev_id)
{
struct wlan_mlme_sae_single_pmk single_pmk;
struct wlan_objmgr_vdev *vdev;
if (!mac_ctx || !req_buf) {
sme_debug("Invalid session or req buff");
return false;
}
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, vdev_id,
WLAN_LEGACY_SME_ID);
if (!vdev) {
sme_err("vdev is NULL");
return QDF_STATUS_E_NULL_VALUE;
}
wlan_mlme_get_sae_single_pmk_info(vdev, &single_pmk);
if (single_pmk.pmk_info.pmk_len && single_pmk.sae_single_pmk_ap &&
mac_ctx->mlme_cfg->lfr.sae_single_pmk_feature_enabled) {
sme_debug("Update pmk with len %d same_pmk_info %d",
single_pmk.pmk_info.pmk_len,
single_pmk.sae_single_pmk_ap);
/* Update sae same pmk info in rso */
qdf_mem_copy(req_buf->PSK_PMK, single_pmk.pmk_info.pmk,
sizeof(req_buf->PSK_PMK));
req_buf->pmk_len = single_pmk.pmk_info.pmk_len;
req_buf->is_sae_single_pmk = single_pmk.sae_single_pmk_ap;
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
return true;
}
wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
return false;
}
#else
static bool
csr_fill_sae_single_pmk_info(struct mac_context *mac_ctx,
struct roam_offload_scan_req *req_buf,
uint8_t vdev_id)
{
return false;
}
#endif
/**
* csr_update_roam_scan_offload_request() - updates req msg with roam offload
* parameters
@@ -17404,10 +17465,13 @@ csr_update_roam_scan_offload_request(struct mac_context *mac_ctx,
qdf_mem_copy(&req_buf->roam_params,
&mac_ctx->roam.configParam.roam_params,
sizeof(req_buf->roam_params));
qdf_mem_copy(req_buf->PSK_PMK, session->psk_pmk,
sizeof(req_buf->PSK_PMK));
req_buf->pmk_len = session->pmk_len;
/* Check whether to send psk_pmk or sae_single pmk info */
if (!csr_fill_sae_single_pmk_info(mac_ctx, req_buf,
session->sessionId)) {
qdf_mem_copy(req_buf->PSK_PMK, session->psk_pmk,
sizeof(req_buf->PSK_PMK));
req_buf->pmk_len = session->pmk_len;
}
req_buf->R0KH_ID_Length = session->ftSmeContext.r0kh_id_len;
qdf_mem_copy(req_buf->R0KH_ID,
session->ftSmeContext.r0kh_id,

View File

@@ -363,12 +363,14 @@ static void wma_roam_scan_offload_set_params(
params->fw_pmksa_cache = roam_req->pmkid_modes.fw_pmksa_cache;
params->rct_validity_timer = roam_req->rct_validity_timer;
params->is_adaptive_11r = roam_req->is_adaptive_11r_connection;
wma_debug("qos_caps %d, qos_enabled %d, ho_delay_for_rx %d, roam_scan_mode %d roam_preauth: retrycount %d, no_ack_timeout %d",
params->is_sae_same_pmk = roam_req->is_sae_single_pmk;
wma_debug("qos_caps %d, qos_enabled %d, ho_delay_for_rx %d, roam_scan_mode %d roam_preauth: retrycount %d, no_ack_timeout %d SAE Single PMK:%d",
params->roam_offload_params.qos_caps,
params->roam_offload_params.qos_enabled,
params->roam_offload_params.ho_delay_for_rx, params->mode,
params->roam_offload_params.roam_preauth_retry_count,
params->roam_offload_params.roam_preauth_no_ack_timeout);
params->roam_offload_params.roam_preauth_no_ack_timeout,
params->is_sae_same_pmk);
}
#else
static void wma_roam_scan_offload_set_params(