summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Ambure <aambure@codeaurora.org>2020-09-02 14:01:56 +0530
committerHsiu Chang Chen <hsiuchangchen@google.com>2020-12-08 06:03:21 +0000
commitc3f6260ab1220b3746fef42d902ad35b13d78421 (patch)
tree667c3cf2099560976108f26cf93dbca630001194
parent9c5c81af7face965670aa6b13b9adbd267a47bb5 (diff)
downloadqcacld-c3f6260ab1220b3746fef42d902ad35b13d78421.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. Bug: 170086722 Change-Id: I9638a77150e81ea911e95d294c58d605871630a0 CRs-Fixed: 2746470 Signed-off-by: Hsiu-Chang Chen <hsiuchangchen@google.com>
-rw-r--r--core/mac/src/pe/lim/lim_api.c63
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 5463366dcb..591a0cb40e 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -1888,6 +1888,68 @@ void lim_fill_join_rsp_ht_caps(struct pe_session *session,
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+#ifdef WLAN_FEATURE_11W
+static void pe_set_rmf_caps(tpAniSirGlobal mac_ctx,
+ struct pe_session *ft_session,
+ struct 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,
+ struct pe_session *ft_session,
+ struct roam_offload_synch_ind *roam_synch)
+{
+}
+#endif
+
/**
* sir_parse_bcn_fixed_fields() - Parse fixed fields in Beacon IE's
*
@@ -2566,6 +2628,7 @@ pe_roam_synch_callback(struct mac_context *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);
if (session_ptr->is11Rconnection)