From edda5aa8476692f015d89c81362dff41ec63f532 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Mon, 10 Feb 2020 19:20:39 +0530 Subject: [PATCH] qcacmn: Send WMI_ROAM_OFFLOAD_FLAG_SAE_SAME_PMKID flag to FW Send new flag WMI_ROAM_OFFLOAD_FLAG_SAE_SAME_PMKID through 11i offload param to indicate fw whether WLAN_SAE_SINGLE_PMK feature is enable or not. If flag is set, fw should use single PMKID for SAE roaming between VSIE AP(s), else fw should complete roaming by doing full SAE authentication. Change-Id: I9c88772c9571230c38e2cfa41c8a0c79663572ab CRs-Fixed: 2616046 --- wmi/inc/wmi_unified_param.h | 3 +++ wmi/src/wmi_unified_roam_tlv.c | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 0fb83287a7..dbbd65127d 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1674,6 +1674,8 @@ struct roam_fils_params { * roam candidate table are valid * @roam_scan_inactivity_time: inactivity monitoring time in ms for which the * device is considered to be inactive + * @is_sae_same_pmk: Flag to indicate fw whether WLAN_SAE_SINGLE_PMK feature is + * enable or not * @roam_inactive_data_packet_count: Maximum allowed data packets count during * roam_scan_inactivity_time. * @roam_scan_period_after_inactivity: Roam scan period in ms after device is @@ -1701,6 +1703,7 @@ struct roam_offload_scan_params { bool fw_pmksa_cache; uint32_t rct_validity_timer; bool is_adaptive_11r; + bool is_sae_same_pmk; #endif uint32_t min_delay_btw_roam_scans; uint32_t roam_trigger_reason_bitmask; diff --git a/wmi/src/wmi_unified_roam_tlv.c b/wmi/src/wmi_unified_roam_tlv.c index 1470a2f147..b55cdce03d 100644 --- a/wmi/src/wmi_unified_roam_tlv.c +++ b/wmi/src/wmi_unified_roam_tlv.c @@ -1036,6 +1036,29 @@ fill_roam_offload_11r_params(uint32_t auth_mode, roam_offload_11r->psk_msk_ext_len); } } + +/** + * wmi_fill_sae_single_pmk_param() - Fill sae single pmk flag to indicate fw to + * use same PMKID for WPA3 SAE roaming. + * @params: roam request param + * @roam_offload_11i: pointer to 11i params + * + * Return: None + */ +static inline void +wmi_fill_sae_single_pmk_param(struct roam_offload_scan_params *params, + wmi_roam_11i_offload_tlv_param *roam_offload_11i) +{ + if (params->is_sae_same_pmk) + roam_offload_11i->flags |= + 1 << WMI_ROAM_OFFLOAD_FLAG_SAE_SAME_PMKID; +} +#else +static inline void +wmi_fill_sae_single_pmk_param(struct roam_offload_scan_params *params, + wmi_roam_11i_offload_tlv_param *roam_offload_11i) +{ +} #endif /** @@ -1332,6 +1355,9 @@ send_roam_scan_offload_mode_cmd_tlv(wmi_unified_t wmi_handle, WMI_LOGI("LFR3:PMKSA caching disabled"); } + wmi_fill_sae_single_pmk_param(roam_req, + roam_offload_11i); + roam_offload_11i->pmk_len = roam_req->pmk_len > ROAM_OFFLOAD_PMK_BYTES ? ROAM_OFFLOAD_PMK_BYTES :