diff options
author | Abhishek Ambure <aambure@codeaurora.org> | 2020-09-02 14:01:56 +0530 |
---|---|---|
committer | chenpaul <chenpaul@google.com> | 2020-12-04 14:15:47 +0800 |
commit | 6fa919187a626a3798fb121c74963ac94c35c24f (patch) | |
tree | 401a8722b75d7382af5be2423d9061b52803015f | |
parent | 040b5d4973a953803ac95e9400ca16cb47cbc06e (diff) | |
download | qcacld-6fa919187a626a3798fb121c74963ac94c35c24f.tar.gz |
qcacld-3.0: Update RSN caps on roaming
After roaming, FW updates host by roam sync indication. Host parses
the reassoc request in roam sync indication to update PMF capability
in PE session.
Change-Id: I9638a77150e81ea911e95d294c58d605871630a0
CRs-Fixed: 2746470
Bug: 170086722
Signed-off-by: Srinivas Girigowda <quic_sgirigow@quicinc.com>
-rw-r--r-- | core/mac/src/pe/lim/lim_api.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 4ee60032c5..0aaf44a306 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -2053,6 +2053,68 @@ void lim_fill_join_rsp_ht_caps(tpPESession session, tpSirSmeJoinRsp join_rsp) #endif #ifdef WLAN_FEATURE_ROAM_OFFLOAD +#ifdef WLAN_FEATURE_11W +static void pe_set_rmf_caps(tpAniSirGlobal mac_ctx, + tpPESession ft_session, + roam_offload_synch_ind *roam_synch) +{ + uint8_t *assoc_body; + uint16_t len, ret; + tDot11fReAssocRequest *assoc_req; + uint32_t status; + tSirMacRsnInfo rsn_ie; + tDot11fIERSN parse_rsn = {0}; + + assoc_body = (uint8_t *)roam_synch + roam_synch->reassoc_req_offset + + sizeof(tSirMacMgmtHdr); + len = roam_synch->reassoc_req_length - sizeof(tSirMacMgmtHdr); + + assoc_req = qdf_mem_malloc(sizeof(*assoc_req)); + if (!assoc_req) + return; + + /* delegate to the framesc-generated code, */ + status = dot11f_unpack_re_assoc_request(mac_ctx, assoc_body, len, + assoc_req, false); + if (DOT11F_FAILED(status)) { + pe_err("Failed to parse a Re-association Request (0x%08x, %d bytes):", + status, len); + QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_INFO, + assoc_body, len); + qdf_mem_free(assoc_req); + return; + } else if (DOT11F_WARNED(status)) { + pe_debug("There were warnings while unpacking a Re-association Request (0x%08x, %d bytes):", + status, len); + } + ft_session->limRmfEnabled = false; + if (!assoc_req->RSNOpaque.present) { + qdf_mem_free(assoc_req); + return; + } + rsn_ie.info[0] = WLAN_ELEMID_RSN; + rsn_ie.info[1] = assoc_req->RSNOpaque.num_data; + + rsn_ie.length = assoc_req->RSNOpaque.num_data + 2; + qdf_mem_copy(&rsn_ie.info[2], assoc_req->RSNOpaque.data, + assoc_req->RSNOpaque.num_data); + qdf_mem_free(assoc_req); + + ret = dot11f_unpack_ie_rsn(mac_ctx, &rsn_ie.info[2], + rsn_ie.length - 2, &parse_rsn, false); + if (DOT11F_FAILED(ret)) + return; + + ft_session->limRmfEnabled = parse_rsn.RSN_Cap[0] & 0x80; +} +#else +static inline void pe_set_rmf_caps(tpAniSirGlobal mac_ctx, + tpPESession ft_session, + roam_offload_synch_ind *roam_synch) +{ +} +#endif + /** * sir_parse_bcn_fixed_fields() - Parse fixed fields in Beacon IE's * @@ -2388,6 +2450,7 @@ QDF_STATUS pe_roam_synch_callback(tpAniSirGlobal mac_ctx, /* Next routine will update nss and vdev_nss with AP's capabilities */ lim_fill_ft_session(mac_ctx, bss_desc, ft_session_ptr, session_ptr); + pe_set_rmf_caps(mac_ctx, ft_session_ptr, roam_sync_ind_ptr); /* Next routine may update nss based on dot11Mode */ lim_ft_prepare_add_bss_req(mac_ctx, false, ft_session_ptr, bss_desc); roam_sync_ind_ptr->add_bss_params = |