From 804b9e23823d6a01845b8167c9fee24303ed3071 Mon Sep 17 00:00:00 2001 From: Venkateswara Swamy Bandaru Date: Mon, 14 Feb 2022 21:57:18 +0530 Subject: [PATCH] qcacmn: Add EHT PPE threshold support Add support for EHT PPE threshold's. Store 2G and 5G thresholds received in service ready. Fill peer PPE thresholds for EHT peer. Change-Id: Id5c8310cbf34c59a3d88072b37ce3f871354ed17 CRs-Fixed: 3128586 --- .../init_deinit/inc/service_ready_param.h | 6 +++- wmi/inc/wmi_unified_param.h | 2 ++ wmi/src/wmi_unified_tlv.c | 29 ++++++++++++++++--- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/target_if/init_deinit/inc/service_ready_param.h b/target_if/init_deinit/inc/service_ready_param.h index 5da108e924..8b0b721dd6 100644 --- a/target_if/init_deinit/inc/service_ready_param.h +++ b/target_if/init_deinit/inc/service_ready_param.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2022 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 @@ -265,6 +265,8 @@ struct wlan_psoc_host_hw_mode_caps { * @eht_cap_info_internal: EHT PHY internal feature capability * @eht_supp_mcs_ext_2G: 2G EHT Supported MCS Set for Rx/Tx as per 11be D1.2 * @eht_supp_mcs_ext_5G: 5G EHT Supported MCS Set for Rx/Tx as per 11be D1.2 + * @eht_ppet2G: 2G EHT PPET info + * @eht_ppet5G: 5G EHT PPET info */ struct wlan_psoc_host_mac_phy_caps_ext2 { uint32_t hw_mode_id; @@ -281,6 +283,8 @@ struct wlan_psoc_host_mac_phy_caps_ext2 { uint32_t eht_cap_info_internal; uint32_t eht_supp_mcs_ext_2G[PSOC_HOST_EHT_MCS_NSS_MAP_2G_SIZE]; uint32_t eht_supp_mcs_ext_5G[PSOC_HOST_EHT_MCS_NSS_MAP_5G_SIZE]; + struct wlan_psoc_host_ppe_threshold eht_ppet2G; + struct wlan_psoc_host_ppe_threshold eht_ppet5G; #endif }; diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 639a6402ef..e4a3e4180e 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1145,6 +1145,7 @@ struct peer_assoc_ml_partner_links { * @peer_eht_mcs_count: Peer EHT MCS TX/RX MAP count * @peer_eht_rx_mcs_set: Peer EHT RX MCS MAP * @peer_eht_tx_mcs_set: Peer EHT TX MCS MAP + * @peer_eht_ppet: Peer EHT PPET info * @peer_ppet: Peer HE PPET info * @peer_bss_max_idle_option: Peer BSS Max Idle option update * @akm: AKM info @@ -1224,6 +1225,7 @@ struct peer_assoc_params { uint32_t peer_eht_rx_mcs_set[WMI_HOST_MAX_EHT_RATE_SET]; uint32_t peer_eht_tx_mcs_set[WMI_HOST_MAX_EHT_RATE_SET]; uint16_t puncture_pattern; + struct wmi_host_ppe_threshold peer_eht_ppet; #endif struct wmi_host_ppe_threshold peer_ppet; u_int8_t peer_bsscolor_rept_info; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index c22f62c39e..e9960c500d 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -2757,6 +2757,8 @@ static uint8_t *update_peer_flags_tlv_ehtinfo( sizeof(param->peer_eht_cap_macinfo)); qdf_mem_copy(&cmd->peer_eht_cap_phy, ¶m->peer_eht_cap_phyinfo, sizeof(param->peer_eht_cap_phyinfo)); + qdf_mem_copy(&cmd->peer_eht_ppet, ¶m->peer_eht_ppet, + sizeof(param->peer_eht_ppet)); WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, (param->peer_eht_mcs_count * sizeof(wmi_eht_rate_set))); @@ -12645,6 +12647,11 @@ static void extract_mac_phy_cap_ehtcaps( &mac_phy_caps->eht_supp_mcs_ext_5G, sizeof(param->eht_supp_mcs_ext_5G)); + qdf_mem_copy(¶m->eht_ppet2G, &mac_phy_caps->eht_ppet2G, + sizeof(param->eht_ppet2G)); + qdf_mem_copy(¶m->eht_ppet5G, &mac_phy_caps->eht_ppet5G, + sizeof(param->eht_ppet5G)); + wmi_debug("EHT mac caps: mac cap_info_2G %x, mac cap_info_5G %x, supp_mcs_2G %x, supp_mcs_5G %x, info_internal %x", mac_phy_caps->eht_cap_mac_info_2G[0], mac_phy_caps->eht_cap_mac_info_5G[0], @@ -12655,24 +12662,38 @@ static void extract_mac_phy_cap_ehtcaps( wmi_nofl_debug("2G:"); for (i = 0; i < PSOC_HOST_MAX_EHT_PHY_SIZE; i++) { - wmi_nofl_debug("index %d value %d", + wmi_nofl_debug("index %d value %x", i, param->eht_cap_phy_info_2G[i]); } wmi_nofl_debug("5G:"); for (i = 0; i < PSOC_HOST_MAX_EHT_PHY_SIZE; i++) { - wmi_nofl_debug("index %d value %d", + wmi_nofl_debug("index %d value %x", i, param->eht_cap_phy_info_5G[i]); } wmi_nofl_debug("2G MCS ext Map:"); for (i = 0; i < PSOC_HOST_EHT_MCS_NSS_MAP_2G_SIZE; i++) { - wmi_nofl_debug("index %d value %d", + wmi_nofl_debug("index %d value %x", i, param->eht_supp_mcs_ext_2G[i]); } wmi_nofl_debug("5G MCS ext Map:"); for (i = 0; i < PSOC_HOST_EHT_MCS_NSS_MAP_5G_SIZE; i++) { - wmi_nofl_debug("index %d value %d", + wmi_nofl_debug("index %d value %x", i, param->eht_supp_mcs_ext_5G[i]); } + wmi_nofl_debug("2G PPET: numss_m1 %x ru_bit_mask %x", + param->eht_ppet2G.numss_m1, + param->eht_ppet2G.ru_bit_mask); + for (i = 0; i < PSOC_HOST_MAX_NUM_SS; i++) { + wmi_nofl_debug("index %d value %x", + i, param->eht_ppet2G.ppet16_ppet8_ru3_ru0[i]); + } + wmi_nofl_debug("5G PPET: numss_m1 %x ru_bit_mask %x", + param->eht_ppet5G.numss_m1, + param->eht_ppet5G.ru_bit_mask); + for (i = 0; i < PSOC_HOST_MAX_NUM_SS; i++) { + wmi_nofl_debug("index %d value %x", + i, param->eht_ppet5G.ppet16_ppet8_ru3_ru0[i]); + } } #else static void extract_mac_phy_cap_ehtcaps(