From c6ca8572576af4e1a52c63dfffb5f1479258c7b9 Mon Sep 17 00:00:00 2001 From: Nandha Kishore Easwaran Date: Mon, 30 Mar 2020 16:27:42 +0530 Subject: [PATCH] qcacmn: Support for IPQ8074 2G PHYB mode 1/3 This mode is supported through hw_mode_id 7. A special mode for IPQ8074 platform alone to bring up single pdev alone on 2G mode. FW would advertise the mode 7 support through the WMI service ready message and this mode will be the default mode for AP-HK10 alone. Added a function to update the svc_id mappings for this mode as FW requires WMI commands to be received through CE 7 for this mode. Also adjusted the preferred mode precedence to give high precedence to mode 7. Change-Id: Id637c59e9528779e38737b7d74b000abf2e9db9d --- target_if/init_deinit/src/service_ready_util.c | 8 ++++---- wmi/inc/wmi_unified_param.h | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/target_if/init_deinit/src/service_ready_util.c b/target_if/init_deinit/src/service_ready_util.c index 21bc668947b8..8f8b05d982d5 100644 --- a/target_if/init_deinit/src/service_ready_util.c +++ b/target_if/init_deinit/src/service_ready_util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020 The Linux Foundation. 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 @@ -243,9 +243,9 @@ static int get_sar_version(wmi_unified_t handle, uint8_t *evt, static bool new_hw_mode_preferred(uint32_t current_hw_mode, uint32_t new_hw_mode) { - uint8_t hw_mode_id_precedence[WMI_HOST_HW_MODE_MAX + 1] = { 5, 1, 4, - 3, 0, 2, - 6 }; + uint8_t hw_mode_id_precedence[WMI_HOST_HW_MODE_MAX + 1] = { 6, 2, 5, + 4, 1, 3, + 7, 0, 8}; if (current_hw_mode > WMI_HOST_HW_MODE_MAX || new_hw_mode > WMI_HOST_HW_MODE_MAX) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 93c6724f64ad..ecfc4a2f3b4d 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -6744,6 +6744,8 @@ enum wmi_userspace_log_level { * as in WMI_HW_MODE_SBS, and 3rd on the other band * @WMI_HOST_HW_MODE_DBS_OR_SBS: Two PHY with one PHY capabale of both 2G and * 5G. It can support SBS (5G + 5G) OR DBS (5G + 2G). + * @WMI_HOST_HW_MODE_FW_INTERNAL: FW specific internal mode + * @WMI_HOST_HW_MODE_2G_PHYB: Only one phy is active. 2G mode on PhyB. * @WMI_HOST_HW_MODE_MAX: Max hw_mode_id. Used to indicate invalid mode. * @WMI_HOST_HW_MODE_DETECT: Mode id used by host to choose mode from target * supported modes. @@ -6755,6 +6757,8 @@ enum wmi_host_hw_mode_config_type { WMI_HOST_HW_MODE_SBS = 3, WMI_HOST_HW_MODE_DBS_SBS = 4, WMI_HOST_HW_MODE_DBS_OR_SBS = 5, + WMI_HOST_HW_MODE_FW_INTERNAL = 6, + WMI_HOST_HW_MODE_2G_PHYB = 7, WMI_HOST_HW_MODE_MAX, WMI_HOST_HW_MODE_DETECT, };