From c9bb763bdf57ad504bfd5471b0cb6e8b9fa94cb2 Mon Sep 17 00:00:00 2001 From: Surya Prakash Sivaraj Date: Fri, 3 Sep 2021 14:40:49 +0530 Subject: [PATCH] qcacld-3.0: Bypass the HE channel width fallback for SAP For STA connection in HE 160, HE160 MCS is validated during the session creation. If the HE160 is invalid, the connection falls back to 80MHz. But, this check needs to be bypassed for SAP, because during session creation SAP will not have the peer capability, so the HE160 MCS validation needs to be bypassed. Change-Id: I3bbb2f35c40a123b5d05a94038970a0e7e43ac60 CRs-Fixed: 3025102 --- core/mac/src/pe/lim/lim_prop_exts_utils.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c index 1f898a644f49..ebfae02ac923 100644 --- a/core/mac/src/pe/lim/lim_prop_exts_utils.c +++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c @@ -227,16 +227,21 @@ void lim_update_he_bw_cap_mcs(struct pe_session *session, if ((session->opmode == QDF_STA_MODE || session->opmode == QDF_P2P_CLIENT_MODE) && beacon && beacon->he_cap.present) { - if (!beacon->he_cap.chan_width_2) + if (!beacon->he_cap.chan_width_2) { is_80mhz = 1; - else if (beacon->he_cap.chan_width_2 && + } else if (beacon->he_cap.chan_width_2 && !lim_validate_he160_mcs_map(session->mac_ctx, *((uint16_t *)beacon->he_cap.rx_he_mcs_map_160), *((uint16_t *)beacon->he_cap.tx_he_mcs_map_160), - session->nss)) + session->nss)) { is_80mhz = 1; - else + if (session->ch_width == CH_WIDTH_160MHZ) { + pe_debug("HE160 Rx/Tx MCS is not valid, falling back to 80MHz"); + session->ch_width = CH_WIDTH_80MHZ; + } + } else { is_80mhz = 0; + } } else { is_80mhz = 1; } @@ -245,11 +250,6 @@ void lim_update_he_bw_cap_mcs(struct pe_session *session, session->he_config.chan_width_2 = 0; session->he_config.chan_width_3 = 0; } else if (session->ch_width == CH_WIDTH_160MHZ) { - if (is_80mhz) { - pe_debug("HE160 Rx/Tx MCS is not valid, falling back to 80MHz"); - session->ch_width = CH_WIDTH_80MHZ; - session->he_config.chan_width_2 = 0; - } session->he_config.chan_width_3 = 0; } /* Reset the > 20MHz caps for 20MHz connection */