Kaynağa Gözat

qcacld-3.0: Populate wideband HE MCS rates

Since, with wide wideband, TDLS device should
support higher MCS rates of bw greater than 160 MHz,
even when AP doesn't support it.
So, fill those MCS rates in case device supports it.

Change-Id: I89379a82441c5d1811145c56b6fe8a46e69b3037
CRs-Fixed: 3230426
Utkarsh Bhatnagar 2 yıl önce
ebeveyn
işleme
186163bc5a

+ 41 - 0
core/mac/src/pe/lim/lim_process_tdls.c

@@ -1013,6 +1013,44 @@ static void lim_tdls_fill_setup_cnf_he_op(struct mac_context *mac,
 						&tdls_setup_cnf->he_op);
 }
 
+static void lim_tdls_populate_he_wideband_mcs(struct mac_context *mac_ctx,
+					      tpDphHashNode stads,
+					      uint8_t nss)
+{
+	struct supported_rates *rates = &stads->supportedRates;
+	tDot11fIEhe_cap *peer_he_caps = &stads->he_config;
+
+	if (stads->ch_width == CH_WIDTH_160MHZ) {
+		lim_populate_he_mcs_per_bw(
+			mac_ctx, &rates->rx_he_mcs_map_160,
+			&rates->tx_he_mcs_map_160,
+			*((uint16_t *)peer_he_caps->rx_he_mcs_map_160),
+			*((uint16_t *)peer_he_caps->tx_he_mcs_map_160),
+			nss,
+			*((uint16_t *)mac_ctx->mlme_cfg->he_caps.dot11_he_cap.
+				rx_he_mcs_map_160),
+			*((uint16_t *)mac_ctx->mlme_cfg->he_caps.dot11_he_cap.
+					tx_he_mcs_map_160));
+	} else {
+		rates->tx_he_mcs_map_160 = HE_MCS_ALL_DISABLED;
+		rates->rx_he_mcs_map_160 = HE_MCS_ALL_DISABLED;
+	}
+	if (stads->ch_width == CH_WIDTH_80P80MHZ) {
+		lim_populate_he_mcs_per_bw(
+			mac_ctx, &rates->rx_he_mcs_map_80_80,
+			&rates->tx_he_mcs_map_80_80,
+			*((uint16_t *)peer_he_caps->rx_he_mcs_map_80_80),
+			*((uint16_t *)peer_he_caps->tx_he_mcs_map_80_80), nss,
+			*((uint16_t *)mac_ctx->mlme_cfg->he_caps.dot11_he_cap.
+					rx_he_mcs_map_80_80),
+			*((uint16_t *)mac_ctx->mlme_cfg->he_caps.dot11_he_cap.
+					tx_he_mcs_map_80_80));
+	} else {
+		rates->tx_he_mcs_map_80_80 = HE_MCS_ALL_DISABLED;
+		rates->rx_he_mcs_map_80_80 = HE_MCS_ALL_DISABLED;
+	}
+}
+
 static void lim_tdls_populate_he_matching_rate_set(struct mac_context *mac_ctx,
 						   tpDphHashNode stads,
 						   uint8_t nss,
@@ -1020,6 +1058,9 @@ static void lim_tdls_populate_he_matching_rate_set(struct mac_context *mac_ctx,
 {
 	lim_populate_he_mcs_set(mac_ctx, &stads->supportedRates,
 				&stads->he_config, session, nss);
+	/*mcs rates for less than 80 mhz bw */
+	if (stads->ch_width > session->ch_width)
+		lim_tdls_populate_he_wideband_mcs(mac_ctx, stads, nss);
 }
 
 static QDF_STATUS

+ 6 - 4
core/mac/src/pe/lim/lim_utils.c

@@ -7840,10 +7840,12 @@ QDF_STATUS lim_send_he_caps_ie(struct mac_context *mac_ctx,
  *
  * Return: status of operation
  */
-static QDF_STATUS lim_populate_he_mcs_per_bw(struct mac_context *mac_ctx,
-				uint16_t *supp_rx_mcs, uint16_t *supp_tx_mcs,
-				uint16_t peer_rx, uint16_t peer_tx, uint8_t nss,
-				uint16_t rx_mcs, uint16_t tx_mcs)
+QDF_STATUS lim_populate_he_mcs_per_bw(struct mac_context *mac_ctx,
+				      uint16_t *supp_rx_mcs,
+				      uint16_t *supp_tx_mcs,
+				      uint16_t peer_rx, uint16_t peer_tx,
+				      uint8_t nss, uint16_t rx_mcs,
+				      uint16_t tx_mcs)
 {
 
 	pe_debug("peer rates: rx_mcs - 0x%04x tx_mcs - 0x%04x",

+ 27 - 0
core/mac/src/pe/lim/lim_utils.h

@@ -1503,6 +1503,33 @@ QDF_STATUS lim_send_he_caps_ie(struct mac_context *mac_ctx,
 			       enum QDF_OPMODE device_mode,
 			       uint8_t vdev_id);
 
+/**
+ * lim_populate_he_mcs_per_bw() - pouldate HE mcs set per BW (le 80, 160, 80+80)
+ * @mac_ctx: Global MAC context
+ * @self_rx: self rx mcs set
+ * @self_tx: self tx mcs set
+ * @peer_rx: peer rx mcs set
+ * @peer_tx: peer tx mcs set
+ * @nss: nss
+ * @cfg_rx_param: rx wni param to read
+ * @cfg_tx_param: tx wni param to read
+ *
+ * MCS values are interpreted as in IEEE 11ax-D1.4 spec onwards
+ * +-----------------------------------------------------+
+ * |  SS8  |  SS7  |  SS6  | SS5 | SS4 | SS3 | SS2 | SS1 |
+ * +-----------------------------------------------------+
+ * | 15-14 | 13-12 | 11-10 | 9-8 | 7-6 | 5-4 | 3-2 | 1-0 |
+ * +-----------------------------------------------------+
+ *
+ * Return: status of operation
+ */
+QDF_STATUS lim_populate_he_mcs_per_bw(struct mac_context *mac_ctx,
+				      uint16_t *supp_rx_mcs,
+				      uint16_t *supp_tx_mcs,
+				      uint16_t peer_rx, uint16_t peer_tx,
+				      uint8_t nss, uint16_t rx_mcs,
+				      uint16_t tx_mcs);
+
 /**
  * lim_populate_he_mcs_set() - function to populate HE mcs rate set
  * @mac_ctx: pointer to global mac structure