Jelajahi Sumber

qcacld-3.0: Fix HE MCS user configuration issue

Update the 2G and 5G HE capabilities with user configuration
to advertise the user configured HE MCS in management frames.

Change-Id: I59952aba0187cd169be518336c69aa93b512327b
CRs-Fixed: 3074827
Kiran Kumar Lokere 3 tahun lalu
induk
melakukan
ce956d13f5
2 mengubah file dengan 30 tambahan dan 2 penghapusan
  1. 3 2
      core/hdd/src/wlan_hdd_he.c
  2. 27 0
      core/sme/src/common/sme_api.c

+ 3 - 2
core/hdd/src/wlan_hdd_he.c

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 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
@@ -37,8 +38,6 @@ void hdd_update_tgt_he_cap(struct hdd_context *hdd_ctx,
 	tDot11fIEhe_cap he_cap_ini = {0};
 	uint8_t value = 0;
 
-	ucfg_mlme_update_tgt_he_cap(hdd_ctx->psoc, cfg);
-
 	status = ucfg_mlme_cfg_get_vht_tx_bfee_ant_supp(hdd_ctx->psoc,
 							&value);
 	if (!QDF_IS_STATUS_SUCCESS(status))
@@ -46,6 +45,8 @@ void hdd_update_tgt_he_cap(struct hdd_context *hdd_ctx,
 
 	he_cap_ini.bfee_sts_lt_80 = value;
 	sme_update_tgt_he_cap(hdd_ctx->mac_handle, cfg, &he_cap_ini);
+
+	ucfg_mlme_update_tgt_he_cap(hdd_ctx->psoc, cfg);
 }
 
 void wlan_hdd_check_11ax_support(struct hdd_beacon_data *beacon,

+ 27 - 0
core/sme/src/common/sme_api.c

@@ -10830,6 +10830,33 @@ void sme_update_tgt_he_cap(mac_handle_t mac_handle,
 	mac_ctx->he_cap_5g.bfee_sts_lt_80 =
 			QDF_MIN(cfg->he_cap_5g.bfee_sts_lt_80,
 				he_cap_ini->bfee_sts_lt_80);
+
+	if (!mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable2x2) {
+		mac_ctx->he_cap_2g.rx_he_mcs_map_lt_80 = HE_SET_MCS_4_NSS(
+				mac_ctx->he_cap_2g.rx_he_mcs_map_lt_80,
+				HE_MCS_DISABLE, 2);
+		mac_ctx->he_cap_2g.tx_he_mcs_map_lt_80 = HE_SET_MCS_4_NSS(
+				mac_ctx->he_cap_2g.tx_he_mcs_map_lt_80,
+				HE_MCS_DISABLE, 2);
+		mac_ctx->he_cap_5g.rx_he_mcs_map_lt_80 = HE_SET_MCS_4_NSS(
+				mac_ctx->he_cap_5g.rx_he_mcs_map_lt_80,
+				HE_MCS_DISABLE, 2);
+		mac_ctx->he_cap_5g.tx_he_mcs_map_lt_80 = HE_SET_MCS_4_NSS(
+				mac_ctx->he_cap_5g.tx_he_mcs_map_lt_80,
+				HE_MCS_DISABLE, 2);
+	}
+	mac_ctx->he_cap_2g.rx_he_mcs_map_lt_80 = HE_INTERSECT_MCS(
+		mac_ctx->he_cap_2g.rx_he_mcs_map_lt_80,
+		mac_ctx->mlme_cfg->he_caps.dot11_he_cap.rx_he_mcs_map_lt_80);
+	mac_ctx->he_cap_2g.tx_he_mcs_map_lt_80 = HE_INTERSECT_MCS(
+		mac_ctx->he_cap_2g.tx_he_mcs_map_lt_80,
+		mac_ctx->mlme_cfg->he_caps.dot11_he_cap.tx_he_mcs_map_lt_80);
+	mac_ctx->he_cap_5g.rx_he_mcs_map_lt_80 = HE_INTERSECT_MCS(
+		mac_ctx->he_cap_5g.rx_he_mcs_map_lt_80,
+		mac_ctx->mlme_cfg->he_caps.dot11_he_cap.rx_he_mcs_map_lt_80);
+	mac_ctx->he_cap_5g.tx_he_mcs_map_lt_80 = HE_INTERSECT_MCS(
+		mac_ctx->he_cap_5g.tx_he_mcs_map_lt_80,
+		mac_ctx->mlme_cfg->he_caps.dot11_he_cap.tx_he_mcs_map_lt_80);
 }
 
 void sme_update_he_cap_nss(mac_handle_t mac_handle, uint8_t session_id,