diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 319474f2e8d0..88d0edd569a4 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -5331,6 +5331,14 @@ struct ppet_hdr { #define HE_MCS_0_11 0x2 #define HE_MCS_DISABLE 0x3 +#define HE_6G_MIN_MPDU_START_SAPCE_BIT_POS 0 +#define HE_6G_MAX_AMPDU_LEN_EXP_BIT_POS 3 +#define HE_6G_MAX_MPDU_LEN_BIT_POS 6 +#define HE_6G_SMPS_BIT_POS 9 +#define HE_6G_RD_RESP_BIT_POS 11 +#define HE_6G_RX_ANT_PATTERN_BIT_POS 12 +#define HE_6G_TX_ANT_PATTERN_BIT_POS 13 + /* * Following formuala has been arrived at using karnaugh map and unit tested * with sample code. Take MCS for each NSS as 2 bit value first and solve for diff --git a/core/wma/src/wma_he.c b/core/wma/src/wma_he.c index 44b78a68018a..9cd72f2f5cea 100644 --- a/core/wma/src/wma_he.c +++ b/core/wma/src/wma_he.c @@ -1333,11 +1333,27 @@ void wma_populate_peer_he_cap(struct peer_assoc_params *peer, wma_print_he_mac_cap_w2(mac_cap[1]); wma_print_he_ppet(&peer->peer_ppet); - qdf_mem_copy(&peer->peer_he_caps_6ghz, - ((uint8_t *)¶ms->he_6ghz_band_caps) + 1, - DOT11F_IE_HE_6GHZ_BAND_CAP_MAX_LEN); - WMA_LOGD(FL("HE 6GHz band caps: %0x"), peer->peer_he_caps_6ghz); - return; + if (params->he_6ghz_band_caps.present) { + peer->peer_he_caps_6ghz = + (params->he_6ghz_band_caps.min_mpdu_start_spacing << + HE_6G_MIN_MPDU_START_SAPCE_BIT_POS) | + (params->he_6ghz_band_caps.max_ampdu_len_exp << + HE_6G_MAX_AMPDU_LEN_EXP_BIT_POS) | + (params->he_6ghz_band_caps.max_mpdu_len << + HE_6G_MAX_MPDU_LEN_BIT_POS) | + (params->he_6ghz_band_caps.sm_pow_save << + HE_6G_SMPS_BIT_POS) | + (params->he_6ghz_band_caps.rd_responder << + HE_6G_RD_RESP_BIT_POS) | + (params->he_6ghz_band_caps.rx_ant_pattern_consistency << + HE_6G_RX_ANT_PATTERN_BIT_POS) | + (params->he_6ghz_band_caps.tx_ant_pattern_consistency << + HE_6G_TX_ANT_PATTERN_BIT_POS); + WMA_LOGD(FL("HE 6GHz band caps: %0x"), peer->peer_he_caps_6ghz); + } else { + WMA_LOGD(FL("HE 6GHz band caps not present")); + peer->peer_he_caps_6ghz = 0; + } } void wma_update_vdev_he_ops(uint32_t *he_ops, tDot11fIEhe_op *he_op)