From 3dff295d8c2d4575d5c3c8a8e84f763b9bbde6a7 Mon Sep 17 00:00:00 2001 From: Gyanranjan Hazarika Date: Fri, 17 Aug 2018 01:54:48 -0700 Subject: [PATCH] qcacmn: Changes for Draft 3.0 Make the HECAP and HEOP changes for 11ax Draft3.0. Draft2.0 support can still be enabled by unsetting SUPPORT_11AX_D3 in config.unified.wlan.profile. Change-Id: I0c0fd885a43b672baca61011b75a51526481b1ee CRs-fixed: 2294235 --- .../init_deinit/inc/service_ready_param.h | 8 +++---- umac/cmn_services/inc/wlan_cmn.h | 1 + wmi/inc/wmi_unified_param.h | 5 ++++- wmi/src/wmi_unified_tlv.c | 21 ++++++++++++++----- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/target_if/init_deinit/inc/service_ready_param.h b/target_if/init_deinit/inc/service_ready_param.h index 2f4f032e9980..7c284d8a7486 100644 --- a/target_if/init_deinit/inc/service_ready_param.h +++ b/target_if/init_deinit/inc/service_ready_param.h @@ -132,7 +132,7 @@ struct wlan_psoc_host_ppe_threshold { * - 1 indicates support for VHT-MCS 0-8 for n spatial streams * - 2 indicates support for VHT-MCS 0-9 for n spatial streams * - 3 indicates that n spatial streams is not supported - * @he_cap_info_2G: HE capability info field of 802.11ax, WMI_HE_CAP defines + * @he_cap_info_2G[]: HE capability info field of 802.11ax, WMI_HE_CAP defines * @he_supp_mcs_2G: HE Supported MCS Set field Rx/Tx same * @tx_chain_mask_2G: Valid Transmit chain mask * @rx_chain_mask_2G: Valid Receive chain mask @@ -146,7 +146,7 @@ struct wlan_psoc_host_ppe_threshold { * - 1 indicates support for VHT-MCS 0-8 for n spatial streams * - 2 indicates support for VHT-MCS 0-9 for n spatial streams * - 3 indicates that n spatial streams is not supported - * @he_cap_info_5G: HE capability info field of 802.11ax, WMI_HE_CAP defines + * @he_cap_info_5G[]: HE capability info field of 802.11ax, WMI_HE_CAP defines * @he_supp_mcs_5G: HE Supported MCS Set field Rx/Tx same * @tx_chain_mask_5G: Valid Transmit chain mask * @rx_chain_mask_5G: Valid Receive chain mask @@ -173,7 +173,7 @@ struct wlan_psoc_host_mac_phy_caps { uint32_t ht_cap_info_2G; uint32_t vht_cap_info_2G; uint32_t vht_supp_mcs_2G; - uint32_t he_cap_info_2G; + uint32_t he_cap_info_2G[PSOC_HOST_MAX_MAC_SIZE]; uint32_t he_supp_mcs_2G; uint32_t tx_chain_mask_2G; uint32_t rx_chain_mask_2G; @@ -181,7 +181,7 @@ struct wlan_psoc_host_mac_phy_caps { uint32_t ht_cap_info_5G; uint32_t vht_cap_info_5G; uint32_t vht_supp_mcs_5G; - uint32_t he_cap_info_5G; + uint32_t he_cap_info_5G[PSOC_HOST_MAX_MAC_SIZE]; uint32_t he_supp_mcs_5G; uint32_t tx_chain_mask_5G; uint32_t rx_chain_mask_5G; diff --git a/umac/cmn_services/inc/wlan_cmn.h b/umac/cmn_services/inc/wlan_cmn.h index 49296883471a..bc654a3e3890 100644 --- a/umac/cmn_services/inc/wlan_cmn.h +++ b/umac/cmn_services/inc/wlan_cmn.h @@ -588,6 +588,7 @@ struct wlan_ssid { #define PSOC_SERVICE_BM_SIZE ((128 + sizeof(uint32_t) - 1) / sizeof(uint32_t)) #define PSOC_HOST_MAX_NUM_SS (8) #define PSOC_HOST_MAX_PHY_SIZE (3) +#define PSOC_HOST_MAX_MAC_SIZE (2) #define PSOC_MAX_HW_MODE (2) #define PSOC_MAX_MAC_PHY_CAP (5) #define PSOC_MAX_PHY_REG_CAP (3) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 7dc7624ede42..c2709aeb9fac 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -1142,6 +1142,9 @@ typedef struct { #define WMI_HOST_MAX_NUM_SS 8 #define WMI_HOST_MAX_HECAP_PHY_SIZE 3 +#define WMI_HOST_MAX_HECAP_MAC_SIZE 2 +#define WMI_HOST_HECAP_MAC_WORD1 0 +#define WMI_HOST_HECAP_MAC_WORD2 1 #define WMI_HOST_MAX_HE_RATE_SET 3 /** * struct wmi_host_ppe_threshold -PPE threshold @@ -1274,7 +1277,7 @@ struct peer_assoc_params { bool he_flag; bool twt_requester; bool twt_responder; - uint32_t peer_he_cap_macinfo; + uint32_t peer_he_cap_macinfo[WMI_HOST_MAX_HECAP_MAC_SIZE]; uint32_t peer_he_ops; uint32_t peer_he_cap_phyinfo[WMI_HOST_MAX_HECAP_PHY_SIZE]; uint32_t peer_he_mcs_count; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index f5b73bd5f791..ee885521b1c9 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -2477,7 +2477,10 @@ static QDF_STATUS send_peer_assoc_cmd_tlv(wmi_unified_t wmi_handle, cmd->peer_phymode = param->peer_phymode; /* Update 11ax capabilities */ - cmd->peer_he_cap_info = param->peer_he_cap_macinfo; + cmd->peer_he_cap_info = + param->peer_he_cap_macinfo[WMI_HOST_HECAP_MAC_WORD1]; + cmd->peer_he_cap_info_ext = + param->peer_he_cap_macinfo[WMI_HOST_HECAP_MAC_WORD2]; cmd->peer_he_ops = param->peer_he_ops; qdf_mem_copy(&cmd->peer_he_cap_phy, ¶m->peer_he_cap_phyinfo, sizeof(param->peer_he_cap_phyinfo)); @@ -2547,6 +2550,7 @@ static QDF_STATUS send_peer_assoc_cmd_tlv(wmi_unified_t wmi_handle, "nss %d phymode %d peer_mpdu_density %d " "cmd->peer_vht_caps %x " "HE cap_info %x ops %x " + "HE cap_info_ext %x " "HE phy %x %x %x " "peer_bw_rxnss_override %x", __func__, cmd->vdev_id, cmd->peer_associd, cmd->peer_flags, @@ -2555,8 +2559,9 @@ static QDF_STATUS send_peer_assoc_cmd_tlv(wmi_unified_t wmi_handle, cmd->peer_max_mpdu, cmd->peer_nss, cmd->peer_phymode, cmd->peer_mpdu_density, cmd->peer_vht_caps, cmd->peer_he_cap_info, - cmd->peer_he_ops, cmd->peer_he_cap_phy[0], - cmd->peer_he_cap_phy[1], cmd->peer_he_cap_phy[2], + cmd->peer_he_ops, cmd->peer_he_cap_info_ext, + cmd->peer_he_cap_phy[0], cmd->peer_he_cap_phy[1], + cmd->peer_he_cap_phy[2], cmd->peer_bw_rxnss_override); wmi_mtrace(WMI_PEER_ASSOC_CMDID, cmd->vdev_id, 0); @@ -19791,7 +19796,10 @@ static QDF_STATUS extract_mac_phy_cap_service_ready_ext_tlv( param->ht_cap_info_2G = mac_phy_caps->ht_cap_info_2G; param->vht_cap_info_2G = mac_phy_caps->vht_cap_info_2G; param->vht_supp_mcs_2G = mac_phy_caps->vht_supp_mcs_2G; - param->he_cap_info_2G = mac_phy_caps->he_cap_info_2G; + param->he_cap_info_2G[WMI_HOST_HECAP_MAC_WORD1] = + mac_phy_caps->he_cap_info_2G; + param->he_cap_info_2G[WMI_HOST_HECAP_MAC_WORD2] = + mac_phy_caps->he_cap_info_2G_ext; param->he_supp_mcs_2G = mac_phy_caps->he_supp_mcs_2G; param->tx_chain_mask_2G = mac_phy_caps->tx_chain_mask_2G; param->rx_chain_mask_2G = mac_phy_caps->rx_chain_mask_2G; @@ -19799,7 +19807,10 @@ static QDF_STATUS extract_mac_phy_cap_service_ready_ext_tlv( param->ht_cap_info_5G = mac_phy_caps->ht_cap_info_5G; param->vht_cap_info_5G = mac_phy_caps->vht_cap_info_5G; param->vht_supp_mcs_5G = mac_phy_caps->vht_supp_mcs_5G; - param->he_cap_info_5G = mac_phy_caps->he_cap_info_5G; + param->he_cap_info_5G[WMI_HOST_HECAP_MAC_WORD1] = + mac_phy_caps->he_cap_info_5G; + param->he_cap_info_5G[WMI_HOST_HECAP_MAC_WORD2] = + mac_phy_caps->he_cap_info_5G_ext; param->he_supp_mcs_5G = mac_phy_caps->he_supp_mcs_5G; param->tx_chain_mask_5G = mac_phy_caps->tx_chain_mask_5G; param->rx_chain_mask_5G = mac_phy_caps->rx_chain_mask_5G;