From bc64b790ba0d3e0a13efabc7137a55637f095ca1 Mon Sep 17 00:00:00 2001 From: sheenam monga Date: Thu, 17 Sep 2020 11:33:45 +0530 Subject: [PATCH] qcacld-3.0: Consider he caps from beacon if missing in assoc resp Issue: Currently, host calculates he_caps based on assoc resp he caps. In case assoc resp doesn't have he_caps host will set peer mode vht and vdev mode he which may cause issue due to different peer and vdev modes. Fix: Consider beacon he caps if he caps not present in assoc resp to keep vdev and he param same. Change-Id: Ia47b3d9c30b5ebc59a398a5ece2263ea65b03550 CRs-Fixed: 2777916 --- core/mac/src/pe/lim/lim_utils.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index cbdb90c0fc54..a29884caaeaf 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -6740,7 +6740,7 @@ void lim_intersect_ap_he_caps(struct pe_session *session, struct bss_params *add tDot11fIEhe_cap *session_he = &session->he_config; tDot11fIEhe_cap *peer_he = &add_bss->staContext.he_config; - if (assoc_rsp) + if (assoc_rsp && assoc_rsp->he_cap.present) rcvd_he = &assoc_rsp->he_cap; else rcvd_he = &beacon->he_cap; @@ -6860,13 +6860,17 @@ void lim_update_stads_he_caps(struct mac_context *mac_ctx, he_cap = &assoc_rsp->he_cap; - if (assoc_rsp->he_cap.present) + if (assoc_rsp->he_cap.present) { he_cap = &assoc_rsp->he_cap; - /* Use beacon HE caps if assoc resp doesn't have he caps */ - else if (beacon && beacon->he_cap.present) + } else if (beacon && beacon->he_cap.present) { + /* Use beacon HE caps if assoc resp doesn't have he caps */ + pe_debug("he_caps missing in assoc rsp"); he_cap = &beacon->he_cap; - else + qdf_mem_copy(&assoc_rsp->he_cap, &beacon->he_cap, + sizeof(*he_cap)); + } else { return; + } sta_ds->mlmStaContext.he_capable = he_cap->present;