qcacld-3.0: Consider he params 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 params if he params not present in
assoc resp to keep vdev and he param same.

Change-Id: Id3df1eae85d30334d5d877c6ddd737989813f7c8
CRs-Fixed: 2769783
This commit is contained in:
sheenam monga 2020-07-28 18:19:42 +05:30 • committed by snandini
commit de799e364a
2 changed files with 17 additions and 9 deletions

View file

@ -3593,10 +3593,11 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
}
}
if (lim_is_session_he_capable(pe_session) &&
pAssocRsp->he_cap.present) {
(pAssocRsp->he_cap.present ||
pBeaconStruct->he_cap.present)) {
lim_intersect_ap_he_caps(pe_session,
pAddBssParams,
NULL,
pBeaconStruct,
pAssocRsp);
lim_update_he_stbc_capable(&pAddBssParams->staContext);
lim_update_he_mcs_12_13(&pAddBssParams->staContext,
@ -3693,10 +3694,11 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
}
if (lim_is_he_6ghz_band(pe_session)) {
if (lim_is_session_he_capable(pe_session) &&
pAssocRsp->he_cap.present) {
(pAssocRsp->he_cap.present ||
pBeaconStruct->he_cap.present)) {
lim_intersect_ap_he_caps(pe_session,
pAddBssParams,
NULL,
pBeaconStruct,
pAssocRsp);
lim_update_he_stbc_capable(&pAddBssParams->staContext);
lim_update_he_6gop_assoc_resp(pAddBssParams,

View file

@ -6740,10 +6740,10 @@ 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 (beacon)
rcvd_he = &beacon->he_cap;
else
if (assoc_rsp)
rcvd_he = &assoc_rsp->he_cap;
else
rcvd_he = &beacon->he_cap;
lim_intersect_he_caps(rcvd_he, session_he, peer_he);
add_bss->staContext.he_capable = true;
@ -6859,11 +6859,17 @@ void lim_update_stads_he_caps(struct mac_context *mac_ctx,
tDot11fIEhe_cap *he_cap;
he_cap = &assoc_rsp->he_cap;
sta_ds->mlmStaContext.he_capable = he_cap->present;
if (!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->he_cap.present)
he_cap = &beacon->he_cap;
else
return;
sta_ds->mlmStaContext.he_capable = he_cap->present;
/* setting lpdc_coding if any of assoc_rsp or beacon has ladpc_coding
* enabled
*/