From a7f1c222a90ad29bf1405c0b2be07ab435d30541 Mon Sep 17 00:00:00 2001 From: Abhishek Ambure Date: Wed, 27 Nov 2019 19:54:26 +0530 Subject: [PATCH] qcacld-3.0: Set RSN capability flag for SAP peers Peer assoc command send to firmware updates peer params in firmware ex. peer_new_assoc, peer_associd, need_gtk_2_way etc. If RSN capability flags are present in peer assoc request of SAP and P2P-Go peers, host updates need_gtk_2_way, need_ptk_4_way peer assoc params to firmware. If need_gtk_2_way, need_ptk_4_way params are not updated for RSN capable peers of SAP/P2P-Go, firmware is not able to hanlde data packets(HTT) before the key installation(WMI) is successful. Change-Id: I0a24aab3ac4ff4ca061782f6a4d0ba62dd227b04 CRs-Fixed: 2575133 --- core/mac/src/pe/lim/lim_assoc_utils.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index f035dfcc138e..eff0bfa33673 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -2675,6 +2675,20 @@ lim_add_sta(struct mac_context *mac_ctx, add_sta_params->stbc_capable = 0; } + if (session_entry->opmode == QDF_SAP_MODE || + session_entry->opmode == QDF_P2P_GO_MODE) { + if (session_entry->parsedAssocReq) { + uint16_t aid = sta_ds->assocId; + /* Get a copy of the already parsed Assoc Request */ + assoc_req = + (tpSirAssocReq) session_entry->parsedAssocReq[aid]; + + add_sta_params->wpa_rsn = assoc_req->rsnPresent; + add_sta_params->wpa_rsn |= + (assoc_req->wpaPresent << 1); + } + } + lim_update_he_stbc_capable(add_sta_params); msg_q.type = WMA_ADD_STA_REQ;