From 5b4a05fee33680642f269bbe88be24594b2bfbca Mon Sep 17 00:00:00 2001 From: Amruta Kulkarni Date: Mon, 3 Aug 2020 19:21:43 -0700 Subject: [PATCH] qcacld-3.0: Move the rmf enabled check to lim_is_6g_allowed_sec() For 6ghz AP with open security,the STA join req was not going through due to security check added from CR2715086. Fix is to move the rmf enabled check inside lim_is_6g_allowed_sec(). Change-Id: I32fb0de34fdf05063dee5f28aac164b1dfcaea5e CRs-Fixed: 2746745 --- core/mac/src/pe/lim/lim_process_sme_req_messages.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index e2ee79417fe5..7d87acf813bf 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -502,6 +502,12 @@ static bool lim_is_6g_allowed_sec(struct mac_context *mac, pe_err("open mode sec not allowed for 6G conn"); return false; } + + if (!session->limRmfEnabled) { + pe_err("rmf enabled is false"); + return false; + } + keymgmt = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_KEY_MGMT); if (!keymgmt || (keymgmt & (1 << WLAN_CRYPTO_KEY_MGMT_NONE | @@ -1452,8 +1458,7 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf) session->encryptType = sme_join_req->UCEncryptionType; if (wlan_reg_is_6ghz_chan_freq(session->curr_op_freq)) { - if (!session->limRmfEnabled || - !lim_is_session_he_capable(session) || + if (!lim_is_session_he_capable(session) || !lim_is_6g_allowed_sec(mac_ctx, session)) { pe_err("JOIN_REQ with invalid 6G security"); ret_code = eSIR_SME_INVALID_PARAMETERS;