From 720c77c8c120ef9d812ba810ac060bf22599a669 Mon Sep 17 00:00:00 2001 From: Lincoln Tran Date: Thu, 6 May 2021 16:03:19 -0700 Subject: [PATCH] qcacld-3.0: Send band correct TX BF caps In 6G 160Mhz case, beamforming values are not being sent correctly because the HE capability is populated from the minimum between bands. Since FW is advertising the 2G capabilities as a lower value, these are taking effect. Update these values from the correct band. Change-Id: I0a0bc14860487f104e7b872894f1eb939c06a613 CRs-fixed: 2939702 --- core/mac/src/pe/lim/lim_utils.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 81c599208876..48565121eedf 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -7555,6 +7555,7 @@ QDF_STATUS lim_send_he_caps_ie(struct mac_context *mac_ctx, HE_CAP_80P80_MCS_MAP_LEN; uint8_t num_ppe_th = 0; bool nan_beamforming_supported; + bool disable_nan_tx_bf = false; /* Sending only minimal info(no PPET) to FW now, update if required */ qdf_mem_zero(he_caps, he_cap_total_len); @@ -7576,6 +7577,7 @@ QDF_STATUS lim_send_he_caps_ie(struct mac_context *mac_ctx, he_cap->num_sounding_lt_80 = 0; he_cap->su_feedback_tone16 = 0; he_cap->mu_feedback_tone16 = 0; + disable_nan_tx_bf = true; } /* @@ -7583,7 +7585,14 @@ QDF_STATUS lim_send_he_caps_ie(struct mac_context *mac_ctx, * mac->he_cap_5g.bfee_sts_lt_80 to keep the values same * as initial connection */ - he_cap->bfee_sts_lt_80 = mac_ctx->he_cap_5g.bfee_sts_lt_80; + if (!disable_nan_tx_bf) { + he_cap->bfee_sts_lt_80 = mac_ctx->he_cap_5g.bfee_sts_lt_80; + he_cap->bfee_sts_gt_80 = mac_ctx->he_cap_5g.bfee_sts_gt_80; + he_cap->num_sounding_gt_80 = + mac_ctx->he_cap_5g.num_sounding_gt_80; + pe_debug("he_cap_5g: bfee_sts_gt_80 %d num_sounding_gt_80 %d", + he_cap->bfee_sts_gt_80, he_cap->num_sounding_gt_80); + } if (he_cap->ppet_present) num_ppe_th = lim_set_he_caps_ppet(mac_ctx, he_caps, @@ -7601,7 +7610,14 @@ QDF_STATUS lim_send_he_caps_ie(struct mac_context *mac_ctx, * mac->he_cap_5g.bfee_sts_lt_80 to keep the values same * as initial connection */ - he_cap->bfee_sts_lt_80 = mac_ctx->he_cap_2g.bfee_sts_lt_80; + if (!disable_nan_tx_bf) { + he_cap->bfee_sts_lt_80 = mac_ctx->he_cap_2g.bfee_sts_lt_80; + he_cap->bfee_sts_gt_80 = mac_ctx->he_cap_2g.bfee_sts_gt_80; + he_cap->num_sounding_gt_80 = + mac_ctx->he_cap_2g.num_sounding_gt_80; + pe_debug("he_cap_2g: bfee_sts_gt_80 %d num_sounding_gt_80 %d", + he_cap->bfee_sts_gt_80, he_cap->num_sounding_gt_80); + } lim_intersect_he_ch_width_2g(mac_ctx, he_cap);