Browse Source

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
Lincoln Tran 3 years ago
parent
commit
1f2a49ed00
1 changed files with 18 additions and 2 deletions
  1. 18 2
      core/mac/src/pe/lim/lim_utils.c

+ 18 - 2
core/mac/src/pe/lim/lim_utils.c

@@ -7466,6 +7466,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);
@@ -7487,6 +7488,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;
 	}
 
 	/*
@@ -7494,7 +7496,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,
@@ -7512,7 +7521,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);