qcacld-3.0: Add target_if support for components

Add target_if support for components.

Change-Id: I5110460afff7c4f5797b3441719dddf9a37c8a50
CRs-Fixed: 2001969
This commit is contained in:
Mukul Sharma 2017-02-03 12:16:11 +05:30 committed by qcabuildsw
parent fe0dc7b028
commit c3e7a78d8f
2 changed files with 36 additions and 2 deletions

14
Kbuild
View File

@ -806,6 +806,14 @@ BMI_OBJS := $(BMI_DIR)/src/bmi.o \
$(BMI_DIR)/src/ol_fw_common.o
BMI_OBJS += $(BMI_DIR)/src/bmi_1.o
########## TARGET_IF #######
TARGET_IF_DIR := $(WLAN_COMMON_ROOT)/target_if
TARGET_IF_INC := -I$(WLAN_COMMON_INC)/target_if/core/inc \
-I$(WLAN_COMMON_INC)/target_if/core/src
TARGET_IF_OBJ := $(TARGET_IF_DIR)/core/src/target_if_main.o
########### WMI ###########
WMI_ROOT_DIR := wmi
@ -1124,7 +1132,8 @@ INCS := $(HDD_INC) \
$(SYS_INC) \
$(QDF_INC) \
$(CDS_INC) \
$(DFS_INC)
$(DFS_INC) \
$(TARGET_IF_INC)
INCS += $(WMA_INC) \
$(UAPI_INC) \
@ -1191,7 +1200,8 @@ OBJS += $(WMA_OBJS) \
OBJS += $(HIF_OBJS) \
$(BMI_OBJS) \
$(HTT_OBJS)
$(HTT_OBJS) \
$(TARGET_IF_OBJ)
ifeq ($(CONFIG_LITHIUM), y)
OBJS += $(HAL_OBJS)

View File

@ -81,6 +81,7 @@
#include "wma_nan_datapath.h"
#include "wlan_lmac_if_def.h"
#include "wlan_lmac_if_api.h"
#include "target_if.h"
#define WMA_LOG_COMPLETION_TIMER 10000 /* 10 seconds */
@ -1855,6 +1856,27 @@ static void wma_target_if_close(tp_wma_handle wma_handle)
wlan_lmac_if_close(psoc);
}
/**
* wma_get_psoc_from_scn_handle() - API to get psoc from scn handle
* @scn_handle: opaque wma handle
*
* API to get psoc from scn handle
*
* Return: None
*/
static struct wlan_objmgr_psoc *wma_get_psoc_from_scn_handle(void *scn_handle)
{
tp_wma_handle wma_handle;
if (!scn_handle) {
WMA_LOGE("invalid scn handle");
return NULL;
}
wma_handle = (tp_wma_handle)scn_handle;
return wma_handle->psoc;
}
/**
* wma_open() - Allocate wma context and initialize it.
* @psoc: Psoc pointer
@ -2318,6 +2340,7 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, void *cds_context,
WMA_RX_SERIALIZER_CTX);
wma_ndp_register_all_event_handlers(wma_handle);
wma_target_if_open(wma_handle);
target_if_open(wma_get_psoc_from_scn_handle);
wma_register_debug_callback();
@ -3535,6 +3558,7 @@ QDF_STATUS wma_close(void *cds_ctx)
/* Decrease psoc ref count once APIs are available in object manager */
wma_handle->psoc = NULL;
target_if_close();
wma_target_if_close(wma_handle);
WMA_LOGD("%s: Exit", __func__);