|
@@ -1,6 +1,6 @@
|
|
|
/*
|
|
|
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
|
|
|
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
|
+ * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
|
*
|
|
|
* Permission to use, copy, modify, and/or distribute this software for
|
|
|
* any purpose with or without fee is hereby granted, provided that the
|
|
@@ -339,8 +339,8 @@ void lim_update_he_mcs_12_13_map(struct wlan_objmgr_psoc *psoc,
|
|
|
#endif
|
|
|
|
|
|
#ifdef WLAN_FEATURE_11BE
|
|
|
-static void lim_extract_eht_op(struct pe_session *session,
|
|
|
- tSirProbeRespBeacon *beacon_struct)
|
|
|
+void lim_extract_eht_op(struct pe_session *session,
|
|
|
+ tSirProbeRespBeacon *beacon_struct)
|
|
|
{
|
|
|
uint32_t max_eht_bw;
|
|
|
|
|
@@ -405,11 +405,6 @@ void lim_update_eht_bw_cap_mcs(struct pe_session *session,
|
|
|
session->eht_config.num_sounding_dim_320mhz = 0;
|
|
|
}
|
|
|
}
|
|
|
-#else
|
|
|
-static void lim_extract_eht_op(struct pe_session *session,
|
|
|
- tSirProbeRespBeacon *beacon_struct)
|
|
|
-{
|
|
|
-}
|
|
|
#endif
|
|
|
|
|
|
#ifdef WLAN_FEATURE_11BE_MLO
|
|
@@ -598,6 +593,7 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
|
|
|
uint8_t channel = 0;
|
|
|
uint8_t sta_prefer_80mhz_over_160mhz;
|
|
|
struct mlme_vht_capabilities_info *mlme_vht_cap;
|
|
|
+ QDF_STATUS status;
|
|
|
|
|
|
beacon_struct = qdf_mem_malloc(sizeof(tSirProbeRespBeacon));
|
|
|
if (!beacon_struct)
|
|
@@ -608,8 +604,9 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
|
|
|
sta_prefer_80mhz_over_160mhz =
|
|
|
session->mac_ctx->mlme_cfg->sta.sta_prefer_80mhz_over_160mhz;
|
|
|
|
|
|
- if (sir_parse_beacon_ie(mac_ctx, beacon_struct, p_ie,
|
|
|
- (uint32_t) ie_len) != QDF_STATUS_SUCCESS) {
|
|
|
+ status = sir_parse_beacon_ie(mac_ctx, beacon_struct, p_ie,
|
|
|
+ (uint32_t)ie_len);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
pe_err("sir_parse_beacon_ie failed to parse beacon");
|
|
|
qdf_mem_free(beacon_struct);
|
|
|
return;
|
|
@@ -620,9 +617,10 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
|
|
|
beacon_struct->wmeEdcaPresent ||
|
|
|
beacon_struct->HTCaps.present)
|
|
|
LIM_BSS_CAPS_SET(WME, *qos_cap);
|
|
|
- if (LIM_BSS_CAPS_GET(WME, *qos_cap)
|
|
|
- && beacon_struct->wsmCapablePresent)
|
|
|
+
|
|
|
+ if (LIM_BSS_CAPS_GET(WME, *qos_cap) && beacon_struct->wsmCapablePresent)
|
|
|
LIM_BSS_CAPS_SET(WSM, *qos_cap);
|
|
|
+
|
|
|
if (beacon_struct->HTCaps.present)
|
|
|
mac_ctx->lim.htCapabilityPresentInBeacon = 1;
|
|
|
else
|
|
@@ -630,10 +628,10 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
|
|
|
|
|
|
vht_op = &beacon_struct->VHTOperation;
|
|
|
vht_caps = &beacon_struct->VHTCaps;
|
|
|
- if (IS_BSS_VHT_CAPABLE(beacon_struct->VHTCaps) &&
|
|
|
- vht_op->present &&
|
|
|
- session->vhtCapability) {
|
|
|
+ if (IS_BSS_VHT_CAPABLE(beacon_struct->VHTCaps) && vht_op->present &&
|
|
|
+ session->vhtCapability) {
|
|
|
session->vhtCapabilityPresentInBeacon = 1;
|
|
|
+
|
|
|
if (((beacon_struct->Vendor1IEPresent &&
|
|
|
beacon_struct->vendor_vht_ie.present &&
|
|
|
beacon_struct->Vendor3IEPresent)) &&
|
|
@@ -647,7 +645,7 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
|
|
|
}
|
|
|
|
|
|
if (session->vhtCapabilityPresentInBeacon == 1 &&
|
|
|
- !session->htSupportedChannelWidthSet) {
|
|
|
+ !session->htSupportedChannelWidthSet) {
|
|
|
if (!mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_txbf_20mhz)
|
|
|
session->vht_config.su_beam_formee = 0;
|
|
|
|
|
@@ -658,8 +656,7 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
|
|
|
mac_ctx, session,
|
|
|
beacon_struct->chan_freq);
|
|
|
|
|
|
- } else if (session->vhtCapabilityPresentInBeacon &&
|
|
|
- vht_op->chanWidth) {
|
|
|
+ } else if (session->vhtCapabilityPresentInBeacon && vht_op->chanWidth) {
|
|
|
/* If VHT is supported min 80 MHz support is must */
|
|
|
ap_bcon_ch_width = vht_op->chanWidth;
|
|
|
if (vht_caps->vht_extended_nss_bw_cap) {
|
|
@@ -707,8 +704,7 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
|
|
|
vht_ch_wd =
|
|
|
WNI_CFG_VHT_CHANNEL_WIDTH_80_PLUS_80MHZ;
|
|
|
else
|
|
|
- vht_ch_wd =
|
|
|
- WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ;
|
|
|
+ vht_ch_wd = WNI_CFG_VHT_CHANNEL_WIDTH_160MHZ;
|
|
|
}
|
|
|
/*
|
|
|
* If the supported channel width is greater than 80MHz and
|
|
@@ -774,12 +770,11 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
|
|
|
session->ap_ch_width = session->ch_width;
|
|
|
}
|
|
|
|
|
|
- if (session->vhtCapability &&
|
|
|
- session->vhtCapabilityPresentInBeacon &&
|
|
|
- beacon_struct->ext_cap.present) {
|
|
|
+ if (session->vhtCapability && session->vhtCapabilityPresentInBeacon &&
|
|
|
+ beacon_struct->ext_cap.present) {
|
|
|
ext_cap = (struct s_ext_cap *)beacon_struct->ext_cap.bytes;
|
|
|
session->gLimOperatingMode.present =
|
|
|
- ext_cap->oper_mode_notification;
|
|
|
+ ext_cap->oper_mode_notification;
|
|
|
if (ext_cap->oper_mode_notification) {
|
|
|
uint8_t self_nss = 0;
|
|
|
|
|
@@ -798,13 +793,12 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
|
|
|
* WFA CERT test scenario.
|
|
|
*/
|
|
|
if (ext_cap->beacon_protection_enable &&
|
|
|
- (session->opmode == QDF_STA_MODE) &&
|
|
|
- (!session->nss_forced_1x1) &&
|
|
|
+ session->opmode == QDF_STA_MODE &&
|
|
|
+ !session->nss_forced_1x1 &&
|
|
|
lim_get_nss_supported_by_ap(
|
|
|
&beacon_struct->VHTCaps,
|
|
|
&beacon_struct->HTCaps,
|
|
|
- &beacon_struct->he_cap) ==
|
|
|
- NSS_1x1_MODE)
|
|
|
+ &beacon_struct->he_cap) == NSS_1x1_MODE)
|
|
|
session->gLimOperatingMode.rxNSS = self_nss - 1;
|
|
|
else
|
|
|
session->gLimOperatingMode.rxNSS =
|
|
@@ -813,6 +807,7 @@ void lim_extract_ap_capability(struct mac_context *mac_ctx, uint8_t *p_ie,
|
|
|
pe_err("AP does not support op_mode rx");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
lim_check_is_he_mcs_valid(session, beacon_struct);
|
|
|
lim_check_peer_ldpc_and_update(session, beacon_struct);
|
|
|
lim_extract_he_op(session, beacon_struct);
|