From 2dae1184977e8574a037bf885df8e7196dbeda14 Mon Sep 17 00:00:00 2001 From: guangde Date: Tue, 2 Jul 2019 15:24:24 +0800 Subject: [PATCH] qcacmn: enable legacy coex feature Because newest firmware codes already been changed, the previous coex configure command are invalid. Firmware need host driver to enable WMI_SERVICE_THREE_WAY_COEX_CONFIG_LEGACY service during wlan init. Add a new parameter "gThreeWayCoexConfigLegacyEnable" to initial config file. If this parameter value is zero,set coex priorities command will return error. Change-Id: Ief1617e2ba5363e276c55135198613a0e54b71d5 CRs-Fixed: 2482742 --- wmi/inc/wmi_unified_param.h | 3 +++ wmi/src/wmi_unified_tlv.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 2d23dfdd3bd3..3528f8787b60 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -5348,6 +5348,7 @@ typedef enum { wmi_service_data_stall_recovery_support, wmi_service_tx_compl_tsf64, wmi_service_vdev_delete_all_peer, + wmi_service_three_way_coex_config_legacy, wmi_services_max, } wmi_conv_service_ids; #define WMI_SERVICE_UNAVAILABLE 0xFFFF @@ -5469,6 +5470,7 @@ struct wmi_host_fw_abi_ver { * @twt_ap_sta_count: Max no of STA with which TWT sessions can be formed * by the AP * @max_bssid_indicator: max number of MBSS VAPs + * @three_way_coex_config_legacy_en: enable three way coex legacy feature */ typedef struct { uint32_t num_vdevs; @@ -5551,6 +5553,7 @@ typedef struct { uint32_t eapol_minrate_set:1, eapol_minrate_ac_set:2; bool tstamp64_en; + bool three_way_coex_config_legacy_en; } target_resource_config; /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 6fe44ecef3c9..dffa985b8929 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -6501,6 +6501,10 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg, WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_SET( resource_cfg->flag1, 1); + if (tgt_res_cfg->three_way_coex_config_legacy_en) + WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_LEGACY_SUPPORT_SET( + resource_cfg->flag1, 1); + wmi_copy_twt_resource_config(resource_cfg, tgt_res_cfg); resource_cfg->peer_map_unmap_v2_support = tgt_res_cfg->peer_map_unmap_v2; @@ -12540,6 +12544,8 @@ static void populate_tlv_service(uint32_t *wmi_service) WMI_SERVICE_DSM_ROAM_FILTER; wmi_service[wmi_service_vdev_delete_all_peer] = WMI_SERVICE_DELETE_ALL_PEER_SUPPORT; + wmi_service[wmi_service_three_way_coex_config_legacy] = + WMI_SERVICE_THREE_WAY_COEX_CONFIG_LEGACY; } /**