qcacmn: Featurize EPPING Feature
Featurize EPPING Feature to compile out in mission mode. Change-Id: Iecbab88961034a5e5d2ab73b5b577e52cdb17873 CRs-Fixed: 2198847
This commit is contained in:
@@ -147,6 +147,7 @@ static struct CE_pipe_config target_ce_config_wlan[] = {
|
|||||||
{ /* CE11 */ 11, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
|
{ /* CE11 */ 11, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_EPPING
|
||||||
static struct CE_attr host_ce_config_wlan_epping_poll[] = {
|
static struct CE_attr host_ce_config_wlan_epping_poll[] = {
|
||||||
/* host->target HTC control and raw streams */
|
/* host->target HTC control and raw streams */
|
||||||
{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
|
{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
|
||||||
@@ -207,6 +208,7 @@ static struct CE_pipe_config target_ce_config_wlan_epping[] = {
|
|||||||
/* CE8 used only by IPA */
|
/* CE8 used only by IPA */
|
||||||
{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}
|
{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
static struct CE_attr host_ce_config_wlan[] = {
|
static struct CE_attr host_ce_config_wlan[] = {
|
||||||
/* host->target HTC control and raw streams */
|
/* host->target HTC control and raw streams */
|
||||||
@@ -252,6 +254,7 @@ static struct CE_pipe_config target_ce_config_wlan[] = {
|
|||||||
{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}
|
{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_EPPING
|
||||||
static struct CE_attr host_ce_config_wlan_epping_poll[] = {
|
static struct CE_attr host_ce_config_wlan_epping_poll[] = {
|
||||||
/* host->target HTC control and raw streams */
|
/* host->target HTC control and raw streams */
|
||||||
{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL,},
|
{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL,},
|
||||||
@@ -325,6 +328,7 @@ static struct CE_pipe_config target_ce_config_wlan_epping[] = {
|
|||||||
{ /* CE11 */ 11, PIPEDIR_IN, 0, 0, CE_ATTR_FLAGS, 0,},
|
{ /* CE11 */ 11, PIPEDIR_IN, 0, 0, CE_ATTR_FLAGS, 0,},
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct CE_attr host_ce_config_wlan_ar9888[] = {
|
static struct CE_attr host_ce_config_wlan_ar9888[] = {
|
||||||
/* host->target HTC control and raw streams */
|
/* host->target HTC control and raw streams */
|
||||||
|
@@ -189,6 +189,7 @@ static struct shadow_reg_cfg target_shadow_reg_cfg_map[] = {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_EPPING
|
||||||
static struct shadow_reg_cfg target_shadow_reg_cfg_epping[] = {
|
static struct shadow_reg_cfg target_shadow_reg_cfg_epping[] = {
|
||||||
{ 0, ADRASTEA_SRC_WR_INDEX_OFFSET},
|
{ 0, ADRASTEA_SRC_WR_INDEX_OFFSET},
|
||||||
{ 3, ADRASTEA_SRC_WR_INDEX_OFFSET},
|
{ 3, ADRASTEA_SRC_WR_INDEX_OFFSET},
|
||||||
@@ -200,6 +201,7 @@ static struct shadow_reg_cfg target_shadow_reg_cfg_epping[] = {
|
|||||||
{ 7, ADRASTEA_DST_WR_INDEX_OFFSET},
|
{ 7, ADRASTEA_DST_WR_INDEX_OFFSET},
|
||||||
{ 8, ADRASTEA_DST_WR_INDEX_OFFSET},
|
{ 8, ADRASTEA_DST_WR_INDEX_OFFSET},
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/* CE_PCI TABLE */
|
/* CE_PCI TABLE */
|
||||||
/*
|
/*
|
||||||
@@ -551,10 +553,10 @@ static struct service_to_pipe target_service_to_ce_map_ar900b[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static struct shadow_reg_cfg *target_shadow_reg_cfg = target_shadow_reg_cfg_map;
|
static struct shadow_reg_cfg *target_shadow_reg_cfg = target_shadow_reg_cfg_map;
|
||||||
static int shadow_cfg_sz = sizeof(target_shadow_reg_cfg_map);
|
static int shadow_cfg_sz = sizeof(target_shadow_reg_cfg_map);
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_EPPING
|
||||||
static struct service_to_pipe target_service_to_ce_map_wlan_epping[] = {
|
static struct service_to_pipe target_service_to_ce_map_wlan_epping[] = {
|
||||||
{WMI_DATA_VO_SVC, PIPEDIR_OUT, 3,}, /* out = UL = host -> target */
|
{WMI_DATA_VO_SVC, PIPEDIR_OUT, 3,}, /* out = UL = host -> target */
|
||||||
{WMI_DATA_VO_SVC, PIPEDIR_IN, 2,}, /* in = DL = target -> host */
|
{WMI_DATA_VO_SVC, PIPEDIR_IN, 2,}, /* in = DL = target -> host */
|
||||||
@@ -575,6 +577,16 @@ static struct service_to_pipe target_service_to_ce_map_wlan_epping[] = {
|
|||||||
{0, 0, 0,}, /* Must be last */
|
{0, 0, 0,}, /* Must be last */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void hif_select_epping_service_to_pipe_map(struct service_to_pipe
|
||||||
|
**tgt_svc_map_to_use,
|
||||||
|
uint32_t *sz_tgt_svc_map_to_use)
|
||||||
|
{
|
||||||
|
*tgt_svc_map_to_use = target_service_to_ce_map_wlan_epping;
|
||||||
|
*sz_tgt_svc_map_to_use =
|
||||||
|
sizeof(target_service_to_ce_map_wlan_epping);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void hif_select_service_to_pipe_map(struct hif_softc *scn,
|
static void hif_select_service_to_pipe_map(struct hif_softc *scn,
|
||||||
struct service_to_pipe **tgt_svc_map_to_use,
|
struct service_to_pipe **tgt_svc_map_to_use,
|
||||||
uint32_t *sz_tgt_svc_map_to_use)
|
uint32_t *sz_tgt_svc_map_to_use)
|
||||||
@@ -583,9 +595,8 @@ static void hif_select_service_to_pipe_map(struct hif_softc *scn,
|
|||||||
struct hif_target_info *tgt_info = &scn->target_info;
|
struct hif_target_info *tgt_info = &scn->target_info;
|
||||||
|
|
||||||
if (QDF_IS_EPPING_ENABLED(mode)) {
|
if (QDF_IS_EPPING_ENABLED(mode)) {
|
||||||
*tgt_svc_map_to_use = target_service_to_ce_map_wlan_epping;
|
hif_select_epping_service_to_pipe_map(tgt_svc_map_to_use,
|
||||||
*sz_tgt_svc_map_to_use =
|
sz_tgt_svc_map_to_use);
|
||||||
sizeof(target_service_to_ce_map_wlan_epping);
|
|
||||||
} else {
|
} else {
|
||||||
switch (tgt_info->target_type) {
|
switch (tgt_info->target_type) {
|
||||||
default:
|
default:
|
||||||
@@ -2448,8 +2459,23 @@ int hif_wlan_enable(struct hif_softc *scn)
|
|||||||
mode, QWLAN_VERSIONSTR);
|
mode, QWLAN_VERSIONSTR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_EPPING
|
||||||
|
|
||||||
#define CE_EPPING_USES_IRQ true
|
#define CE_EPPING_USES_IRQ true
|
||||||
|
|
||||||
|
void hif_ce_prepare_epping_config(struct HIF_CE_state *hif_state)
|
||||||
|
{
|
||||||
|
if (CE_EPPING_USES_IRQ)
|
||||||
|
hif_state->host_ce_config = host_ce_config_wlan_epping_irq;
|
||||||
|
else
|
||||||
|
hif_state->host_ce_config = host_ce_config_wlan_epping_poll;
|
||||||
|
hif_state->target_ce_config = target_ce_config_wlan_epping;
|
||||||
|
hif_state->target_ce_config_sz = sizeof(target_ce_config_wlan_epping);
|
||||||
|
target_shadow_reg_cfg = target_shadow_reg_cfg_epping;
|
||||||
|
shadow_cfg_sz = sizeof(target_shadow_reg_cfg_epping);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* hif_ce_prepare_config() - load the correct static tables.
|
* hif_ce_prepare_config() - load the correct static tables.
|
||||||
* @scn: hif context
|
* @scn: hif context
|
||||||
@@ -2468,14 +2494,7 @@ void hif_ce_prepare_config(struct hif_softc *scn)
|
|||||||
scn->ce_count = HOST_CE_COUNT;
|
scn->ce_count = HOST_CE_COUNT;
|
||||||
/* if epping is enabled we need to use the epping configuration. */
|
/* if epping is enabled we need to use the epping configuration. */
|
||||||
if (QDF_IS_EPPING_ENABLED(mode)) {
|
if (QDF_IS_EPPING_ENABLED(mode)) {
|
||||||
if (CE_EPPING_USES_IRQ)
|
hif_ce_prepare_epping_config(hif_state);
|
||||||
hif_state->host_ce_config = host_ce_config_wlan_epping_irq;
|
|
||||||
else
|
|
||||||
hif_state->host_ce_config = host_ce_config_wlan_epping_poll;
|
|
||||||
hif_state->target_ce_config = target_ce_config_wlan_epping;
|
|
||||||
hif_state->target_ce_config_sz = sizeof(target_ce_config_wlan_epping);
|
|
||||||
target_shadow_reg_cfg = target_shadow_reg_cfg_epping;
|
|
||||||
shadow_cfg_sz = sizeof(target_shadow_reg_cfg_epping);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (tgt_info->target_type) {
|
switch (tgt_info->target_type) {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||||
*
|
*
|
||||||
@@ -218,4 +218,21 @@ void hif_get_target_ce_config(struct hif_softc *scn,
|
|||||||
struct shadow_reg_cfg **target_shadow_reg_cfg_v1_ret,
|
struct shadow_reg_cfg **target_shadow_reg_cfg_v1_ret,
|
||||||
uint32_t *shadow_cfg_v1_sz_ret);
|
uint32_t *shadow_cfg_v1_sz_ret);
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_EPPING
|
||||||
|
void hif_ce_prepare_epping_config(struct HIF_CE_state *hif_state);
|
||||||
|
void hif_select_epping_service_to_pipe_map(struct service_to_pipe
|
||||||
|
**tgt_svc_map_to_use,
|
||||||
|
uint32_t *sz_tgt_svc_map_to_use);
|
||||||
|
|
||||||
|
#else
|
||||||
|
static inline
|
||||||
|
void hif_ce_prepare_epping_config(struct HIF_CE_state *hif_state)
|
||||||
|
{ }
|
||||||
|
static inline
|
||||||
|
void hif_select_epping_service_to_pipe_map(struct service_to_pipe
|
||||||
|
**tgt_svc_map_to_use,
|
||||||
|
uint32_t *sz_tgt_svc_map_to_use)
|
||||||
|
{ }
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __CE_H__ */
|
#endif /* __CE_H__ */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||||
*
|
*
|
||||||
@@ -42,8 +42,23 @@
|
|||||||
#include <qdf_types.h>
|
#include <qdf_types.h>
|
||||||
|
|
||||||
/* epping_main signatures */
|
/* epping_main signatures */
|
||||||
|
#ifdef WLAN_FEATURE_EPPING
|
||||||
int epping_open(void);
|
int epping_open(void);
|
||||||
void epping_close(void);
|
void epping_close(void);
|
||||||
void epping_disable(void);
|
void epping_disable(void);
|
||||||
int epping_enable(struct device *parent_dev);
|
int epping_enable(struct device *parent_dev);
|
||||||
|
#else
|
||||||
|
static inline int epping_open(void)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int epping_enable(struct device *parent_dev)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void epping_close(void) {}
|
||||||
|
static inline void epping_disable(void) {}
|
||||||
|
#endif
|
||||||
#endif /* end #ifndef EPPING_MAIN_H */
|
#endif /* end #ifndef EPPING_MAIN_H */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||||
*
|
*
|
||||||
@@ -73,6 +73,7 @@
|
|||||||
#define WLAN_WAIT_TIME_WLANSTART 2000
|
#define WLAN_WAIT_TIME_WLANSTART 2000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_EPPING
|
||||||
static struct epping_context *g_epping_ctx;
|
static struct epping_context *g_epping_ctx;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -352,3 +353,4 @@ error_end:
|
|||||||
bmi_cleanup(ol_ctx);
|
bmi_cleanup(ol_ctx);
|
||||||
return A_ERROR;
|
return A_ERROR;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user