From 4e586b68b74c483471092dcd296a9e43b7eb8cf4 Mon Sep 17 00:00:00 2001 From: Will Huang Date: Wed, 10 Jul 2024 07:59:56 +0530 Subject: [PATCH] qcacld-3.0: Move forward functions to update ch_width for 6 GHz If SAP start on 6 GHz, client associate request will not have HT capability, so sta_ds->ch_width update too late in function lim_update_sta_ds, but it is used by lim_populate_matching_rate_set and lim_populate_eht_mcs_set, it lead to update 20 MHz eht mcs set and caused other bandwidth eht mcs set not update and keep 0 finally pass it to target. It will impact TX performance a lot. Move forward functions to update sta_ds->ch_width for 6 GHz. And update a typo of bw_160_rx_max_nss_for_mcs_10_and_11, it write as tx. Change-Id: I1c1cbe1daf8bfdf163d73c7aba5e7335e99e8157 CRs-Fixed: 3863495 --- core/mac/src/pe/lim/lim_process_assoc_req_frame.c | 11 ++++++++--- core/mac/src/pe/lim/lim_utils.c | 4 +++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c index ab6cd25417..5cadd9817b 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_req_frame.c @@ -1779,6 +1779,14 @@ static bool lim_update_sta_ds(struct mac_context *mac_ctx, tSirMacAddr sa, lim_mlo_save_mlo_info(sta_ds, &assoc_req->mlo_info); + /* + * Move forward to update sta_ds->ch_width for 6 GHz before call + * lim_populate_matching_rate_set and lim_populate_eht_mcs_set + */ + lim_update_stads_he_6ghz_op(session, sta_ds); + lim_update_sta_ds_op_classes(assoc_req, sta_ds); + lim_update_stads_eht_bw_320mhz(session, sta_ds); + if (lim_populate_matching_rate_set(mac_ctx, sta_ds, &(assoc_req->supportedRates), &(assoc_req->extendedRates), @@ -1819,9 +1827,6 @@ static bool lim_update_sta_ds(struct mac_context *mac_ctx, tSirMacAddr sa, ((sta_ds->supportedRates.vhtTxMCSMap & MCSMAPMASK2x2) == MCSMAPMASK2x2) ? 1 : 2; } - lim_update_stads_he_6ghz_op(session, sta_ds); - lim_update_sta_ds_op_classes(assoc_req, sta_ds); - lim_update_stads_eht_bw_320mhz(session, sta_ds); /* Add STA context at MAC HW (BMU, RHP & TFP) */ sta_ds->qosMode = false; diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 381112c58a..218a5c04de 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -8478,7 +8478,7 @@ static void lim_populate_eht_160_mcs_set(struct mac_context *mac_ctx, fw_5g_eht_cap->bw_160_tx_max_nss_for_mcs_10_and_11); rates->bw_160_rx_max_nss_for_mcs_10_and_11 = QDF_MIN(peer_eht_caps->bw_160_rx_max_nss_for_mcs_10_and_11, - fw_5g_eht_cap->bw_160_tx_max_nss_for_mcs_10_and_11); + fw_5g_eht_cap->bw_160_rx_max_nss_for_mcs_10_and_11); rates->bw_160_tx_max_nss_for_mcs_0_to_9 = QDF_MIN(peer_eht_caps->bw_160_tx_max_nss_for_mcs_0_to_9, fw_5g_eht_cap->bw_160_tx_max_nss_for_mcs_0_to_9); @@ -8564,6 +8564,8 @@ QDF_STATUS lim_populate_eht_mcs_set(struct mac_context *mac_ctx, return QDF_STATUS_SUCCESS; } + pe_debug("bw is %d", ch_width); + switch (ch_width) { case CH_WIDTH_320MHZ: lim_populate_eht_320_mcs_set(mac_ctx, rates, peer_eht_caps);