diff --git a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h index 2e2a63496f..1b29493d15 100644 --- a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h +++ b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h @@ -774,8 +774,12 @@ struct hecap { uint8_t mac_cap_info[6]; uint8_t phycap_info[11]; struct { - uint16_t rx_map; - uint16_t tx_map; + uint16_t rx_he_mcs_map_lt_80; + uint16_t tx_he_mcs_map_lt_80; + uint16_t rx_he_mcs_map_160; + uint16_t tx_he_mcs_map_160; + uint16_t rx_he_mcs_map_80_80; + uint16_t tx_he_mcs_map_80_80; } he_cap_mcs_info; } qdf_packed; #endif diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 67b82c0047..cfbafee830 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -7621,7 +7621,7 @@ QDF_STATUS lim_populate_he_mcs_set(struct mac_context *mac_ctx, (*(uint16_t *)peer_he_caps->rx_he_mcs_map_80_80), (*(uint16_t *)peer_he_caps->tx_he_mcs_map_80_80)); - if (session_entry->nss == NSS_2x2_MODE) { + if (nss == NSS_2x2_MODE) { if (mac_ctx->mlme_cfg->gen.as_enabled && wlan_reg_is_24ghz_ch_freq(session_entry->curr_op_freq)) { if (IS_2X2_CHAIN(session_entry->chainMask)) diff --git a/os_if/tdls/src/wlan_cfg80211_tdls.c b/os_if/tdls/src/wlan_cfg80211_tdls.c index 6c9123b1b8..9aaf9e7744 100644 --- a/os_if/tdls/src/wlan_cfg80211_tdls.c +++ b/os_if/tdls/src/wlan_cfg80211_tdls.c @@ -238,7 +238,8 @@ tdls_calc_channels_from_staparams(struct tdls_update_peer_params *req_info, } #ifdef WLAN_FEATURE_11AX -#define MIN_TDLS_HE_CAP_LEN 21 +#define MIN_TDLS_HE_CAP_LEN 17 +#define MAX_TDLS_HE_CAP_LEN 29 static void wlan_cfg80211_tdls_extract_he_params(struct tdls_update_peer_params *req_info, @@ -256,8 +257,11 @@ wlan_cfg80211_tdls_extract_he_params(struct tdls_update_peer_params *req_info, } req_info->he_cap_len = params->he_capa_len; + if (req_info->he_cap_len > MAX_TDLS_HE_CAP_LEN) + req_info->he_cap_len = MAX_TDLS_HE_CAP_LEN; + qdf_mem_copy(&req_info->he_cap, params->he_capa, - sizeof(struct hecap)); + req_info->he_cap_len); return; }