From 137abeab487153089adaeb2be148eae0949505b6 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Tue, 27 Mar 2018 17:06:59 +0530 Subject: [PATCH] qcacmn: Add new ini to enable/disable FT open feature Add new ini item "enable_ftopen" to enable/disable FT open feature. There is no ini currently to disable only FT open. Add sanity check to send 11r params in case of FT open to fw only when enable_ftopen is enabled Change-Id: Ifb27aea8de8c8837f8eda329e1247abfadabb628 CRs-Fixed: 2214772 --- wmi/inc/wmi_unified_param.h | 1 + wmi/src/wmi_unified_tlv.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 57bdd926f357..e6129a6d009e 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1958,6 +1958,7 @@ struct roam_offload_scan_params { bool fw_pmksa_cache; #endif bool is_ese_assoc; + bool is_11r_assoc; struct mobility_domain_info mdid; #ifdef CONFIG_MCL /* THis is not available in non tlv target. diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 8da323945315..8e0168e813b4 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -6184,7 +6184,8 @@ static QDF_STATUS send_roam_scan_offload_mode_cmd_tlv(wmi_unified_t wmi_handle, if ((auth_mode != WMI_AUTH_NONE) && ((auth_mode != WMI_AUTH_OPEN) || (auth_mode == WMI_AUTH_OPEN && - roam_req->mdid.mdie_present) || + roam_req->mdid.mdie_present && + roam_req->is_11r_assoc) || roam_req->is_ese_assoc)) { len += WMI_TLV_HDR_SIZE; if (roam_req->is_ese_assoc) @@ -6193,7 +6194,8 @@ static QDF_STATUS send_roam_scan_offload_mode_cmd_tlv(wmi_unified_t wmi_handle, else if (auth_mode == WMI_AUTH_FT_RSNA || auth_mode == WMI_AUTH_FT_RSNA_PSK || (auth_mode == WMI_AUTH_OPEN && - roam_req->mdid.mdie_present)) + roam_req->mdid.mdie_present && + roam_req->is_11r_assoc)) len += sizeof(wmi_roam_11r_offload_tlv_param); else @@ -6315,7 +6317,8 @@ static QDF_STATUS send_roam_scan_offload_mode_cmd_tlv(wmi_unified_t wmi_handle, if ((auth_mode != WMI_AUTH_NONE) && ((auth_mode != WMI_AUTH_OPEN) || (auth_mode == WMI_AUTH_OPEN - && roam_req->mdid.mdie_present) || + && roam_req->mdid.mdie_present && + roam_req->is_11r_assoc) || roam_req->is_ese_assoc)) { if (roam_req->is_ese_assoc) { WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, @@ -6344,7 +6347,8 @@ static QDF_STATUS send_roam_scan_offload_mode_cmd_tlv(wmi_unified_t wmi_handle, } else if (auth_mode == WMI_AUTH_FT_RSNA || auth_mode == WMI_AUTH_FT_RSNA_PSK || (auth_mode == WMI_AUTH_OPEN - && roam_req->mdid.mdie_present)) { + && roam_req->mdid.mdie_present && + roam_req->is_11r_assoc)) { WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, 0); buf_ptr += WMI_TLV_HDR_SIZE;