From a3bade0523d05e304a57bcc6d1e36249f0c8f438 Mon Sep 17 00:00:00 2001 From: Abhishek Ambure Date: Sun, 15 Mar 2020 19:28:05 +0530 Subject: [PATCH] qcacld-3.0: Update nan_separate_iface_support before WMI_INIT_CMD Host uses target_resource_config structure's "nan_separate_iface_support" while copying resource configs in WMI_INIT_CMD. Value of "nan_separate_iface_support" is set to 1, if firmware capability "vdev creation allowed = 1" and "ini gEnableNanSupport = 1". Host updates "nan_separate_iface_support" while processing an event "WMI_READY_EVENTID" which comes after WMI_INIT_CMD send to firmware. To update proper value of "nan_separate_iface_support" in resource configs of WMI_INIT_CMD, host updates "nan_separate_iface_support" while processing an event "WMI_SERVICE_READY_EXT_EVENTID". Change-Id: I677d9e39e20646dd4ce945f166b86947d82751e2 CRs-Fixed: 2642139 --- core/wma/src/wma_main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index ab8cc366435c..42113b116ff1 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -5453,10 +5453,6 @@ static int wma_update_hdd_cfg(tp_wma_handle wma_handle) return -EINVAL; } - wlan_res_cfg->nan_separate_iface_support = - ucfg_nan_is_vdev_creation_allowed(wma_handle->psoc) && - ucfg_nan_get_is_separate_nan_iface(wma_handle->psoc); - service_ext_param = target_psoc_get_service_ext_param(tgt_hdl); wmi_handle = get_wmi_unified_hdl_from_psoc(wma_handle->psoc); @@ -5532,6 +5528,7 @@ static int wma_update_hdd_cfg(tp_wma_handle wma_handle) ret = wma_handle->tgt_cfg_update_cb(hdd_ctx, &tgt_cfg); if (ret) return -EINVAL; + target_if_store_pdev_target_if_ctx(wma_get_pdev_from_scn_handle); target_pdev_set_wmi_handle(wma_handle->pdev->tgt_if_handle, wma_handle->wmi_handle); @@ -6759,6 +6756,10 @@ int wma_rx_service_ready_ext_event(void *handle, uint8_t *event, ucfg_ftm_time_sync_set_enable(wma_handle->psoc, false); } + if (wmi_service_enabled(wma_handle->wmi_handle, wmi_service_nan_vdev) && + ucfg_nan_get_is_separate_nan_iface(wma_handle->psoc)) + wlan_res_cfg->nan_separate_iface_support = true; + wma_init_dbr_params(wma_handle); wma_set_coex_res_cfg(wma_handle, wmi_handle, wlan_res_cfg);