From 482bae2b2e4d8c52d84113d79996822f6fd4e65e Mon Sep 17 00:00:00 2001 From: bings Date: Wed, 17 Jan 2018 16:25:31 +0800 Subject: [PATCH] qcacld-3.0: update target type to tgt_psoc_info of psoc update target type to tgt_psoc_info of psoc. Change-Id: I02040feca32a11f48c6464c75ca6741c208bd92e CRs-Fixed: 2178596 --- core/cds/src/cds_api.c | 3 ++- core/wma/inc/wma_types.h | 12 +++++++++++- core/wma/src/wma_main.c | 13 +++---------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index 89486f5944bd..9d8e98bc35d1 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -569,7 +569,8 @@ QDF_STATUS cds_open(struct wlan_objmgr_psoc *psoc) } /*Open the WMA module */ - status = wma_open(psoc, hdd_update_tgt_cfg, cds_cfg); + status = wma_open(psoc, hdd_update_tgt_cfg, cds_cfg, + hdd_ctx->target_type); if (QDF_IS_STATUS_ERROR(status)) { /* Critical Error ... Cannot proceed further */ QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL, diff --git a/core/wma/inc/wma_types.h b/core/wma/inc/wma_types.h index 40f4cc557304..473cfd134d5b 100644 --- a/core/wma/inc/wma_types.h +++ b/core/wma/inc/wma_types.h @@ -730,8 +730,18 @@ QDF_STATUS wma_tx_packet(void *pWMA, uint8_t txFlag, uint8_t sessionId, bool tdlsflag, uint16_t channel_freq, enum rateid rid); +/** + * wma_open() - Allocate wma context and initialize it. + * @psoc: Psoc pointer + * @wma_tgt_cfg_cb: tgt config callback fun + * @cds_cfg: mac parameters + * @target_type: Target type + * + * Return: 0 on success, errno on failure + */ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, - wma_tgt_cfg_cb pTgtUpdCB, struct cds_config_info *cds_cfg); + wma_tgt_cfg_cb pTgtUpdCB, struct cds_config_info *cds_cfg, + uint32_t target_type); /** * wma_vdev_init() - initialize a wma vdev diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 568b058531c6..3e674cc20a19 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -2795,17 +2795,10 @@ static int wma_rx_service_available_event(void *handle, uint8_t *cmd_param_info, return 0; } -/** - * wma_open() - Allocate wma context and initialize it. - * @psoc: Psoc pointer - * @wma_tgt_cfg_cb: tgt config callback fun - * @cds_cfg: mac parameters - * - * Return: 0 on success, errno on failure - */ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, wma_tgt_cfg_cb tgt_cfg_cb, - struct cds_config_info *cds_cfg) + struct cds_config_info *cds_cfg, + uint32_t target_type) { tp_wma_handle wma_handle; HTC_HANDLE htc_handle; @@ -2911,7 +2904,7 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, /* store the wmi handle in tgt_if_handle */ tgt_psoc_info->wmi_handle = wmi_handle; - + tgt_psoc_info->target_type = target_type; wlan_psoc_obj_lock(psoc); wlan_psoc_set_tgt_if_handle(psoc, tgt_psoc_info); wlan_psoc_obj_unlock(psoc);