Merge "qcacld-3.0: Add extended capabilities IE length check" into wlan-cld3.driver.lnx.2.0.8.r3-rel

This commit is contained in:
Linux Build Service Account 2023-10-10 05:39:13 -07:00 • committed by Gerrit - the friendly Code Review server
commit 44d87eb5e3

View file

@ -6525,6 +6525,7 @@ QDF_STATUS populate_dot11f_twt_extended_caps(struct mac_context *mac_ctx,
dot11f->num_bytes = DOT11F_IE_EXTCAP_MAX_LEN;
p_ext_cap = (struct s_ext_cap *)dot11f->bytes;
dot11f->present = 1;
if (pe_session->opmode == QDF_STA_MODE)
p_ext_cap->twt_requestor_support =
@ -6537,6 +6538,10 @@ QDF_STATUS populate_dot11f_twt_extended_caps(struct mac_context *mac_ctx,
mac_ctx->mlme_cfg->twt_cfg.res_flag;
dot11f->num_bytes = lim_compute_ext_cap_ie_length(dot11f);
if (!dot11f->num_bytes) {
dot11f->present = 0;
pe_debug("ext ie length become 0, disable the ext caps");
}
return QDF_STATUS_SUCCESS;
}
@ -6552,6 +6557,7 @@ QDF_STATUS populate_dot11f_btm_extended_caps(struct mac_context *mac_ctx,
pe_debug("enter");
dot11f->num_bytes = DOT11F_IE_EXTCAP_MAX_LEN;
p_ext_cap = (struct s_ext_cap *)dot11f->bytes;
dot11f->present = 1;
status = cm_akm_roam_allowed(mac_ctx, pe_session->vdev_id);
if (QDF_IS_STATUS_ERROR(status)) {
@ -6560,6 +6566,10 @@ QDF_STATUS populate_dot11f_btm_extended_caps(struct mac_context *mac_ctx,
}
dot11f->num_bytes = lim_compute_ext_cap_ie_length(dot11f);
if (!dot11f->num_bytes) {
dot11f->present = 0;
pe_debug("ext ie length become 0, disable the ext caps");
}
return QDF_STATUS_SUCCESS;
}