From 6bfeae6ae4c75e13e65af9cb4444b612f1b053cd Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Wed, 18 Mar 2020 15:27:21 +0530 Subject: [PATCH] qcacld-3.0: Set unicast key followed by broadcast key in FILS case Host driver sets broadcast keys followed by unicast keys for FILS connection. This results in the data packet sent before unicast set key and peer pn was reset. Sending broadcast keys first will allow firmware to enable WAL_PEER_ALLOW_DATA and data tx could start without unicast keys being set. Due to this TX packet will go unencrypted and TX will fail without ACK from peer AP, peer pn will be set to 2, after this unicast key got set and this resets the peer pn to 1. And when next frame TX was done, pn check failed and firmware assert occured. Set the unicast keys to firmware first followed by the broadcast keys for FILS case. Change-Id: Ia498709ac524e95b831cc7ccdd17e6fc7ae0b130 CRs-Fixed: 2633632 --- core/sme/src/csr/csr_api_roam.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index e3214c6c058f..051a7a0d059e 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -7586,15 +7586,6 @@ static void csr_process_fils_join_rsp(struct mac_context *mac_ctx, goto process_fils_join_rsp_fail; } - status = csr_issue_set_context_req_helper(mac_ctx, profile, - session_id, &bss_desc->bssId, true, false, - eSIR_RX_ONLY, 2, roam_info->fils_join_rsp->gtk_len, - roam_info->fils_join_rsp->gtk); - if (QDF_IS_STATUS_ERROR(status)) { - sme_err("Set context for bcast fail"); - goto process_fils_join_rsp_fail; - } - status = csr_issue_set_context_req_helper(mac_ctx, profile, session_id, &bss_desc->bssId, true, true, eSIR_TX_RX, 0, @@ -7604,6 +7595,15 @@ static void csr_process_fils_join_rsp(struct mac_context *mac_ctx, sme_err("Set context for unicast fail"); goto process_fils_join_rsp_fail; } + + status = csr_issue_set_context_req_helper(mac_ctx, profile, + session_id, &bss_desc->bssId, true, false, + eSIR_RX_ONLY, 2, roam_info->fils_join_rsp->gtk_len, + roam_info->fils_join_rsp->gtk); + if (QDF_IS_STATUS_ERROR(status)) { + sme_err("Set context for bcast fail"); + goto process_fils_join_rsp_fail; + } return; process_fils_join_rsp_fail: